logo       

Re: Temperatures plugin: msg#00026

db.rddtool.munin.general

Subject: Re: Temperatures plugin

S. Banerian wrote:

> actually, i needed to modify the regex just a little:
> if ($response->content =~
> /Temperature:\s*(\d+\.+\d+)\s*F\s*\(\s*(\d+\.+\d+)\s*C/) {

Thanks for your input. Seems like we also forgot degrees below zero,
which this regexp will handle:

if ($response->content =~
/Temperature:\s*(\-?\d+(?:\.\d+)?)\s*F\s*\(\s*(\-?\d+(?:\.\d+)?)\s*C/) {

# munin-run temperatures
ENGM.value 5
KNYC.value -3.3

--
Bjørn



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise