Nagios no notifica por telegram

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
itataje
Posts: 4
Joined: Mon Jan 06, 2025 6:05 am

Nagios no notifica por telegram

Post 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
bbahn
Posts: 382
Joined: Thu Jan 12, 2023 5:42 pm

Re: Nagios no notifica por telegram

Post 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.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
User avatar
lgute
Posts: 415
Joined: Mon Apr 06, 2020 2:49 pm

Re: Nagios no notifica por telegram

Post 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
Please let us know if you have any other questions or concerns.

-Laura
itataje
Posts: 4
Joined: Mon Jan 06, 2025 6:05 am

Re: Nagios no notifica por telegram

Post 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
itataje
Posts: 4
Joined: Mon Jan 06, 2025 6:05 am

Re: Nagios no notifica por telegram

Post 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
bbahn
Posts: 382
Joined: Thu Jan 12, 2023 5:42 pm

Re: Nagios no notifica por telegram

Post 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.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
itataje
Posts: 4
Joined: Mon Jan 06, 2025 6:05 am

Re: Nagios no notifica por telegram

Post 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.
bbahn
Posts: 382
Joined: Thu Jan 12, 2023 5:42 pm

Re: Nagios no notifica por telegram

Post 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.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
Locked