|
Re: Temperatures plugin: msg#00030db.rddtool.munin.general
On Fri, 08 Dec 2006, Bjørn Ruberg wrote: > 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 > I was able to reproduce the error on munin 1.2.3. On munin 1.3.3 everything worked just fine. Since the regexp is greedy, there should be no need to specify type of result and/or minus. The regexp need only a minor change: from: if ($response->content =~ /Temperature:\s*(.*)\s*F\s*\(\s*(.*)\s*C/) { to: if ($response->content =~ /Temperature:\s*(.*)\s+F\s*\(\s*(.*)\s+C/) { Fixed plugin uploaded to muninexchange. -- Lars Strand ------------------------------------------------------------------------- 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> |
|---|---|---|
| Previous by Date: | Re: Traffic warning?: 00030, Nicolai Langfeldt |
|---|---|
| Next by Date: | SMART_ plugin: 00030, it |
| Previous by Thread: | Re: Temperatures plugini: 00030, Bjørn Ruberg |
| Next by Thread: | HEADS UP RRDtool problem on Debian Testing and others: 00030, Lupe Christoph |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |