- This topic has 1 reply, 2 voices, and was last updated 11 years, 8 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
I’ve got a monitoring setup using mrtg: http://keetweej.vanheusden.com/radiation-in-gouda.php
How I do it:
/etc/mrtg.cfg
Target[radu_cpm]:\/root/bin/radu-cpm.sh\
MaxBytes[radu_cpm]: 1000
AbsMax[radu_cpm]: 1000
YLegend[radu_cpm]: cpm
Title[radu_cpm]: radu cpm
PageTop[radu_cpm]: <H1>radu cpm</H1>
Options[radu_cpm]: growright,gauge
/root/bin/radu-cpm.sh
#! /bin/bash
sed -n 's/^.*radiation:\([0-9]*\).*$/\1/p' < /tmp/radu.txt
sed -n 's/^.*average:\([0-9]*\).*$/\1/p' < /tmp/radu.txt
sed -n 's/^.*uptime:\([0-9]*\).*$/\1/p' < /tmp/radu.txt
sed -n 's/^.*uRADMonitor *\(.*\)$/\1/p' < /tmp/radu.txt
cron-entry (crontab -e):
# uradmonitor
*/4 * * * * /usr/bin/lynx -dump http://radu/ > /tmp/radu.txt
That is a very nice solution!
However I am surprised you preferred to use the HTML content instead of the JSON available under http://ip/j