Bobcares

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 *

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

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF