Explore information related to nagios xi

Export config database in Nagios - How to do it ?

This article covers how to export config database in Nagios. Basically, Manual exports are useful when debugging configuration problems, including failures of Nagios XI to apply new configuration changes.

Read More

Monitor Website Defacement With Nagios XI - How to do it ?

This article covers how to Monitor Website Defacement With Nagios. Basically, Nagios XI can monitor for potential Website defacement using the Website Defacement monitoring wizard. 

Benefits of Website Defacement Detection:

  • Fast detection of security breaches.
  • Fast detection of outages and website hijacking.
  • Increased website and web application availability.
  • Capacity planning information for future web server and application upgrades.

Read More

Enable Memcached Support In Nagios - How to do it ?

This article covers how to enable Memcached for our customers. You can setup one or more memcached servers (hosts) for use by Nagios XI.

Each memcached host must have its firewall configured to allow traffic on TCP port 11211 to allow Nagios

XI to contact the memcached server. 

To create the firewall rules, run the commands:

$ ufw allow proto tcp from any to any port 11211
$ ufw reload

Read More

NCPA For Passive Checks – Using Nagios Remote Data Processor

This article covers how to configure NCPA For Passive Checks.

This guide will help you to configure the Nagios Cross Platform Agent (NCPA) to send passive check results to Nagios XI or Nagios Core using Nagios Remote Data Processor (NRDP).

Check results received from external devices / applications is what defines a Passive check. It's the responsibility of the external devices / applications to send the check results through, all Nagios [XI / Core] does is wait for the results (as opposed to Active checks where Nagios [XI / Core] is responsible for performing the check on a schedule).

Passive checks reduce the load on your Nagios [XI / Core] server by reducing the number of active checks run. Passive checks are also useful for security-related and asynchronous events you wish to monitor. 

Read More

WMI Error: Login to remote object in Nagios - Fix it Now ?

This article covers how to fix the WMI error for our customers. 

Sometimes the standard permission levels defined in the Monitoring Windows Using WMI documentation do not expose all the monitoring capabilities of the WMI plugin. 

In these cases you can elevate permissions by adding the WMI user to one of the two local groups:

  • Performance Monitor Users
  • Administrators

Read More

WMI ERROR: Retrieve result data - Fix it Now ?

This article covers process to fix WMI ERROR for our Customers. Due to a memory leak in the WMI functions in Windows 2008 and Windows 7, the system resources may be exhausted in the Windows system, resulting in the error message found above.

It has been seen that systeminfo and wmic commands executed via the command prompt fails in case this issue is present, displaying error messages such as:

The paging file is too small for this operation to complete.

Looking at the process list in the Windows system, it can be determined that the WmiPrvSE.exe process has allocated unusually large amounts of memory.

Read More

Service Not Listed in WMI Wizard in Nagios - Fix it Now ?

This article covers methods to tackle Service Not Listed in WMI Wizard in Nagios. Basically, Service may not get listed in WMI Wizard in Nagios due to reasons like lower value of Truncate Output Length or insufficient permission of the user account. Windows Management Instrumentation (WMI) is a part of Windows operating systems and can provide management data and operational information about those system. WMI can be used to automate administrative tasks on remote Windows-based computers. Nagios Core and Nagios XI are capable of monitoring Windows machines via WMI. .

To Check the permissions of the files, use this command:

ls -ls /tmp/*.state

Here you can see that the root user/group is the owner of the file:

-rw-r--r-- 1 root root 91 Apr 24 16:10 /tmp/cwpss_checkcpu__1025143___.state

The simplest option is to delete the files with this command:

rm -rf /tmp/*.state

Read More

Permission denied WMI error in Nagios - Fix it Now ?

This article covers methods to fix Nagios error WMI Remote "Access Denied". Basically, Nagios supports WMI monitoring, which provides admins with a simple method of monitoring their Windows servers and workstations without having to install or configure agents. 

How to fix DCOM permission ?

  • Open Dcomcnfg.
  • Expand Component Service -> Computers -> My computer.
  • Go to the properties of My Computer.
  • Select the COM Security Tab.
  • Click on "Edit Limits" under Access Permissions, and ensure "Everyone" user group has "Local Access" and "Remote Access" permission.
  • Click on the "Edit Limit" for the launch and activation permissions, and ensure "Everyone" user group has "Local Activation" and "Local Launch" permission.
  • Highlight "DCOM Config" node, and right click "Windows Management and Instruments", and click Properties.
  • <Please add the steps to check Launch and Activation Permissions, Access Permissions, Configuration Permissions based on the default of Windows Server 2008>.

How to fix Permission for the user to the WMI namespace ?

  • Open WMImgmt.msc.
  • Go to the Properties of WMI Control.
  • Go to the Security Tab.
  • Select "Root" and open "Security".
  • Ensure "Authenticated Users" has "Execute Methods", "Provider Right" and "Enable Account" right; ensure Administrators has all permission.

How to Verify WMI Impersonation Rights?

  • Click Start, click Run, type gpedit.msc, and then click OK.
  • Under Local Computer Policy, expand Computer Configuration, and then expand Windows Settings.
  • Expand Security Settings, expand Local Policies, and then click User Rights Assignment.
  • Verify that the SERVICE account is specifically granted Impersonate a client after authentication rights. 

Read More

Install WMI Client in Nagios XI Server for Windows monitoring

This article covers how to perform the installation of the WMI Client in Nagios. Nagios provides complete monitoring of Windows operating systems via WMI – including operating system metrics, service state, process state, file system usage, and more. 

Windows Management Instrumentation (WMI) is a technology that allows for agentless monitoring of Windows servers and workstations.

Agentless technologies like WMI and SNMP allow IT administrator to deploy monitoring solutions without having to install agent software on each monitored system.

Read More

Import Config Files From Nagios Core into Nagios XI

This article covers method to Import Config Files From Nagios Core into Nagios XI.

Importing configuration files automates setting up your existing Hosts, Services, Hostgroups, Servicegroups, and Host/Service Templates in your Nagios XI installation.

To Import Configuration Files Into Nagios XI:

1. In CCM expand Tools and select Config File Management. 

2. Click the Write Configs button to create / update the config files on the Nagios XI server. 

3. You can see in the screenshot to the right that the host and service config files were created and the existing hostgroups and commands config files were updated.

Read More

Nagios – Monitor hosts using SSH: How to use the plugin ?

This article covers how to monitor Nagios using SSH. 

In order to monitor Linux hosts using the Nagios check_by_ssh plugin, there are a few prerequisites that must be met:

  • Create a Nagios user for monitoring on the host to be monitored.
  • Configure passwordless SSH authentication as nagios user on host to monitor.
  • Install Nagios plugins on the host to monitor.

To Create a Nagios user:

Login to the host to monitor and create a user called nagios and set the login password.

useradd -m nagios
passwd nagios

Read More

Restart Linux Services With NCPA in Nagios - How to do it Now ?

This article covers how to go about Restarting Linux Services With NCPA. In the configuration section you'll find that you will need to restart the services each time configuration changes are made. You can also view the services in the windows services administration panel, but you can also do it easily from the command line. This is an example for CentOS.

NCPA is an advanced, cross-platform agent that can be installed on Windows / Linux / AIX / Mac OS X machines. Target Audience. This document is intended for use by both Nagios administrators and users who wish to use NCPA. Installing NCPA.

How do I know if Nagios is installed?

Easiest way to check the Nagios Core version is using the Nagios GUI.

# /usr/local/nagios/bin/nagios –help

Read More

SNMP Trap Hardening in Nagios - How it Works ?

This article covers how to go about SNMP Trap Hardening in Nagios.

When using the vi editor:

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


How to Send Test Trap ?

When working through this documentation you may want to test the changes by sending a test trap. The following KB article provides examples on how to send a test trap, which can be very helpful:

How To Send A SNMP Test Trap ?

When a test trap is received on the Nagios XI server it should be logged in the /var/log/snmptt/snmpttunknown.log file.

The default SNMP Trap configuration is stored in the /etc/snmp/snmptrapd.conf file and contains just two lines:

disableAuthorization yes
traphandle default /usr/sbin/snmptthandler

Read More

SNMP Trap v3 Configuration in Nagios - How to get it done ?

This article covers How to configure SNMP Trap v3 on the Nagios XI server.

The main difference between v2 and v3 traps is the authentication mechanisms. v2 is much simpler by design whereas v3 has multiple layers of authentication to strengthen it. Probably the biggest difference is that the SNMP Trap Daemon (snmptrapd) is configured by default to accept v2 traps from any device regardless of what SNMP community is provided. 

However snmptrapd cannot be configured to accept traps v3 from any device, it must be configured before it can receive an SNMP v3 trap.

The default SNMP Trap configuration is stored in the /etc/snmp/snmptrapd.conf file and contains just two lines:

disableAuthorization yes
traphandle default /usr/sbin/snmptthandler


The disableAuthorization directive allows SNMP v2 traps from any device to be sent to Nagios XI. 

Even if this line exists the Nagios XI server will not be able to receive SNMP v3 traps unless the server has been specifically configured for SNMP v3 traps.

Read More

Graphs not recording for ICMP and ping checks - Fix it Now ?

This article covers method to fix Nagios error, Graphs not recording for ICMP and ping checks.

This problem happens after upgrading to Nagios XI 2014.

Solution to Nagios XI ICMP and Ping Checks Stopped Graphing:

1. First a Perl package needs to be installed using one of the commands below:

$ apt-get install -y librrd-simple-perl

2. Download and unzip the required files:

cd /tmp
wget https://assets.nagios.com/downloads/nagiosxi/scripts/rrd_ds_fix.zip
unzip rrd_ds_fix.zip

3. To run the script with RRD backups:

./fix_ds_quantity.sh -d /usr/local/nagios/share/perfdata/

Read More

Nagios error Unable To Login Using Two Factor Authentication

This article covers how to resolve Two Factor Authentication error in Nagios. 

To Reset nagiosadmin account Password:

1. Open an SSH or direct console session to your Nagios XI host and execute the following command:

/usr/local/nagiosxi/scripts/reset_nagiosadmin_password.php --password=newpassword

Note: If you would like to use special characters in your password, you should escape them with "\".

For example, if you want to set your new password to be "$new password#", then you can run:

/usr/local/nagiosxi/scripts/reset_nagiosadmin_password.php --password=\$new\ password\#

Read More

Reset Upgrade Status In Nagios Web Interface - How to Perform it ?

This article covers how to Reset Upgrade Status In Nagios Web Interface.

When upgrading Nagios XI using the web interface the upgrade progress may stall with the message "Upgrade in progress". 

Sometimes you will need to clear this message manually due to unforeseen circumstances, this guide explains how to clear the message.

To Reset Upgrade Status in Nagios:

The following command will reset the upgrade status on Nagios XI (using the default username and password listed above):

For MySQL/MariaDB:

mysql -u'nagiosxi' -p'n@gweb' nagiosxi -e "update xi_commands set status_code = '2' where command = '1120';"

Read More

Nagios mysql_error out of range value for column - Fix it now ?

This article covers Nagios error, mysql_error out of range value for column which is evident in the /var/log/messages file on the Nagios XI server.

To resolve this issue you will need to define the SQL Mode in the MySQL / MariaDB my.cnf configuration file:

1. Locate the [mysqld] section and check to see if there is an sql_mode already defined:

# Recommended in standard MySQL setup

2. If the sql_mode= line already exists you will need to replace it with the following. 

If the line does not exist you will need to add the following line:


Read More

Empty Screen in Nagios XI for Wizard - Fix it Now ?

This article covers ways to fix 'Empty Screen in Nagios XI' for our customers. In some pages of XI you may come across empty screens, such as no configuration wizards appearing under the Configure menu.
When plugins, components or wizards are not installed through the proper menus, this creates problems in Nagios XI, such as "wiping out" all wizards, so they can not be viewed in the Web interface, blank pages in the Web browser and other weird behaviors.

To fix this Nagios error:

Remove the problematic component/wizard by running in terminal as a root:

$ rm -rf /usr/local/nagiosxi/html/includes/components/somedashlet
$ rm -rf /usr/local/nagiosxi/html/includes/components/somecomponent
$ rm -rf /usr/local/nagiosxi/html/includes/configwizards/somewizard

Read More

Nagios error Service check timed out after n Seconds

This article covers how to resolve 'Service check timed out after n Seconds' error for our customers.

You can increase the timeout on the check, though you will have to alter the check in XI and the plugin timeout in the ncpa.cfg file on the remote host.

If it is related to Nagios XI check_xi_ncpa Timeout:

This timeout is how long the check_xi_ncpa command on the Nagios XI server will wait for a response from the NCPA agent. 

By default the timeout is not set, thereby defaulting to the plugin timeout or the global timeout.

1. In the Nagios XI web interface navigate to Configure > Core Config Manager > Commands. 

2. This brings up the Commands page, use the Search field to search for ncpa and click Search.

3. Click the check_xi_ncpa command.

4. You can change the timeout in Nagios XI with the switch -T in the check_xi_ncpa command.

5. In the Command Line, add -T <time value in seconds> after $HOSTADDRESS$. Ex. -T 120

6. Save your changes and then click the Apply Configuration button.

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

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

Install NDOUtils in Ubuntu - Do it now

This article covers how to install NDOUtils in Ubuntu. NDOUtils is basically the Database Output for Nagios Core. 

NDOUtils stands for Nagios Data Output Utilities which is an addon that allows you to move status and event information from Nagios to a MySQL Database for later retrieval and processing.

NDOUtils consists of the following parts:

1. The NDOMOD event broker module. This module is intended to be loaded by the Nagios process at runtime. Its only role is to dump all events and data from Nagios to a TCP socket or a regular file or Unix domain socket on the local filesystem somewhere. If you want Realtime transfer of data to MySQL, dump the data to a TCP or Unix domain socket. If you want delayed transfer of data into MySQL (i.e. you need to transfer the data to another host first), dump the data to a regular file.

2. The NDO2DB daemon. This standalone daemon reads input (that was produced by the NDOMOD broker module) from a TCP or Unix domain socket, parses that data, and then dumps it into one or more MySQL databases. The daemon is capable of handling multiple client connections simultaneously, so you can have multiple instances of the NDOMOD module writing to the same TCP or Unix domain socket at the same time.

3. The FILE2SOCK utility. This simple utility reads data from a standard file and dumps it to either a TCP or a Unix domain socket. This is useful if you are having the NDOMOD module write to a standard file that you later want to send to the NDO2DB daemon. If the module and the daemon are running on different machines, you can periodically use SSH to transfer the file from the monitoring machine to the machine running the NDO2DB daemon, and then use the FILE2SOCK utility to send the contents of that file to the TCP socket or Unix domain socket that the NDO2DB daemon is reading.

4. The LOG2NDO utility. This utility is used for importing historical log archives from NetSaint and Nagios and sending them to the NDO2DB daemon. It takes a single log file as its input and can output data to either a TCP socket, a Unix domain socket or standard output.

To compile the NDO broker module, NDO2DB daemon, and additional utilities:

1. Run the commands below;


make all

2. If the configure script is unable to locate your MySQL development libraries, you may need to help it out by using the --with-mysql-lib option. 

Here's an example:

./configure --with-mysql-lib=/usr/lib/mysql

NDOUTILS Tuning Kernel Parameters includes:

NDOUTILS uses a single message queue to communicate between the broker module and the NDO2DB daemon. Depending on the operating system, there may be parameters that need to be tuned in order for this communication to work correctly.

1. kernel.msgmax is the maximum size of a single message in a message queue

2. kernel.msgmni is the maximum number of messages allowed in any one message queue

3. kernel.msgmnb is the total number of bytes allow in all messages in any one message queue

How to initialize the Database for NDOUtils installation:

Before you start using NDOUtils, you should create the database where you will be storing all Nagios related information.

Note: Only MySQL Databases are supported!

i. Create a database for storing the data (e.g. nagios)

ii. Create a username/password that has at least the following privileges for the database:


iii. Run the DB installation script in the db/ subdirectory of the NDO distribution to create the necessary tables in the database.

cd db


iv. Make sure the database name, prefix, and username/password you just created and setup match the variable specified in the NDO2DB config file.

Read More

Install NDOUtils in CentOS RHEL and fix related error

This article covers how to install NDOUtils in CentOS. NDOUtils is an addon for Nagios Core that allows you to export current and historical data from one or more Nagios Core instances to a MySQL database. NDOUtils is included with Nagios XI. A source in Nagios Network Analyzer is the data collector. Outside of Nagios Network Analyzer a source is the location where data is originating from.

NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils. We are going to increase the default values the Kernel boots with to ensure it operates optimally.

1. Downloading NDOUtils Source

cd /tmp

wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/releases/download/ndoutils-2.1.3/ndoutils-2.1.3.tar.gz

tar xzf ndoutils.tar.gz

2. Compile NDOUtils

cd /tmp/ndoutils-2.1.3/


make all

3. Install Binaries

This step installs the binary files.

make install

4. Initialize Database

This prepares the database for NDOUtils.

cd db/

./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios

cd .. 

Read More

Nagios migration to new Linux server

This article will guide you on steps to #migrate Nagios server to a new Linux server. Nagios provides complete monitoring of #applications and application state – including #Windows applications, #Linux applications, #UNIX applications, and #Web applications.

Main benefits of #Nagios:

1. Increased server, services, process, and application availability.

2. Fast detection of network and server outages and protocol failures.

3. Fast detection of failed servers, services, processes and batch jobs.

Read More

Steps to Back Up And Restore Nagios System

This article will guide you on how to perform #Backup and #Restore of the #Nagios System are important aspects of the #administration and #maintenance of the #system. 

Backups are an important aspect of administration and maintenance of your system. They can easily facilitate the #migration of a Nagios XI #installation between a virtual server and physical server, and the design of a fail-over or #disaster #recovery instance of Nagios XI.

There are three main types of backup: full, incremental, and differential:

1. #Full backup. As the name suggests, this refers to the process of copying everything that is considered important and that must not be lost.

2. #Incremental backup. 

3. #Differential backup.

Read More

Monitoring VMware with Nagios XI

This article will guide you on the steps to Monitor VMware with #Nagios.
To Monitor the VMware host
i. Enter the Address, Username and Password of your #ESX / #ESXi host.
ii. Select Monitor the #VMware #Host.
iii. Click Next to go to Step 2.
iv. On step 2 you will configure all of the options for #monitoring.

Read More

Integrate SNMP traps with Nagios

This article will guide you on how to integrate SNMP traps with #Nagios. #SNMP can comprehensively monitor not only the network elements like #routers and #switches, but can also be used to monitor #network servers. Details like server hardware description, physical location, IP address, available disk space and server uptime can be monitored through SNMP.

Read More

Monitoring Performance Counters in Nagios XI Using NCPA

This article will guide you on how to configure #Nagios XI to monitor performance counters by monitoring Performance Counters in Nagios XI is possible using #NCPA as well as use cases where real-time monitoring actually provides no benefit at all, and may also be both a distraction and a detriment to monitoring #teams and #admins.

Read More

RAM Disk in Nagios XI

This article will guide you on how to make use of a RAM disk can provide huge performance improvements on larger systems or any system where check latencies are greater than 2 seconds.

Read More

Nagios error unable to open include file

This guide will help to fix "Nagios error: unable to open include file: conf.d/*.cfg" which occurs when the MRTG version is too old or having 1000+ cfg files in the /etc/mrtg/conf.d/ directory.

Read More

For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com

Focus on your business, not your servers.

Click Here to Learn More