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

Nagios Network Analyzer - My New Source Wont Start - Best Fix
Are you trying to resolve Source Not Starting in Nagios Network Analyzer?

This guide is for you.

Sometimes, our customers using Nagios report to us that when they add a new source in the Nagios network analyzer, it will not start automatically.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve related Nagios error.

In this context, we shall look into how to fix this Nagios error.

Causes and Fixes for Source Not Starting in Nagios ?

Generally while creating a new Source in Network Analyzer, it creates the directory structure for it. These folders will store flow data, the RRD data file and the processes pid file.

Usually, it starts the Source nfcapd or sfcapd automatically once the new directories are created.

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 automatically once it is finished creating the new directories.

Following are some of the common causes for this issue along with the method to fix it:

1.  Port already bound by another Source or program

Since the nfcapd or sfcapd process is binding to a port, that port must be available. We will not be able to collect flow data or even start the processes if it is not available.

We can do the following to fix this:

To fix this we need to change the port we can do this by doing the following:

i. First take the Source page

ii. And click on the Edit tab

iii. Now change the port to a different one.

iv. Finally, save the Source and start it.

2. The Source's directories missing from the /usr/local/nagiosna/var/ directory.

If Network Analyzer could not create the directory, it normally means that it cannot write to the parent directory.

We can do the following to fix this:

Check the permissions of the /usr/local/nagiosna/var directory and ensure that it has user/group of nna/nnacmd. 

Also, ensure that the group has read/write access to the directory.

Finally, we need to ensure that the apache user and nna user are in the nnacmd group.

3. The nfcapd service is out of semaphores (semget() error in bookkeeper.c)

This is an issue that can occur if we have around 127 sources collecting information.

We can do the following to fix this:

Firstly, we can check the system messages log using the following command:

$ tail /var/log/messages

We may get the following output:

nfcapd[37946]: semget() error in bookkeeper.c line

From the above result, we can understand that we are running low on semaphores.

With the following steps, we can increase the number of semaphores available to Nagios Network Analyzer.

It is better to use 2-4 times more than we had previously in all fields.

To determine the values of the four described semaphore parameters, run:

# cat /proc/sys/kernel/sem
250 32000 32 128

These values represent SEMMSL, SEMMNS, SEMOPM, and SEMMNI.

Alternatively, we can run:

# ipcs -ls

We can change all the four described semaphore parameters in the proc file system without reboot using the following command:

# echo 250 32000 100 128 > /proc/sys/kernel/sem

Alternatively, we can use sysctl to change it:

$ sysctl -w kernel.sem="250 32000 100 128"

To make the change permanent, add or change the following line in the file /etc/sysctl.conf.

This file is used during the boot process:

echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf

4. The Python module rrdtool not installed

When starting/restarting the nagiosna service in a terminal session, the following error can be seen:

Traceback (most recent call last):

File "/usr/local/nagiosna/bin/initialize_source.py", line 16, in <module>
import rrdtool
ImportError: No module named rrdtool

We can do the following to fix this:

We can resolve this by installing the rrdtool-python module with the following command:


$ yum install -y rrdtool-python

On Debian|Ubuntu

$ apt-get install -y python-rrdtool

After installing, we have to restart the nagiosna service:

On RHEL 7+|CentOS 7+|Debian|Ubuntu 16/18/20

$ systemctl restart nagiosna

[Need assistance with fixing Nagios error? We can help you. ]

Who We Are ?

Most prominent, efficient, and well-performing IT companies and software solutions.

Related Posts