Quantcast
Channel: LowEndTalk
Viewing all articles
Browse latest Browse all 39981

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

$
0
0

DEMO

http://raymii.nl/stat.php

How it works:

On every server you set a cronjob for the client script. This is a bash script which outputs a bunch of text formatted as json, like this:

{ "Services": { "lighttpd" : "running","sshd" : "running","syslog" : "running","munin-node" : "running" }, "Disk" : { "total" : "15360M", "used" : "10820M", "free" : "4541M", "percentage" : "71%" }, "Load" : "0.01,", "Users logged on" : "0", "Uptime" : "29days,", "Free RAM" : "204", "Total RAM" : "256", "IPv4" : "209.141.58.74/32", "Hostname" : "vps5", "External IPv4" : " 209.141.58.74 ","JSON" : "close" }

The server has a php script (the one in the demo) which does the magic to make it look good. Since I discovered this JSON thing I'm almost in love with it :p.
It also has a script to get the json files from every monitored server. (in my case rsync, but I might do it via wget).

Plans

  • Implement a better down-check. If it cannot fetch a json file from a server, it should output a time since when it is down.
  • Implement apt-get package update checks (and yum, is someone donates me a centos server :P )
  • Source will be released some time in these two weeks, MIT/X11 license from http://raymii.org

Ideas? Comments? please tell me :)


Viewing all articles
Browse latest Browse all 39981

Trending Articles