Page 1 of 1

Nagios no notifica por telegram

Posted: Mon Jan 06, 2025 6:10 am
by itataje
Buenas, agradeceré me puedan apoyar por un tema que llevo varios meses sin resolver

1.- He configurado para que nagios notifique por telegram y funciona correctamente
2.- Cuando nagios ve que los hosts estan sin conexión ya no notifica los service.
3.- Tengo varios sensores donde estan deshabilitado el protocolo icmp para los host por tema de seguridad, pero quiero que me notifique de los SERVICE , al parecer nagios detecta al host en down y ya no notifica de los service, como puedo solucionarlo

Re: Nagios no notifica por telegram

Posted: Mon Jan 06, 2025 12:24 pm
by bbahn
Hello @itataje,

If I understand your issue correctly, your host is being detected as down since you've disabled ICMP, causing your services to no longer check as the host is down.

As a workaround, you can always set your host check to a dummy plugin that will always return up. For this, I recommend using the Nagios check_dummy plugin, which will return whatever you pass to it as your status, so if your host's command is $USER1$/check_dummy 0, then your host will always show as up and its services will be checked as if the host were reachable and up.

Re: Nagios no notifica por telegram

Posted: Mon Jan 06, 2025 1:16 pm
by lgute
Hi @itataje,

Thanks for reaching out. Something else you could try is to add host_down_disable_service_checks=0 to the nagios.cfg file, /usr/local/nagios/etc/nagios.cfg, then restart the nagios service.

I have not used this myself, so please let me know if this is helpful.

Documentation: configmain

Re: Nagios no notifica por telegram

Posted: Tue Jan 07, 2025 3:58 am
by itataje
Hola @bbahn

Bueno si lo estuve evaluando pero sería como última opción, ya que también tengo sensores únicamente de HOST (sólo ping) que deseo que me notifique ante alguna alerta.
Al configurar $USER1$/check_dummy 0 generaliza para todos los HOST
Igualmente muchas gracias por el aporte

Re: Nagios no notifica por telegram

Posted: Tue Jan 07, 2025 4:01 am
by itataje
Hola @lgute

Si fue uno de los primeras acciones que realicé pero no funcionó, aunque yo también entendía que ajustando ese comando debería funcionas los servicios sin considerar los HOST tal como indica
host_down_disable_service_checks=0

Pero no me funcionó

Igualmente agradezco tu aporte

Re: Nagios no notifica por telegram

Posted: Tue Jan 07, 2025 1:51 pm
by bbahn
@itataje,

If you just set the checks for hosts for which you have ICMP blocked to use check_dummy, the other hosts/services will be unaffected.

Re: Nagios no notifica por telegram

Posted: Wed Jan 08, 2025 6:38 am
by itataje
@bbahn
Muchas gracias, eso aplicaría a cada HOST?, tengo mas de 1800 sensores entre host y service.

Tambien eh probado colocando que las comprobaciones se realice un tiempo casi infinito, pero no me funciona porque como los sensores de HOST ya estan en DOWN ya no realiza comprobación.

Re: Nagios no notifica por telegram

Posted: Thu Jan 09, 2025 11:25 am
by bbahn
@itataje,

If you change the host checks for those hosts to check_dummy and have it return 0 (ok), then those hosts will be recognized as up again and thus their services will start being checked again.