Return to Snippet

Revision: 60399
at November 7, 2012 07:28 by 2mf


Initial Code
#!/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"

Initial URL


Initial Description
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.

Initial Title
Push-style server status monitoring

Initial Tags
server

Initial Language
Bash