Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


PHP/JSON low end box Status Monitor script (no database) - Page 2
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.

PHP/JSON low end box Status Monitor script (no database)

2»

Comments

  • RaymiiRaymii Member

    @undisclosedp Nice :)

    I however noticed a bug in the HDD space part. It is fixed now in the download file, so you might want to update stat.php (redownload the zip and replace stat.php). Typo's in the used and free space.

  • happelhappel Member
    edited July 2012

    Nice script.

    The text for HDD usage seems the wrong way around btw.

    edit: few seconds late :-)

  • RaymiiRaymii Member

    @happel I noticed that, it fixed just now, was already fixed on my server but forget to git push...

  • Nice one, I was wondering about that! Uploaded the fresh file!

    Are you taking feature suggestions?

  • support mongodb redis?

  • azizmbazizmb Member

    So finally got it running on my web server(s). Just a tip, I noticed that the .json file gets its file permissions set to 0777 after being downloaded. I'd recommend you change this to 0755 for safety reasons. I even got it running with it as 0700 (both the script and the files share the same nginx ownership).

  • RaymiiRaymii Member

    @undisclosedp You can always ask, and if I can do it i might.

    @azizmb Correct, but my permission setup is a little different.

    @ynzheng I've got no experience with MongoDB or Redis, and the point of this is to use no seperate database (software). The code is open, you can always hack it in yourself.

  • Just a note on the Cron settings.

    • Generating Json files will/can take a few seconds (depending on actions)
    • Calling a Wget at the same time will sometimes download the old file

    Suggested solution:

    • In statget.sh add a sleep argument for 3-5 seconds before first Wget call
  • RaymiiRaymii Member

    @telephone Correct, I've noticed that also. My solution was to let the cronjob statget.sh run every 6 minutes. If the timeservers are synced then it will give a collision indeed.

  • syamansyaman Member

    This looks amazing!

    Is there a way to not display the IP address of each monitored server?

  • azizmbazizmb Member
    edited July 2012

    @syaman

    Comment out the line in stat.php that reads:
    echo "IPv4: " . $json_a['IPv4'] . "<br />";

    And if you want it so that the IP Address doesn't even get recording in the json files; comment out the parts under the IP Areas in the client.sh script (# local IP and #external IP).

  • RaymiiRaymii Member

    @syaman @azizmb correct method of removing it. You should make sure that the json file is still valid after tweaking it (via http://jsonlint.org/ for example) because if not PHP will not be able to parse it.

    Does anyone has more comments, feature request or example setups? How does it work for you?

    The problem I had with openstatus was the high IO load on the database (openstatus-server), and with my scripts I do not see that. How is that with other installs?

  • flyfly Member

    should consider justifying the columns so they line up :)

  • RaymiiRaymii Member

    @kbar what do you mean by that?

  • happelhappel Member
    edited July 2012

    probably this, the third column isn't even

    image

  • RaymiiRaymii Member

    That would require some css, but would be possible. I had hoped that the html5 kickstart framework took care of that. Anyone ported it to bootstrap yet?

  • Apols for resurrecting an older thread, but is this happening to anyone else?

    image

    Top two seem to be fine, but bottom shows "Users: day" and "Load: load"

  • Happens to me as well.

  • is anyone still using this?

  • thanks for sharing. i'll try it

Sign In or Register to comment.