New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
Layout inspired by https://github.com/nikkiii/status and using a modified scrd.
AJAX request asking for new stats is made every 30 seconds. I used to collect stats every 10 seconds, but some of my servers didn't really like that - I should look into making it do persistent connections. As for how it works, the stats are retrieved in JSON format and processed client-side with a bit of javascript-fu
(will release source code when I cleaned it up, it's a horrible mess right now)
Wow O_O Just noticed your script, almost the best I've seen so far. Would be great if you make that public.
@luis123456 : Why indicators (PNG images) are not showing in your script? Seems to me as there is something with the bar.php coding, or something not enabled from my side.
Well, it works on all VPS I have. I multi tested it. Maybe new openvz is breaking it?
Here's a demo: http://20host.tk/info
Here's a demo: http://20host.tk/info
Thanks a lot It turned to be the GD isn't installed in that VPS, while in my other VPS it worked like chram. So, I run "sudo apt-get install php5-gd" and modified php.ini with: (extension_dir = "/usr/lib/php5/modules")<-- or adding whatever the path to shared objects directory. Restarted Apache , and GD library is working in the VPS that didn't show indicators earlier, indicators are showing thereafter
btw, nice, and awesome one, luis IMHO it can even be further improved if
1) Removing "System Info" and "Other Stuff" bars.
2) Creating a simple "central webpage" and include each three server status pages in it displayed next to each other in one row.
3) That webpage can be in JS too, and automatically refresh the scripts every x seconds.
4) We can use an .htaccess file (for Apache, or equivalent method for Nginx and others) to restrict access to PHP script on each VPS to just the server that hosts the "central page".
Just thoughts for simple customization, but not doing it currently, even though i'm solely in the meantime depending on a ping service monitoring my sites uptime.
And again.....thanks to you.
why am i getting getCpuUsage(): couldn't access STAT path or STAT file invalid
@sandoz : Is the page displaying at all, or it's displaying but CPU info isn't? What do you get in error log? also what os running in your VPS?
Just a little problem. How to add a server in the sqlite db.
no one wants to share how they did it? I can't seem to get it to work on my VPS
Can someone please help?
And nothing displays on the index.php too ...
That error tells you that the cronjob cannot find your Ping.php file.
Make sure the Ping.php file is actually on your system. If it is, the file path is probably wrong.
It looks like your system cannot locate the Ping.php script.
You can do 2 things,
apt-get install php-net-ping
@kiloserve: I've done what you've said:
then I added this code on the cron.php
@tux: thanks and done..
but...
I'm not getting any results yet. Index.php is just blank on my browser.
Hi LivingSoul, that's the wrong Ping.php
It's "Ping.php" (Capital P...Winbloze doesn't care but Linux is case sensitive).
@kiloserve: oh yeah..
changed the include path also on cron.php but nothing still?
Are you still getting the stream not found error?
Please post any additional errors or confirm you are still getting same error.
@LivingSouL: Type
pear install Net_Ping
@tortau:
@kiloserve: nope, i'm not getting any errors now, but still nothing displayed on the browser, as in blank. I'm not sure if it's processing or not. scrd is running though. thanks for the replies..
did you add any servers to the database?
how? :-|
That is good, it is no longer an issue with Ping.php and is probably running correctly on the PHP side. You did edit config.php, right?
If yes, your issue is probably on the scrd side.
Did you edit scrd.conf and is scrd running?
oh there it is, http://stats.marcroger.com/
can you please teach me how to add a server? thanks.
That is good, it looks like you have the "display" portion of this completed, you are missing the data collection/stats portion I believe.
Have you installed and configured scrd yet?
You should be able to:
sqlite3 servers.db
INSERT INTO "servers" VALUES('Unique ID','Hostname/IP','Node Name/Number','Provider',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
.quit
@cedric: thanks! now something actually shows on the page...
@kiloserve: yep, installed, configured and it's running on #2, where the stats is hosted (Debian). I'm having a hard time running scrd on CentOS, #1,3 and 4.
ah! i got it... the problem was the path. it should be ini_set('include_path', '/usr/share/php'); instead of /php/Net...
now on to the JSON for CentOS 5.7... hmmmm
Seems I'm having the same issue with you, scrd's running but no statistics info shows up on the page. The Last Updated shows a weird number. Any ideas?
Sounds like Kujoe found the fix for the CentOS issue:
Replace all instances of "json" with "simplejson" in the scrd file. (BTW, I'm using CentOS 5.6.)
or
change "import json" to "import simplejson as json"
Yes, are you running debian? If you are, here's what I did.
and then it'll output something like
then put the location on your cron.php like this on the first line
and it should collect something on your stats page. And also check your firewall if it allows the port you've set to the scrd.conf and config.php
Thank you very much! I really appreciate your help. It's now displaying
http://stats.marcroger.com
One question though, this doesn't display the processes right?
I found why it's not working for me, I've pointed the wrong php binary path in the cronjob since I'm using a self-compiled php. Now everything works well for me. Thanks.
cool!