Home » Categories » Products » Nagios XI » Troubleshooting » Common Problems

Nagios XI - Scheduled Downtime Not Working

Problem Description

When you attempt to scheduled downtime for a host or service the downtime never appears despite being informed it was successfully added.

In addition to this when you navigate to Home > Incident Management > Scheduled Downtime there are no entries.

This problem can be caused by the Nagios XI server being unable to resolve "localhost".

 

 

Diagnosing The Problem

Open an SSH session to your Nagios XI server and execute the following commands:

tail -f /var/log/httpd/error_log

 

Now go into the XI interface and attempt to schedule downtime for a host or service.

You receive output similar to the following:

[Tue Oct 11 13:49:55 2016] [error] [client 10.25.254.50] Couldn't resolve host 'localhost', referer: http://10.25.5.12/nagiosxi/includes/components/xicore/downtime.php?cmd=schedule&type=host
[Tue Oct 11 13:49:55 2016] [error] [client 10.25.254.50] Couldn't resolve host 'localhost', referer: http://10.25.5.12/nagiosxi/includes/components/xicore/downtime.php

 

You can see that the log file is complaining that it cannot resolve localhost.

If you execute the following command you can see the contents of the /etc/hosts file:

cat /etc/hosts

 

Here is the output:

127.0.0.1    localhost.localdomain    localhost.localdomain    localhost4    localhost4.localdomain4        xi-c6x-x64
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 xi-c6x-x64

 

If you look at the output you can see that there are no "localhost" entries, there are similar entries but not one for "localhost".

 

 

Resolving The Problem

Edit your /etc/hosts file and make sure there are localhost entries. For example:

127.0.0.1    localhost.localdomain    localhost.localdomain    localhost4    localhost4.localdomain4    localhost    xi-c6x-x64
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost xi-c6x-x64

 

The last step is to restart the Apache service using one of the commands below:

RHEL 6 | CentOS 6 | Oracle Linux 6

service httpd restart

 

RHEL 7 | CentOS 7 | Oracle Linux 7

systemctl restart httpd.service

 

Ubuntu 14

service apache2 restart

 

Debian | Ubuntu 16/18

systemctl restart apache2.service

 

 

Now go and schedule downtime, your problem should be resolved.

 

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios XI - Best Practices - NWC15
Viewed 1373 times since Thu, Feb 4, 2016
Nagios XI - CentOS 6 Installation Problems XI 2011R1.7 2011R1.8
Viewed 893 times since Tue, Feb 2, 2016
Nagios XI - Bandwidth Graphs Showing 0Mb/s in Non-English Systems
Viewed 1498 times since Fri, Dec 19, 2014
Nagios XI - Empty Screen for Wizard, Component, Dashlet
Viewed 1050 times since Wed, Jan 27, 2016
Nagios XI - Problems Using Nagios XI With Proxies
Viewed 3005 times since Mon, Jan 25, 2016
Nagios XI - Installing XI Fails To Install Dependency pymssql
Viewed 1168 times since Mon, Oct 17, 2016
Nagios XI - SNMPTT Service generates Cannot find module errors
Viewed 1005 times since Sun, Apr 9, 2017
Nagios XI - WMI Troubleshooting
Viewed 4972 times since Mon, Apr 24, 2017
Nagios XI - Running Out Of Disk Space On The Nagios XI VM
Viewed 3494 times since Tue, Jan 27, 2015
Nagios XI - Some BPI Checks Show "Unknown BPI Group Index" After Upgrade
Viewed 392 times since Wed, Sep 18, 2019