/ Published in: Bash
My first (simpliest) way to collect monitoring data from few servers. Only skeleton for adding custom parameters. Using this way is not a good idea in general.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/sh # Copyright (c) 2008 Mihail Fedorov, http://mihailfedorov.ru # Severs Monitoring Backend v 0.1 PASS="god" # Pssssswd ;) PASSMD=`echo $PASS|md5` SERVER=`hostname` OS=`uname -a` RUNNING=`uptime` CODE="::$SERVER::$OS::$RUNNING::" CODE64=`echo $CODE|base64` # Passive way (example) - put this in inetd to some strange port # echo $CODE64 # Active way - report via crontab to frontend wget -O /dev/null -q "http://domain.tld/monitoring/frontend.php?p=$PASSMD&info=$CODE64"