notice a change in value, not the value itself
Posted: Thu Aug 18, 2016 11:24 am
Greetings.
(I tried searching, but I'm very bad at it.)
I was just wondering if anybody had a nagios plugin or script that would alarm, not on the script output itself, but if the script output has changed from what it used to be.
My basic thought was "save all of the results from the last hour, and if this result is different than any of those, then WARNING." In this way, I'd get a WARNING when it changed, the WARNING would stay active for about an hour, then it would revert to OK. But I would need some safety checks for things like "no previous data" and stuff. I presume I'll need a file to store my old data, along with some way to round-robin load-and-save-and-expire it.
I'm pretty good with perl and can probably write a script, although it won't be especially secure or robust. So if one already exists, it would probably be both quicker and better.
Thanks.
--EbH
(I tried searching, but I'm very bad at it.)
I was just wondering if anybody had a nagios plugin or script that would alarm, not on the script output itself, but if the script output has changed from what it used to be.
My basic thought was "save all of the results from the last hour, and if this result is different than any of those, then WARNING." In this way, I'd get a WARNING when it changed, the WARNING would stay active for about an hour, then it would revert to OK. But I would need some safety checks for things like "no previous data" and stuff. I presume I'll need a file to store my old data, along with some way to round-robin load-and-save-and-expire it.
I'm pretty good with perl and can probably write a script, although it won't be especially secure or robust. So if one already exists, it would probably be both quicker and better.
Thanks.
--EbH