Explore information related to nagios error

Nagios NDOUtils Message Queue Exceeded – Fix it Now

This article covers how to resolve the Nagios error, NDOUtils: Message Queue Exceeded error occurs when the amount of messages increases.

NDOUtils uses the operating system kernel message queue. As the amount of messages increases the kernel settings need to be tuned to allow more messages to be queued and processed.

A flood of messages in the /var/log/messages related to ndo2db like:

ndo2db: Error: max retries exceeded sending message to queue. Kernel queue parameters may neeed to be tuned. See README.
ndo2db: Warning: queue send error, retrying... 


Nature of this Nagios error:

In Nagios you experience the following symptoms:

1. Missing hosts or services or status data

2. Takes a very long time to restart the Nagios process

3. Unusually high CPU load



How to fix Nagios error, NDOUtils: Message Queue Exceeded ?

The following commands are for the msgmni option. 

For the grep command you executed previously:

i. If it did not return output, this command will add the setting to the /etc/sysctl.conf file:

$ echo 'kernel.msgmni = 512000' >> /etc/sysctl.conf

2. If it did return output, this command will update the setting in the /etc/sysctl.conf file:

$ sed -i 's/^kernel\.msgmni.*/kernel\.msgmni = 512000/g' /etc/sysctl.conf

3. After making those changes, execute the following command:

$ sysctl -p

4. You need to restart services using the commands below:

$ systemctl stop nagios.service
$ systemctl restart ndo2db.service
$ systemctl start nagios.service

Read More



Nagios Network Analyzer - My New Source Wont Start - Best Fix

This article covers method to resolve Source Not Starting in Nagios for our customers. Generally, it happens when you added a new source, but it did not automatically start.

When creating a new Source in Network Analyzer it creates the directory structure - the folders where it will store flow data, the RRD data file, and the processes pid file. It also starts the Source (nfcapd or sfcapd) automatically once it's finished creating the new directories. Here's a couple reasons why it may not be starting.


This problem can be resolved by installing the rrdtool-python module the following command:

$ yum install -y rrdtool-python

Once installed restart the nagiosna service:

$ systemctl restart nagiosna

The Source should now start

Read More



Nagios Failed to Parse Date Error - Fix it now

This article covers Nagios Failed to Parse Date Error.

Basically, the logs coming in on the same input need to use the same formatting.
To fix this Nagios error,  make sure that all devices use the same date format or configure another input for these devices.
For example:

syslog {
    port => xxxx
    type => 'alternative-syslog'
    tags => 'alternative Linux-Max'
}

Read More



Nagios No lock file found - Fix this error now

This article covers different methods to resolve the error, Nagios: No lock file found.  Basically, "No lock file found in /usr/local/nagios/var/nagios.lock" means that the service isn't running.

To fix this Nagios error:
Execute the command:

$ /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

Running the command above simply starts the nagios daemon and points it to a specific config file.
The advantage to running this command manually over systemd is that when you run "service nagios start" this typically calls the /etc/rc.d/init.d/nagios script which contains a line with parametrized environment variables:

$NagiosBin -d $NagiosCfgFile

Because every system is different, not specifying either the bin nor config directories could lead to nagios breaking (stopping) when it tries to start using the default installation directory paths

Read More



Administration Page Fails To Display in Nagios Log Server

This article covers how to resolve the 'Administration Page Fails To Display' in the Nagios Log Server issue for our customers.


To fix this Nagios error, all you need to do is to:
1. Increase the PHP  memory_limit in php.ini file.
You can execute the following command:

$ find /etc -name php.ini

2. Then make the necessary changes.
3. After which you should restart Apache for the changes to take effect using one of the commands below:

$ systemctl restart apache2.service

4. Once the service has restarted, the Administration page will be accessible.

If the problem persists, please increase the value again.


When using the vi editor in Linux:
1. To make changes press i on the keyboard first to enter insert mode
2. Press Esc to exit insert mode
3. When you have finished, save the changes in vi by typing :wq and press Enter

Read More



Bad interpreter No such file or directory error in Nagios

This article covers Nagios error, 'bad interpreter no such file or directory'. Nagios bad interpreter: No such file or directory error occurs after uploading a plugin which is in a "Windows" format instead of a "Unix" format. It has to do with the line endings / carriage returns.

To fix this error, you will convert the file to a Unix format:

$ yum install -y dos2unix
$ dos2unix /usr/local/nagios/libexec/check_apc_pdu_load.sh

Read More



Nagios error Could not bind to the LDAP server - Fix it now

This article covers tips to resolve 'could not bind to the LDAP server. Nagios error. This cause secure lookup on 636 or using TLS to fail.

The check_ldap plugin makes use of OpenLDAP, the OpenLDAP package is installed as part of the NagiosXI installation because the plugins have dependencies on it but it is left in a non-configured state.

To resolve the problem on each node (wtgc-nagios-01 and wtgc-nagios-02) the following is required, firstly edit the file: /etc/openldap/ldap.conf and at the bottom of the file add the following line:

TLS_REQCERT allow

Read More



Failed to register iobroker in Nagios - Solved

This article covers how to resolve Nagios error, Failed to register iobroker. This problem can occur when custom operating system limits restrict the max number of processes that can be executed.


Custom limits are defined in the /etc/security/limits.conf file

You will need to increase the hard and soft values to resolve the problems you are experiencing, for example:

# harden against fork-bombs
*               hard    nproc           10000
*               soft    nproc           10000
root            hard    nproc           10000
root            soft    nproc           10000

 After making the changes it is recommended to reboot the operating system to ensure the limits are applied.

If the change does not fix the problem then you should increase the values again.

Read More



Event Data getting Stale in Nagios - Resolve it Now

This article covers methods to fix Event Data getting Stale in Nagios. Basically, you will see the causes for event data getting stale in Nagios. There is a known bug relating to event data in versions 2009R1.4B-2011R1.1.

This bug has been patched and will be available in releases later than the versions posted above, but if you're experiencing this error, and/or the nagios service is taking an excessively long time to start, you may have a corrupted mysql table that needs repair.


To fix this Nagios error:

1. Stop the following services:

$ service nagios stop
$ service ndo2db stop
$ service mysqld stop

2. Run the repair script for mysql tables:

/usr/local/nagiosxi/scripts/repairmysql.sh nagios

3. Unzip and copy the the following dbmaint file to /usr/local/nagiosxi/cron/. This will overwrite the previous version.

$ cd /tmp
$ wget http://assets.nagios.com/downloads/nagiosxi/patches/dbmaint.zip
$ unzip dbmaint.zip
$ chmod +x dbmaint.php
$ cp dbmaint.php /usr/local/nagiosxi/cron

Read More



MRTG Reports SNMP_Session Errors in Nagios - Fix it now

This article covers how to fix Nagios issue, MRTG Reports SNMP_Session Errors while using Nagios.

You can see this error when running MRTG at the command line such as:

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok


When this Nagios error happens, you will receive error similar to this:

Subroutine SNMP_Session::pack_sockaddr_in6 redefined at /usr/local/share/perl5/Exporter.pm line 66.

at /usr/bin/../lib/mrtg2/SNMP_Session.pm line 149.

Read More



Core Configuration Manager Displaying Issues in Nagios XI

This article covers how to resolve the issue with Nagios XI that stops displaying the core configuration manager or the components inside the core configuration manager.

If this is the case, When using Core Configuration Manager (CCM), the interface does not work as expected, it does not appear to display correctly and generally it feels like there is a bug. This issues is related to the web browsers implementation of JavaScript. If possible, use a browser that more closely implements the ECMAScript Language Specification.

A quick way to see if this is the problem is to see if you experience the same issue using another web browser.


To fix this Nagios configuration Problem:

1. In the event of the the Core Config Manager not visible or components missing from the page, this generally relates to a proxy and the following steps may resolve this issue:

pear config-set http_proxy http://proxy:port

2. Make sure to change proxy:port to match your proxy server, example:

pear config-set http_proxy http://192.168.44.20:8080

3. Then execute the following:

pear install HTML_Template_IT

 After performing these steps go back to CCM and see if it works.

Read More



Configuration verification failed in Nagios - Fix it Now

This article covers fixes to this Nagios Configuration failed problem.

When you click the Show Errors link a message is shown that indicates the problem in the config files along with a line number for the config file. However when looking at the config file in a text editor, the line number does not appear to relate to the problem.


The Apply Configuration process is as follows:

i. New config files are temporarily written to disk

ii. Nagios verifies the config files are valid

iii. Temporary config files are made permanent

iv. Nagios service is restarted


When the verification step fails, the temporary files are discarded. Hence when you go to look at the file to look at the line number it references it is not valid as the temporary files now longer exist.


To fix Nagios Configuration Problem:

1. Open CCM

2. Tools > Config File Management

3. Click the Delete Files button

4. It will say "Successfully deleted all Host / Service Config Files"

5. Click the Write Configs Button

5. It will show an output of all the files it creates, in large deployments this step may take a long time .

6. Click the Verify Files button

7. The output should end with the error message you have experienced previously.

At this point, you can open an SSH session to your Nagios XI server and open the file in a text editor to investigate the problem.

Read More



Apply Configuration Fails in Nagios Server - Resolve this issue now

This article covers solutions to when Apply Configuration Fails in Nagios Server. This issue happens when the Nagios XI server is unable to resolve the "localhost".

The error message will look like this:

Apply Configuration fails with the following error:

Backend login to the Core Config Manager failed.
An error occurred while attempting to apply your configuration to Nagios Core.
Monitoring engine configuration files have been rolled back to their last known good checkpoint.


To resolve this Nagios Problem:

1. 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

2. After making these changes try and "Apply Configuration" from Core Configuration Manager and your problem should be resolved.

Read More



Apply Configuration never completes in Nagios - Fix this issue now

This article covers methods to resolve the issue, Apply Configuration never completes in Nagios. The backend components in Nagios XI require high level privileges, these are accommodated for in sudoers entries.

This allows for high level commands to be executed by scripts without requiring user input. If these entries are missing then they can cause unexpected results.


Sometimes when creating a large amount of objects the apply configuration process is taking longer than expected and PHP may time out or exceed limits.

These are defined in the php.ini file, The location of the php.inifile differs depending on your operating system / version. The following command will determine the location:

find /etc -name php.ini

If there are multiple results then the one in the apache directory is the one that needs changing.

Edit /etc/php.ini and increase these values:

max_execution_time = 60

max_input_time = 60

memory_limit = 256M

 

After making these changes you'll need to restart the Apache service using one of the commands below:

RHEL 7 | CentOS 7 | Oracle Linux 7

$ systemctl restart httpd.service

Debian | Ubuntu 16/18

$ systemctl restart apache2.service

Read More



Port 113 IDENT Requests - How to Disable it on Nagios

This article covers how to disable Port 113 IDENT Requests on Nagios. 

You are seeing port 113 return requests either from your Nagios XI server (when submitting NSCA passive results) to the originating host OR you are seeing port 113 return requests when checking NRPE services).

You will see this behavior on your firewall logs as you will most likely not have a firewall rule for port 113.

This is usually because you are running an NRPE check through XINETD with USERID included on the log_on_success or log_on_failure options in your remote hosts /etc/xinetd.d/nrpe file.

OR this could be because you are submitting passive results to the XI server through NSCA (which is running under XINETD) /etc/xinetd.d/nsca with the same options as above.


To disable Port 113 IDENT Requests:

1. Then remove the USERID option from the log_on_failure AND log_on_success to stop the IDENT from occurring. The file you need to change depends on:

i. NRPE on remote host

/etc/xinetd.d/nrpe

ii. NSCA on Nagios XI server

/etc/xinetd.d/nsca

2. After making the changes you need to restart the xinetd service using one of the commands below:

RHEL 7+ | CentOS 7+ | Oracle Linux 7+ | Debian | Ubuntu 16/18/20

$ systemctl restart xinetd.service


What is filter ident port 113?

Filter IDENT(port 113) (Enabled) IDENT allows hosts to query the device, and thus discover information about the host.

On the VPN Passthrough screen, you can configure the router to transparently pass IPSec, PPPoE, and PPTP traffic from internal hosts to external resources.

Read More



Segmentation fault in Nagios - Fix it Now

This article covers how to fix the Segmentation fault in Nagios.

A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core .

Segfaults are caused by a program trying to read or write an illegal memory location.


What does segmentation fault mean in Linux?

A segmentation fault is when your program attempts to access memory it has either not been assigned by the operating system, or is otherwise not allowed to access. "segmentation" is the concept of each process on your computer having its own distinct virtual address space.


Typical causes of a segmentation fault:

1. Attempting to access a nonexistent memory address (outside process's address space)

2. Attempting to access memory the program does not have rights to (such as kernel 3. structures in process context)

4. Attempting to write read-only memory (such as code segment)


To fix Segmentation Fault (“Core dumped”) in Ubuntu:

1. Remove the lock files present at different locations.

2. Remove repository cache.

3. Update and upgrade your repository cache.

4. Now upgrade your distribution, it will update your packages.

5. Find the broken packages and delete them forcefully.

Read More



Disable database UTF8 connectivity on Nagios - How to do it

This article covers how to configure disable UTF8 connectivity to the MySQL/MariaDB databases. By default Nagios XI uses UTF8 however sometimes this needs to be disabled to allow MySQL / MariaDB to define the connectivity method.

This configuration ensures that characters from different languages can be correctly stored and retrieved in the databases.


The Nagios XI Configuration Directive

The following configuration directive was added in Nagios XI 5.4.13:

$cfg['db_conn_utf8'] = 0;

 To determine if you currently have that directive enabled, establish a terminal session to your Nagios XI server as the root user and execute the following command:

$ grep db_conn_utf8 /usr/local/nagiosxi/html/config.inc.php

 If the grep command produces NO output then the directive does not exist in your configuration and it needs to be added. This can be added with the following command:

$ printf "\n\$cfg['db_conn_utf8'] = 0;\n" >> /usr/local/nagiosxi/html/config.inc.php

 

If the grep command produced output then it can be changed with the following command (sets it to 0):

$sed -i "s/db_conn_utf8'\] =.*/db_conn_utf8'\] = 0;/g" /usr/local/nagiosxi/html/config.inc.php

Defining the directive to 0 will resolve the issue you for garbled or ??? characters.


If you wanted to change it to 1 then use the following command:

$sed -i "s/db_conn_utf8'\] =.*/db_conn_utf8'\] = 1;/g" /usr/local/nagiosxi/html/config.inc.php

 

The change takes effect immediately.

Read More



Nagios Web interface not working after upgrade

This article will guide you on how to fix #Nagios web interface not #loading #issue as well as its cause.

Before fixing, First, you need to make sure you have installed all required nagios #packages like nagios3, nagios3-core, and nagios3-cgi. Ensure you did not miss any required package.

If you are still not able to login, you can look at apache configuration and use htpasswd tool to add new username/password to be authorized. You need to find a file like /etc/nagios3/htpasswd.users. This may also be different on redhat. You can recreate the file or create another username/password.

Read More



Create a Nagios log server instance in Amazon EC2 cloud

This article will guide you on how to create a #Nagios log server instance in the amazon ec2 #cloud. To enable these reports, simply enable Detailed Billing Reports With #Resources and Tags for your account. Then open up the Reports tab of the Billing #Console. From there you can look at the EC2 Instance Usage Report and the #EC2 Reserved Instance Utilization Report.

Read More



Debugging Bandwidth Performance Graphs in Nagios

This article will guide you through the steps to perform #debugging of #bandwidth #performance #graphs in #Nagios.

Read More



Logs Not Searchable or Not Coming In Nagios Log Server

This article will guide you in solving #Logs Not Searchable or Not Coming In #Nagios Log #Server which occurs in the process of running a query in the Nagios dashboard.

Read More



Running Out Of Disk Space On The Nagios XI VM

This article will guide you on how to fix 'running out of disk space on the Nagios' problem.

Read More



Nagios login screen redirects to itself Steps to fix it

This article will help to resolve Nagios login screen redirecting to itself which occurs due to a mismatch in the time zone can cause the Nagios login screen to redirects to itself after entering the login credentials.

Read More



Performance graph problems in Nagios

This article will help to fix performance issues in Nagios when performance graphs does not display the correct data even though their checks return true performance data. 

Read More



How to fix Nagios bandwidth graph showing 0 MB in Non-English Systems

This guide will show you the steps to fix Nagios bandwidth graph showing 0 MB issue.

Read More



Last Check Time Not Updating in Nagios XI

This guide will help you to solve Nagios error "Last Check Time Not Updating" which affects Nagios XI.

Read More



How to forward Windows logs to Nagios log server

This article will guide you on how to configure forwarding Windows logs to the Nagios log server.

Read More



How to fix Nagios error XI installation script fails when installing dependency pymssql

This article will help to fix Nagios error experienced during XI installation when its script fails in the process of installing dependency pymssql which occurs as a result of missing packages in the Server repositories. 

Read More



How to fix scheduled backups no longer working in Nagios

This article will guide you on how to solve Nagios scheduled backups failure which occurs when the database is currupted.

Read More



Nagios error while trying to delete host

This article will guide you on how to solve Nagios hosts deletion issues when you are not able to delete the host in Nagios.

Read More



How to fix Nagios error processing object config files

This article will guide and help you to fix Nagios failure to start error due to error processing object config files.

Read More



Unable to login to Nagios XI web interface

Sometimes, Nagios users experience login issues and are unable to Log into the Nagios XI web interface due to a number of reasons ranging from the wrong password to the SELinux policy.

Read More



Solution to Nagios access forbidden error 403

Most efficient way to fix Nagios access forbidden error 403.

Read More