For some reason notifications are not being sent from nagios when i unplug the network cable from one of the hosts being monitored.<br><br>Nagios recognizes that the hose is down but no notification...<br><br>[1246567497] HOST ALERT: psefilesrv;DOWN;SOFT;1;(No Information Returned From Host Check)<br>
[1246567528] Warning: Host check command '/usr/lib/nagios/plugins/check_ping -H 10.139.68.39 -w 3000.0,80% -c 5000.0,100% -p 5' for host 'psefilesrv' timed out after 30 seconds<br>[1246567528] HOST ALERT: psefilesrv;DOWN;SOFT;2;(No Information Returned From Host Check)<br>
[1246567559] Warning: Host check command '/usr/lib/nagios/plugins/check_ping -H 10.139.68.39 -w 3000.0,80% -c 5000.0,100% -p 5' for host 'psefilesrv' timed out after 30 seconds<br>[1246567559] HOST ALERT: psefilesrv;DOWN;HARD;3;(No Information Returned From Host Check)<br>
[1246567559] HOST NOTIFICATION: root;psefilesrv;DOWN;host-notify-by-email;(No Information Returned From Host Check)<br><br>Here is the host config...<br><br>define host{<br> host_name psefilesrv<br> alias misc<br>
address 10.139.68.39<br> use generic-host<br> check_command check_alive<br> notification_options d,r<br> max_check_attempts 3<br> check_interval 1<br> notification_interval 1<br>
notification_period 24x7<br> notifications_enabled 1<br> parents switch-office<br>}<br><br>And the command... <br><br>define command {<br> command_name check_alive<br> command_line /usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5<br>
}<br><br>Any thoughts to why this isn't working? Email notifications for other services is working fine. Maybe i need to add check_alive as a service?<br><br><br>Thanks,<br>JJ<br><br><br><br><br><br><br><br><div class="gmail_quote">
On Wed, Jul 1, 2009 at 3:17 PM, Jeremiah Jester <span dir="ltr"><<a href="mailto:jeremiahjester@gmail.com">jeremiahjester@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I removed it and notifications are still being sent for all services associated with this host. Thoughts?<br><font color="#888888"><br>JJ</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Wed, Jul 1, 2009 at 3:15 PM, Jon Angliss <span dir="ltr"><<a href="mailto:jon@netdork.net" target="_blank">jon@netdork.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Jeremiah Jester wrote:<br>
> Hmmm, tryied this...but not working. Also, i get an error when i specify<br>
> 'retry_interval'. maybe n agios3 only?<br>
><br>
> define host{<br>
> host_name psedev2<br>
> alias dev<br>
> check_command check-host-alive<br>
> notification_options d,r<br>
> max_check_attempts 3<br>
> check_interval 1<br>
> retry_interval 1<br>
> address 10.139.10.42<br>
> use generic-host<br>
> parents switch-office<br>
> }<br>
><br>
> Error log:<br>
> [1246481763] Error: Invalid host object directive 'retry_interval'.<br>
> [1246481763] Error: Could not add object property in file<br>
> '/etc/nagios2/conf.d/generic-host_nagios2.cfg' on line 143.<br>
> [1246481763] Bailing out due to one or more errors encountered in the<br>
> configuration files. Run Nagios from the command line with the -v<br>
> option to verify your config before restarting. (PID=27490)<br>
<br>
</div>Yep, that'd be a nagios 3 option. I'd not realized (or maybe<br>
missed) you were using v2. Just remove that option.<br>
<br>
--<br>
<div>Jon Angliss<br>
<<a href="mailto:jon@netdork.net" target="_blank">jon@netdork.net</a>><br>
<br>
<br>
><br>
><br>
> Thanks,<br>
> JJ<br>
><br>
><br>
> On Tue, Jun 30, 2009 at 9:08 PM, Jon Angliss <<a href="mailto:jon@netdork.net" target="_blank">jon@netdork.net</a><br>
</div><div><div></div><div>> <mailto:<a href="mailto:jon@netdork.net" target="_blank">jon@netdork.net</a>>> wrote:<br>
><br>
> Jeremiah Jester wrote:<br>
> > Jon,<br>
> ><br>
> > Thanks for the reply. I've been struggling with this for some<br>
> days. Can<br>
> > you give me an example of what how to define this and in what file? I<br>
> > would appreciate your help.<br>
><br>
> Files don't really matter. Nagios loads them all, and processes.<br>
> Its up to you how you want to format. Sometimes it's easier to<br>
> group by type (hosts, services, commands, etc), and others by<br>
> location (server room, etc). How you format is up to you. If you<br>
> want, you can even bundle it all in a single file.<br>
><br>
> Lines ending in \ are wrapped and should appear on a single line in<br>
> your config.<br>
><br>
> define command {<br>
> command_name check-host-alive<br>
> command_line $USER1$/check_ping -H $HOSTADDRESS$ \<br>
> -w 3000.0,80% -c 5000.0,100% \<br>
> -p 5<br>
> }<br>
><br>
> define command {<br>
> command_name check_http<br>
> command_line $USER1$/check_http -H $HOSTNAME$<br>
> }<br>
><br>
> define host {<br>
> host_name myhost<br>
> address 1.1.1.1<br>
> check_command check-host-alive<br>
> notification_options d,r<br>
> check_period All<br>
> max_check_attempts 3<br>
> check_interval 1<br>
> retry_interval 1<br>
> contact_groups mycontacts<br>
> }<br>
><br>
> define service {<br>
> host_name myhost<br>
> check_command check_http<br>
> {.. other stuff here .. }<br>
> }<br>
><br>
> This will execute check_http against the "myhost". check-host-alive<br>
> will be executed every 1 minute. If check-host-alive fails 3 times,<br>
> host is considered down, and alerts for check_http will be<br>
> suppressed. You should read up on host checks [1], service checks<br>
> [2], and notifications [3].<br>
><br>
> > Also, I've not seen v3 in the repsository but maybe i need to<br>
> change my<br>
> > sources?<br>
><br>
> You didn't mention which version of ubuntu you were using, but<br>
> jaunty has nagios3...<br>
><br>
> <a href="http://packages.ubuntu.com/jaunty/nagios3" target="_blank">http://packages.ubuntu.com/jaunty/nagios3</a><br>
><br>
><br>
><br>
> [1]: <a href="http://nagios.sourceforge.net/docs/3_0/hostchecks.html" target="_blank">http://nagios.sourceforge.net/docs/3_0/hostchecks.html</a><br>
> [2]: <a href="http://nagios.sourceforge.net/docs/3_0/servicechecks.html" target="_blank">http://nagios.sourceforge.net/docs/3_0/servicechecks.html</a><br>
> [3]: <a href="http://nagios.sourceforge.net/docs/3_0/notifications.html" target="_blank">http://nagios.sourceforge.net/docs/3_0/notifications.html</a><br>
><br>
> --<br>
> Jon Angliss<br>
</div></div>> <<a href="mailto:jon@netdork.net" target="_blank">jon@netdork.net</a> <mailto:<a href="mailto:jon@netdork.net" target="_blank">jon@netdork.net</a>>><br>
><br>
><br>
<font color="#888888"><br>
<br>
--<br>
</font><div><div></div><div>Jon Angliss<br>
<<a href="mailto:jon@netdork.net" target="_blank">jon@netdork.net</a>><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>