On Oct 06 12:29, Kelly Jones wrote: > What's the best way to simulate (not schedule) downtime in nagios? > > I want to "pretend" a service is down for a certain amount of time to > see what alerts nagios sends, etc.
Just to clarify, are you trying to simulate a service outage (as opposed to simulating a scheduled downtime) so you can test alerts, and perhaps notifications, in order to validate your configuration? > I've come up w/ two bad ways to do this: > > % Edit the config file to change the test to "check_dummy". I want to > run these "fire drills" via cron, and editing a file and restarting > nagios seems a little ugly. > > % Submit a passive check saying the service is down, and reschedule > the next check 4 hours later, so the service is 'down' for 4 > hours. This can be done using the nagios named pipe, so it's easy to > cron. Problem: doing things this way suppresses the alerts (when you > don't test a service, it doesn't send an alert). > > Thoughts? I use something similar to the second method to do ad hoc validation of alerts/notifications, by submitting passive results via an external command, though without diddling the service check scheduling. I'm a little confused by your last statement though... If you're only submitting a single passive check and then rescheduling the next check, of course there will be no alerts (and you'll likely never reach $max_check_attempts) - is there some reason you can't submit multiple passive check results? -tt ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Nagios-users mailing list Nagios-users@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