Notification on Stalk
Hugo van der Kooij
hvdkooij at vanderkooij.org
Wed May 9 07:13:26 CEST 2007
On Tue, 8 May 2007, Petersen, Mark wrote:
> I've searched high and low for the answer to this. It seems that
> because nagios just checks exit status, its not easy to create a
> notification on stalking. I'm wondering if I can definte additional
> exit codes as critical (without modifying the source,) or if there is
> another soltuion to this.
>
> For instance, say I'm checking disk space. Warn at 85%, Crit at 90%. I
> also want a notification at 95,96,97,98,99,100%. I could easily exit 95
> for 95%, 96 for 96%, etc. I believe this creates an unknown message.
> If I exit at 96, since this is a different exit code (but still unknown)
> would I get another notification? I know, I can test this, but it seems
> clunky and I don't like the unknown status issue for historical
> tracking.
>
> Volatile services with passive checks that only submit on change is
> another option, but this presents issues with needing to do freshness
> checking and wanting to have active checks as much as possible.
Based on the other solutions you may have a few options that are close.
You might get by if you are willing to write your own custom notification
script. Nagios should notify every N minutes to the script as long as a
warning or critical level exists.
The scripts should keep progress of the performance data and only send out
a real message if the performance data merits it.
No modification of the check script is needed but a custom notifications
script.
Or if you write a custom check_disk to get rid of some of the details you
can use stalking. But with the current level of details it would fire up
every round. For exmple "DISK OK - free space: /boot 66 MB (70% inode=99%)"
The percentages are fine but the more exact counter will be a problem if
you enable stalking.
Or you write a wrapper script to loose some of the output so stalking
seems to make sense. Propably the easiest way to do it and the most native
Nagios solution.
Hugo.
--
hvdkooij at vanderkooij.org http://hugo.vanderkooij.org/
This message is using 100% recycled electrons.
Some men see computers as they are and say "Windows"
I use computers with Linux and say "Why Windows?"
(Thanks JFK, for the insight.)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list