Page 2 of 3

Re: Alerts not working

Posted: Fri Jul 26, 2019 3:59 pm
by benjaminsmith
Hi Lance,
Test message worked just fine. What the easiest way to get you that file. I'm not sure how to get it.
First make sure you have enabled logging under Email Settings, and you can either log in to the server and pull the file from /usr/local/nagiosxi/tmp/phpmailer.log, or send us your system profile. Thanks.

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message and then reply to this post to bring it up in the queue.

Re: Alerts not working

Posted: Fri Jul 26, 2019 4:05 pm
by lmiltchev
Also, open a SSH (putty) session to your Nagios XI server, run the following commands and show the output.

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
echo $?
/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:
echo $?

Re: Alerts not working

Posted: Mon Jul 29, 2019 11:41 am
by lance.peterson
The log was not enabled. I enabled it and ran the test email. Attached is the profile.


Also I tried running that command but I cannot putty into with with root or nagiosadmin using the password I know of.


Moderator's Note: The profile was shared with the support team but was removed from the public forum.

Re: Alerts not working

Posted: Mon Jul 29, 2019 4:40 pm
by tgriep
I feel the issue is with the user account settings so can you run the following as root on the nagios server and post the /tmp/info.txt file.

Code: Select all

echo 'select * from xi_users;' | psql nagiosxi nagiosxi -t >/tmp/info.txt
echo 'select * from xi_usermeta;' | psql nagiosxi nagiosxi -t >>/tmp/info.txt
echo 'select * from xi_options;' | psql pnagiosxi nagiosxi |grep mail >>/tmp/info.txt
echo 'select * from xi_options;' | psql pnagiosxi nagiosxi |grep smtp >>/tmp/info.txt
I know you said that you do not know the root password but you will need it to run the above commands.
If you are using one of the Nagios OVA files, the password would be nagiosxi

If you cannot get the root password, login as the user you are having issue with, click on their username in the top right corner.
Click on the Notification Preferences menu, screen capture that and upload that to the post.

Re: Alerts not working

Posted: Tue Jul 30, 2019 7:59 am
by lance.peterson
Getting some errors sending that. Do I need to remove the P?

Re: Alerts not working

Posted: Tue Jul 30, 2019 8:41 am
by tgriep
Yes, the p needs to be removed.
Sorry about that, I missed it in the post.

Re: Alerts not working

Posted: Tue Jul 30, 2019 8:58 am
by lance.peterson
I did the commands you asked. I didn't get any email or anything like that.

Also in response to the previous message above here are the results from that. See attachment.

Re: Alerts not working

Posted: Tue Jul 30, 2019 9:14 am
by lmiltchev
We need to see the info.txt file that was generated in the /tmp directory from running the commands, provided by @tgriep. Can you upload it to the forum?

The voltage was 123, so let's see if "less than" thresholds (using ":" after the value) works as expected. Run the following commands, and show the output:

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 300: -c 200:
echo $?
You should see a CRITICAL in the output, and exit code "2". If this is the case, this would mean that the plugin works as expected and the issue has to do with your email settings. Reviewing the "info.txt" file should help.

Re: Alerts not working

Posted: Tue Jul 30, 2019 10:15 am
by lance.peterson
How do I get the text file out if it didn't email out via the command prior?

See attachment for critical.

Re: Alerts not working

Posted: Tue Jul 30, 2019 10:29 am
by lmiltchev
You can transfer the file to your computer (workstation) via some FTP program, such as WinSCP, FileZilla, etc.