Page 1 of 1

Nagios is unable to send mails to mailbox & generate tickets

Posted: Fri Nov 30, 2018 11:57 am
by hoegh
Hi All,

We are not receiving tickets for the Nagios Critical Alerts.Some hosts are able to send alert and we receive tickets in ServiceNow for them but for the rest of the hosts/services we are only receiving alerts in Nagios and there is no mail in Nagios mailbox and hence no ticket in ServiceNow.
Suggest what can be done?

Thanks & Regards
Hoegh.

Re: Nagios is unable to send mails to mailbox & generate tic

Posted: Fri Nov 30, 2018 3:33 pm
by benjaminsmith
Hi @hoegh,

I've read through some of your previous posts and it looks like you've had a few issues with ServiceNow ticket creation. First of all, were you ever able to get it setup and working properly?
there is no mail in Nagios mailbox and hence no ticket in ServiceNow.
Did you assign the ServiceNow user to the host or service object ( see: https://support.nagios.com/kb/article.php?id=552 ).

Have you checked the nagios log file to see if the alerts were sent?

Go to end of /usr/local/nagios/var/nagios.log for the host or service, you should see a line like

Code: Select all

[1476416283] SERVICE NOTIFICATION: servicenow;localhost;Service Status - ntpd;UNKNOWN;notify-service-by-snt;ntpd is stopped
Please let me know.

Re: Nagios is unable to send mails to mailbox & generate tic

Posted: Sat Dec 01, 2018 10:55 pm
by hoegh
Hi Benjaminsmith,

Service Now host has already been assigned to the host.
And we did not found any such line at the end of /usr/local/nagios/var/nagios.log for the host or service.
Let us know what can be done now?

Thanks & Regards
Hoegh.

Re: Nagios is unable to send mails to mailbox & generate tic

Posted: Mon Dec 03, 2018 6:01 am
by hoegh
while verification in nagios CCM , getting following error , please let us know solution.

Error: There are no services defined!
Error: There are no hosts defined!
Error: Service notification command 'xi_service_notification_handler' specified for contact 'xi_default_contact' is not defined anywhere!
Error: Host notification command 'xi_host_notification_handler' specified for contact 'xi_default_contact' is not defined anywhere!
Error: Global host event handler command 'xi_host_event_handler' is not defined anywhere!
Error: Global service event handler command 'xi_service_event_handler' is not defined anywhere!

Nagios Core 4.4.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2018-08-16
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Error: There are no services defined!
Checked 0 services.
Error: There are no hosts defined!
Checked 0 hosts.
Checked 0 host groups.
Checked 0 service groups.
Error: Service notification command 'xi_service_notification_handler' specified for contact 'xi_default_contact' is not defined anywhere!
Error: Host notification command 'xi_host_notification_handler' specified for contact 'xi_default_contact' is not defined anywhere!
Checked 1 contacts.
Checked 0 contact groups.
Checked 0 commands.
Checked 1 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 0 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 1 timeperiods
Checking global event handlers...
Error: Global host event handler command 'xi_host_event_handler' is not defined anywhere!
Error: Global service event handler command 'xi_service_event_handler' is not defined anywhere!
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 6

***> One or more problems was encountered while running the pre-flight check...

Check your configuration file(s) to ensure that they contain valid
directives and data definitions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

Re: Nagios is unable to send mails to mailbox & generate tic

Posted: Mon Dec 03, 2018 11:50 am
by benjaminsmith
Hello @hoegh,

There's an issue with your configuration as nothing is defined:
Error: There are no services defined!
Checked 0 services.
Error: There are no hosts defined!
Checked 0 hosts.
Are you able to roll back to a previous configuration snapshot that is working as intended (other than the ServiceNow issue)? Go to Configure > Quick Tools > Configuration Snapshots.

Aslso, it would be very helpful for us if you can upload or PM me your system profile. 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 upload it to a cloud storage of your choice. You can share a link with me in a personal message.
After you upload the profile please post something in this thread to bring it up in the support queue.

Thank you.

Re: Nagios is unable to send mails to mailbox & generate tic

Posted: Mon Dec 10, 2018 2:54 am
by hoegh
Hi,

It was found that Config files were corrupted after upgrading Nagios to 5.5.7.
So we reverted back the Nagios to its earlier Snapshot & waiting for next upgrade from Nagios.
For Now everything working as expected, So please close this thread.

Thanks & Regards
Vipin
Hoegh

Re: Nagios is unable to send mails to mailbox & generate tic

Posted: Mon Dec 10, 2018 10:38 am
by benjaminsmith
Hello @hoegh,
For Now everything working as expected, So please close this thread
Great. Nagios 5.5.8 will mostly likely be released this week. When available, you can can review the Nagios XI changelog for more information.
https://www.nagios.com/downloads/nagios-xi/change-log/