pcp
[Top] [All Lists]

pmie rule using shell?

To: pcp@xxxxxxxxxxx
Subject: pmie rule using shell?
From: Jan-Frode Myklebust <janfrode@xxxxxxxxx>
Date: Sat, 19 Jul 2003 23:22:37 +0200
Mail-followup-to: pcp@xxxxxxxxxxx
Sender: pcp-bounce@xxxxxxxxxxx
Hi, 

I have a Sensorsoft <http://sensorsoft.com/> thermometer connected 
to my serial port, and dump temperature readings to a rrd-database
every 5 minute. 

Is it possible to make a pmie rule similar to the pcp/examples/pmie/ENVIRON
example that reads the last entry from the rrd-database via shell-commands 
instead of the environ.temp metric, and raises an alert if the temperature
is rising?

The command to get the last temperature entry would be something like:

        rrdtool fetch scomtemp.rrd MAX -r 900 -s -10|grep -v nan|tail -1|awk 
'{print $2+0}'

Can I use this directly in pmie, or will I have to write a PMDA?


  -jf

<Prev in Thread] Current Thread [Next in Thread>