Page 1 of 3

Alerts not working

Posted: Fri Jul 19, 2019 11:44 am
by lance.peterson
I setup and SNMP alert on a UPS for when the voltage goes below a 110 Volts so I get the alert, but I do not get an alert. If I change it so I get an alert above that same voltage I get the alert right away. Why would I not get the alerts when going below but do above?

Re: Alerts not working

Posted: Fri Jul 19, 2019 12:30 pm
by lmiltchev
You may see an alert in the nagios.log but you would receive an actual notification only if the services goes to HARD non-OK state or recovers from one. Was the service flapping when it went below the threshold? Was this a WARNING or a CRITICAL alert? It's possible that the xi user (contact) has configured his/her notification preferences in a way that notifications for some states are disabled.

Re: Alerts not working

Posted: Fri Jul 19, 2019 12:33 pm
by swolf
Hi @lance.peterson,

Would you mind showing us the exact check_command and arguments you used to configure this? There are a few different reasons this could happen and it'll be easier to determine if we can see your configs.

EDIT: It seems that @lmiltchev and I interpreted your issue differently. Are you having an issue where the alert shows in the log (and you don't get e-mailed), or an issue where you simply should get alerted and the alert never fires (i.e. the plugin does not go into a non-OK state).

Re: Alerts not working

Posted: Fri Jul 19, 2019 12:49 pm
by lance.peterson
I have the notification preferences selected for everything for test purposes and nothing is still coming through. I do see it in critical status on the Nagios console but I do not get alerted via email or text.

Attached is a screenshot of the config page with Arg1 copied below to show the whole thing.

-o .1.3.6.1.4.1.318.1.1.1.3.2.1.0 -C public -P 1 -l "V" -w 110: -c 110:

Do you need any other information beside this?

Re: Alerts not working

Posted: Fri Jul 19, 2019 2:52 pm
by lmiltchev
I do see it in critical status on the Nagios console but I do not get alerted via email or text.
Can you show us a screenshot of this page?

Also, go to Reports > State History > <your service> > State Type = Both > Run, and show a screenshot of that page too.

What is the output of the following command?

Code: Select all

/usr/local/nagios/libexec/check_snmp -H <ip address> -o .1.3.6.1.4.1.318.1.1.1.3.2.1.0 -C public -P 1 -l "V" -w 110: -c 110:

Re: Alerts not working

Posted: Fri Jul 19, 2019 2:59 pm
by lance.peterson
See attached screenshot.

WHere do I run that command?

Re: Alerts not working

Posted: Fri Jul 19, 2019 3:19 pm
by lmiltchev
WHere do I run that command?
Normally, you would have to open a SSH (putty) session to the Nagios XI server, logged in as root, and run the command from the command line. However, after seeing the screenshot from the State History report, I don't think I need to see the command and the output of it. The service was in a HARD CRITICAL and HARD OK state, so you should have received notifications.

In order to troubleshoot this further, let's check a few more things:

1. Show a screenshot of the Notifications report for the same time period (as in the State History report):
Reports > Notifications > Limit To = <your service> > Run

2. Show the service config.
CCM > Services > <your service> >View Config

3. Go to Admin > Email Settings, and show a screenshot of the page.

Re: Alerts not working

Posted: Fri Jul 19, 2019 4:24 pm
by lance.peterson
Couple notes.

I do get emials from other things.

Secondly I'm out of the office next monday and Tuesday so I won't be responding back until then.

See 3 screenshots.

Re: Alerts not working

Posted: Mon Jul 22, 2019 8:55 am
by lmiltchev
You can see from the Notifications report that nagios did send notifications for the CRITICAL and OK states of "Input Voltage" service, so it is not an issue with Nagios.

Most likely, notifications are not received because of your SMTP settings. Are you sure that you are using the correct username (lance.peterson)? Isn't that supposed to be an email? To be frank, I never used smtp-relay.gmail.com and I don't know if it is going to work without SSL/TLS.

Can you send a test email from the "Mail Settings" page? Do you receive the test? Do you see any errors in the /usr/local/nagiosxi/tmp/phpmailer.log?

Re: Alerts not working

Posted: Fri Jul 26, 2019 2:03 pm
by lance.peterson
I see it says it went critical but as you can see before I changed it so it was when the voltage was high I got a notification that worked fine. When I switched it so when the voltage went to zero that is when I do not get a notification. So I know my SMTP setting are fine, not to mention they work with every other issue. Is seems it just doesn't send anything when I have it set to send the notification on low voltage.

Username doesn't matter as it is not authenticating. It's just auto-filled there not actually saved.

Test message worked just fine. What the easiest way to get you that file. I'm not sure how to get it.