Bobcares

wesupport

CLIENT AREACall Us 1-800-383-5193
Bobcares

wesupport

Call Us 1-800-383-5193
Bobcares

wesupport

Call Us 1-800-383-5193

Need help?

Our experts have had an average response time of 13.52 minutes in October 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Source Not Starting in Nagios Network Analyzer – How to fix

by | Apr 12, 2021

Wondering how to fix Source Not Starting in Nagios Network Analyzer. We can help you.

Often 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 Bobcares, we get requests from our customers to fix similar issues as a part of our Server Management Services.

Today, let’s see how our Support Engineers fix this issue for our customers.

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:

1. First take the Source page

2. And click on the Edit tab

3. Now change the port to a different one.

4. 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:

RHEL|CentOS

yum install -y rrdtool-python

Debian|Ubuntu

apt-get install -y python-rrdtool

After installing, we have to restart the nagiosna service:

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

systemctl restart nagiosna

[Need assistance? We can help you]

Conclusion

In short, we saw how our Support Engineers fix Source Not Starting in Nagios for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags