I've always need a method to monitor the up/down time of my machines, but I didn't want to go in the long complicated methods (snmp servers, monitor, etc), so yesterday with the help of google (and the WhoIsOnline [wio] IPCOP project for graphs, hence the name wio), I came out with this script to run on my fritz:
On a regular interval, it pings IP's defined in a text file, and logs the data with rrdtool, which can be later viewed as a graph
I am attaching the initial script as it is.
To run, unzip the file to the USB storage attached to the fritz box (currently, the scrips will look for files in this directory: /var/media/ftp/uStor01/wio, if you put the files in other locations, you need to change the hard-coded path), then edit the hosts.ip file with the desired hosts to monitor, then start run.sh on the telnet/ssh, this will put a web server on port 94, and starts the process of ping every 10 minutes. After a while you'll start getting the graphs.
This script is still in early stages (started yesterday) and still need work to be done, such as make the interval of checking more dynamic, more configurable, better interface to view the graphs with more intervals (day/week/month), and it will be great if it can be made as a Freetz package (which I have never done).
Update 1: v0.2
I've made small changes:
Update 2: v0.3
Updated the status webpage:
Feedback (& help) are welcomed....
On a regular interval, it pings IP's defined in a text file, and logs the data with rrdtool, which can be later viewed as a graph
I am attaching the initial script as it is.
To run, unzip the file to the USB storage attached to the fritz box (currently, the scrips will look for files in this directory: /var/media/ftp/uStor01/wio, if you put the files in other locations, you need to change the hard-coded path), then edit the hosts.ip file with the desired hosts to monitor, then start run.sh on the telnet/ssh, this will put a web server on port 94, and starts the process of ping every 10 minutes. After a while you'll start getting the graphs.
This script is still in early stages (started yesterday) and still need work to be done, such as make the interval of checking more dynamic, more configurable, better interface to view the graphs with more intervals (day/week/month), and it will be great if it can be made as a Freetz package (which I have never done).
Update 1: v0.2
I've made small changes:
- now you can define an alias for the IP address
- a config file to set paths, and web server port, still useless as each shell script which uses it does an include with the absolute path
Update 2: v0.3
Updated the status webpage:
- Now the rrdgraph is only executed when you open the web page (slower than before, but better than generating all graphs every 10 minutes)
- Graphs are also available for other periods (12 hours, 1 day, 1 week, 1 month, 1 year), configurable in the config.inc file
- The wio.cgi does a relative include of the config.inc, no more need to change absolute file path there.
- included the checkip shell script into the update.sh, 1 less file
Feedback (& help) are welcomed....
Anhänge
Zuletzt bearbeitet: