Explore information related to nagios


Access Nagios Network Analyzer Reports - How to do it ?


This article covers how to access Nagios Network Analyzer Reports. This is done by configuring the Nagios Network Analyzer Component within Nagios XI. Having the Network Analyzer reports available in Nagios XI will allow quick and easy access to your Nagios Network Analyzer Network Report and Network Query report. 

Read More



Add Windows Disk Usage Checks In Nagios


This article covers how to monitor additional drives on a Windows client. To install Nagios monitoring agent, NSClient++, on a target Microsoft Windows desktop or server for the purposes of monitoring that machine with Nagios XI. This allows organizations to monitor vital metrics and ensure that a specific Windows desktop machine or server is functioning properly.


To access CCM:

  • When hovering the Configure button in the top menu bar you can select Core Config Manager.
  • On the Configure tab you can select Core Config Manager from the left pane or from the main screen.

Read More



Monitor MongoDB with Nagios XI - How to perform this ?


This article covers  how to monitor a MongoDB server with Nagios XI using the MongoDB Server Configuration Wizard in order to monitor the health of your server. The

wizard supplies checks to monitor the following: number of queries per second, memory usage, the number of databases on the server, and percentage of free connections available.


To Connect to MongoDB with the appropriate privileges:

Connect to mongod or mongos with the privileges specified in the Prerequisites section.

The following procedure uses the myUserAdmin created in Enable Access Control:

mongo --port 27017 -u myUserAdmin -p 'abc123' --authenticationDatabase 'admin'

The myUserAdmin has privileges to create roles in the admin as well as other databases.


To Modify Access for an Existing User in MongoDB:

  • You must have the grantRole action on a database to grant a role on that database.
  • You must have the revokeRole action on a database to revoke a role on that database.
  • To view a role's information, you must be either explicitly granted the role or must have the viewRole action on the role's database.

Read More



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



Need at least 2 WMI samples% - Fix it Now ?


This article covers how to tackle the error, Need at least 2 WMI samples%. The reason for the message is that the WMI user account does not have sufficient permissions. This can be resolved by adding the user account to the Performance Log Users security group on the windows computer. 

  • This can be performed by opening the Computer Management console (located in Administrative tools). 
  • Expand System Tools > Local Users and Groups > Groups. 
  • Edit the Performance Log Users security group and add the user account (wmiagent) to this group.

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 NRDP From Source - On different Linux Distribution


This article covers how to install NRDP from the source. NRDP is a simple, PHP-based passive result collector for use with Nagios. It is designed to be a flexible data transport mechanism and processor, with a simple and powerful architecture that allows for it to be easily extended and customized to fit individual users' needs.

Read More



Install Nagios NCPA on Linux and Windows - Step by Step Process ?


This article covers how to Install Nagios NCPA on Linux and Windows. Basically, NCPA simplifies monitoring configurations and maintenance by allowing Nagios to monitor servers using the same agent regardless of platform. NCPA is intended to simplify and universalize agent-based monitoring

across different operating systems.


To monitor Windows Machines you will need to follow several steps and they are:

  • Install NSClient++ addon on the Windows Machine.
  • Configure Nagios Server for monitoring Windows Machine.
  • Add new host and service definitions for Windows machine monitoring.
  • Restart the Nagios Service.


Why do we need Nagios?

Here, are the important reasons to use Nagios monitoring tool: 

  • Detects all types of network or server issues. 
  • Helps you to find the root cause of the problem which allows you to get the permanent solution to the problem. 
  • Active monitoring of your entire infrastructure and business processes.

Read More



WMI Monitoring With Nagios - How to do it ?


This article covers how to monitor Windows machines with Nagios XI using WMI.

Basically, to set up WMI monitoring with Nagios, we need to configure A WMI User Account On The Windows Machine and then set up the WMI permissions. Windows Management Instrumentation (WMI) is a technology that allows for agentless monitoring of Windows servers and workstations.


Benefits of WMI Monitoring With Nagios:

  • Increased server, services, and application availability.
  • Fast detection of server and operating system failures.
  • Fast detection of service and application failures.
  • Agentless monitoring.

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



Configure inbound checks with Nagios – How to do it ?


This article covers how to easily configure inbound checks using both these APIs. Basically, there are two APIs available to handle inbound check transfers in Nagios XI:

  • NRDP - This api works on port 80 (HTTP) or 443 (HTTPS).
  • NSCA - This api works on TCP port 5667.


This will guide Nagios Administrators that needs to configure inbound checks.

Read More



Configure outbound checks in Nagios - How to do it ?


This article covers how to effectively Configure outbound checks with Nagios. Outbound checks are used in federated and distributed monitoring environments, as well as environments where the monitoring server sends passive check results to external applications. 


What is a distributed monitoring in Nagios ?

This is a method of scaling Nagios Xi and Nagios Core to monitor a lot of devices / machines - sometimes across different networks. Large organizations often want distributed monitoring, as do MSPs. Nagios Fusion's central dashboard can be ideal for distributed monitoring solutions. Both Nagios XI and Nagios Core can be configured for distributed monitoring.


What is a server ?

This is a dedicated computer system that generally runs databases, websites, etc. Servers are not used by people on a regular basis (as compared to workstations), but are rather used to run batch jobs, applications, and services.


What is passive check in Nagios ?

This is a check that is performed by an external application, operating system, or device and is submitted to Nagios Core or Nagios XI for processing.

Some monitoring agents - including NSCA, NCPA, and NRDP can be used to send passive checks to Nagios.

An SNMP trap is also considered a passive check.

Read More



Monitoring Linux Using NCPA


This article covers how to go about setting up monitoring in Linux using NCPA. You will learn how to configure NCPA to monitor Linux.

NCPA is a cross-platform monitoring agent for Nagios Core and Nagios XI that runs on Windows, Linux/Unix, and Mac OS/X machines. Its features include both active and passive checks, remote management, and a local monitoring interface.


In Nagios XI wizards can be used to to perform configuration of hosts and services through the Web UI. Wizards take the complicated matter of creating hosts and services, defining configuration parameters, assigning contacts, contact groups, hostgroups, servicegroups, etc, into a easy steps form in the Nagios XI UI. 

Wizards can also be easily added to Nagios XI through the Admin -> Manage Wizards menu to expand the capabilities of Nagios XI.

Read More



Managing Snapshots and Maintenance in Nagios Log Server


This article covers how to manage Snapshots and Maintenance in Nagios Log Server. Here, You will learn method to create and manage backups and Repositories and how to manage your Nagios Log Server Maintenance.

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



Sending ESXi logs to Nagios log server - How to set it up ?


This article covers how to go about Sending ESXi logs to Nagios log server. 

To Send ESXi Logs To Nagios Log Server:

1. Login to Nagios Log Server and navigate to Configure > Global (All Instances) > Global Config. 

2. Click the + Add Input button and select Custom. 

3. A new block will appear at the bottom of the list of Inputs. 

4. Type a unique name for the input which will be Syslog (ESXi).

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



Remove Instance From Nagios Log Server Cluster


This article covers method to remove an instance from a Nagios Log Server cluster. Removing an instance from a Nagios Log Server cluster is as simple as updating the cluster_hosts configuration file and restarting the Elasticsearch database service on each node.

You can easily isolate an instance from the cluster for testing purposes. The instance that you want to isolate simply has it's own IP address in the cluster_hosts configuration file and none of the other instances. This means you will have two clusters that exist with the same cluster ID but they do not talk to each other. You

don't need to physically isolate this instance from the other instances on your network, the configuration file dictates who participates in the cluster.


To An Instance From A Nagios Log Server Cluster:

  • Open the Nagios Log Server web interface and navigate to Admin > System > Instance Status. 
  • In the Instances table click the trashcan icon to delete the removed instance. 
  • This completes the steps required to remove an instance from a Nagios Log Server cluster.

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



Configure filters in Nagios log server - Do it Now ?


This article covers method to customize Nagios Log Server Filters. Basically, to configure filters in Nagios log server, one needs to be familiar with the Filter Configuration options available within the log server.

Filters can be applied to messages before they are sent to Elasticsearch for indexing. They perform actions such as breaking apart messages into fields for easy searching, adding geo location information, resolving IP to DNS names and dropping messages you do not want indexed.

Read More



Adding Additional Instances To Nagios Log Server Cluster


This article covers method to add instances to Nagios Log Server Cluster. You will need to have an existing Nagios Log Server cluster before following the steps in this guide. An existing cluster is one or more instances of Nagios Log server.

Read More



Manage Clusters In Nagios Log Server - Fix it Now ?


This article covers how to manage and identify key information on your Nagios Log. Nagios Log Server is a clustered application, it consists of one or more instances of Nagios Log Server. An instance is an installation of Nagios Log Server, it participates in the cluster and acts as a location for the received log data to reside. The log data is spread across the instances using the Elasticsearch database, a special database used by Nagios Log Server.

Read More



Import Nagios Log Server Into Microsoft Hyper-V - How to Do it?


This article covers how to easily Import Nagios Log Server Into Microsoft Hyper-V. Basically, to Import Nagios Log Server Into Microsoft Hyper-V we need to follow a series of steps outlined in this guide. 

Read More



Configure SSL / TLS in Nagios Log Server - How to do it ?


This article covers how to configure SSL/TLS in Nagios Log Server. SSL/TLS provides security between the end user's web browser and Nagios Log

Server by encrypting the traffic. This guide is intended for use by Nagios Log Server Administrators who require encrypted connections to their Nagios Log Server.

Read More



Managing Instances In Nagios Log Server


This article covers Instances in Nagios Log Server and how we can manage them. 

Nagios Log Server is a clustered application, it consists of one or more instances of Nagios Log Server. An

instance is an installation of Nagios Log Server, it participates in the cluster and acts as a location for the

received log data to reside. The log data is spread across the instances using the Elasticsearch database, a

special database used by Nagios Log Server.

Read More



Alerting On Log Events With Nagios Log Server


This article covers Alerting On Log Events With Nagios Log Server. Basically, for alerting on Log Events with Nagios Log Server one needs to be familiar with the options available.

With this guide, you will learn how to create various alerts in Nagios Log Server, such as sending

them to a Nagios XI or Nagios Core monitoring server using Nagios Remote Data Processor

(NRDP), sending an email, sending SNMP traps and executing scripts.

Read More



Analyzing Logs With Nagios Log Server


This article covers how to analyze  logs with Nagios Log Server.  Basically, in order to analyze logs with Nagios Log Server one needs to be familiar with the options in the Dashboards menu. This guide is very essential to Nagios Log Server administrators and users looking for information on querying, filtering and drilling down the data in Nagios Log Server.

You can audit your IT infrastructure, maintain historical records of usage of IT infrastructure, create reports, and analyze logs using the Nagios Log Server.

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



NRPE Command Plugin Not Defined - How to fix it ?


This article covers methods to resolve 'NRPE Command Plugin Not Defined' for our customers.

This error is very straight forward. Usually this is caused by a mismatch between the command name declared in Nagios XI to be check through NRPE and the actual command name of the command directive in the remote host's nrpe.cfg file.

This problem will occur in versions of check_nrpe before v3. 

What is happening here is that the initial -c check_users is being overwritten by the -a -w 5 -c 10, as check_nrpe thinks the -c 10 argument is the command argument, not one of the -a arguments.

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



Send test SNMP trap in Nagios - How does this work ?


This article covers how to send a trap to Nagios server to test SNMP Trap functionality.

Basically, when troubleshooting an SNMP Trap issue, it can be very helpful to remove the actual device that could be causing problems and use the snmptrap command instead.

So in this guide, you will learn all the methods of sending a trap to your Nagios server to test SNMP Trap functionality.


SNMP Trap Definition

The following trap definition can be placed in /etc/snmp/snmptt.conf which will allow the test traps sent above to be passed through to Nagios:

EVENT netSnmpExampleHeartbeatRate .1.3.6.1.4.1.8072.2.3.0.1 "netSnmpExampleHeartbeatRate" Normal
FORMAT SNMP netSnmpExampleHeartbeatRate
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "" "netSnmpExampleHeartbeatRate"


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



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



SNMP MIB Upload Problems in Nagios – Fix it Now ?


This article covers Nagios SNMP MIB Upload Problems.

This issue happens while uploading SNMP MIB files and it could be as a result of insufficient permissions on the SNMP MIB files.


Execute the following commands to reset the permissions and ownership on the Nagios SNMP MIB files:

# chmod -R ug+rw /usr/share/snmp/mibs
# chown -R root:nagios /usr/share/snmp/mibs

After executing those commands you should be able to upload the MIB file that previously did not work.

Read More



SNMPTT Service generates Cannot find module errors in Nagios


This article covers methods to fix "Cannot find module" errors in Nagios.

Basically, SNMPTT Service generates "Cannot find module" errors in Nagios when a MIB file contains spaces in the filename. 

The MIB files are located in the /usr/share/snmp/mibs/ folder.

This was identified as an issue and resolved in Nagios XI 5.4.0. As of version 5.4.0, when you upload MIBs via the Manage MIBs page the filename will have any spaces replaced with an underscore.

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



Host Still Visible After Deletion in Nagios - How to resolve ?


This article covers steps to resolve Host Still Visible After Deletion (Ghost Hosts). Basically, by following this guide, you can easily resolve the error, Host Still Visible After Deletion in Nagios.

It is possible that you have multiple instances of nagios running or you have so called "ghost" hosts or services.

In order to check for multiple instances of nagios, run the following command from the command line:

$ ps -ef | head -1 && ps -ef | grep bin/nagios

Read More



Problems Using Nagios With Proxies - Fix it Now ?


This article covers how to resolve Problems Using Nagios With Proxies which arises if we do not configure proxies correctly while using Nagios.

Note that the Nagios XI code makes several internal HTTP calls to the local Nagios XI server to import configuration data, apply configuration changes, process AJAX requests, etc. 

These functions may not work properly when you deploy a proxy if it is not configured properly, which could result in a non-functional Nagios XI installation.

Read More



Migrate Performance Data in Nagios - Step by Step Process ?


This article covers how to perform Migrate Performance Data in Nagios.

Basically, to migrate, we have to convert the data to XML and import it into RRD’s on the new machine.

Historical performance data that is used to generate graphs are stored in Round Robin Database (RRD) files.

RRD performance data files are compiled binaries, so for a simple file transfer a user would have to have the architecture match on both machines.

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:

[mysqld]
# Recommended in standard MySQL setup
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

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:

[mysqld]
sql_mode=""

Read More



How to Manage Indices in Nagios Log Server - Do this now ?


This article covers how to manage indices in Nagios log server. An index in Nagios Log Server is how the Elasticsearch database stores log data. Nagios Log Server creates and index for every day of the year, this makes it easy to age out old data when no longer required.
Nagios Log Server is a clustered application, it consists of one or more instances of Nagios Log Server. An instance is an installation of Nagios Log Server, it participates in the cluster and acts as a location for the received log data to reside. The log data is spread across the instances using the Elasticsearch database, a special database used by Nagios Log Server.

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



NRPE: No Output Returned From Plugin - How to fix this Nagios error ?


This article covers how to resolve Nagios error, NRPE: No Output Returned From Plugin. This error happens as a result of Permissions or Missing plugin.

To fix this Nagios error:

1. The most common solution is to check the permissions on the check_nrpe binary on the Nagios XI server:

ls -la /usr/local/nagios/libexec/check_nrpe

The expected permissions should resemble:

-rwxrwxr-x. 1 nagios nagios  75444 Nov 21 01:38 check_nrpe

2. If not, change ownership to user/group "nagios" and fix up the permissions:

$ chown nagios:nagios /usr/local/nagios/libexec/check_nrpe
$ chmod u+rwx /usr/local/nagios/libexec/check_nrpe
$ chmod u+rx /usr/local/nagios/libexec/check_nrpe

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



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



Configure Multi-Tenancy in Nagios Log Server - How to perform it


This article covers how to configure multi-tenancy in Nagios log server.
Multi-Tenancy works by assigning which hosts a user is allowed to see in the Nagios Log Server interface.
Hosts can also be placed in a host list and then applied to the users who will be allowed access.
NOTE: API users and administrators will be able to work around any restrictions placed on them, this
functionality only applies for regular users.

Read More



Define Global Environment Variables in Nagios - Fix it Now


This article covers how to define Global Environment Variables in Nagios. In some environments, when the plugin is executed by the monitoring engine, these environment variables are not loaded and hence the plugin does not know where to find them and fails.

Therefore, when the plugin is executed, environment variables may not load.


To Define Global Environment Variables in Nagios:

Here, you will define variables required for you plugins globally.

a. Add the path /usr/local/important_application to the PATH environment

b. Add the variable ORACLE_HOME=/usr/lib/oracle/11.2/client64

1. To do this, edit a specific file that nagios checks when it starts:

$ vi /etc/sysconfig/nagios

2. Add the following lines to the file and then save:

export PATH=$PATH:/usr/local/important_application
export ORACLE_HOME=/usr/lib/oracle/11.2/client64

3. Finally, restart Nagios:

$ systemctl restart nagios.service


If you have Mod-Gearman, 

The following is being applied:

a. Re-define the PATH environment to include /usr/local/important_application

b. Add the variable ORACLE_HOME=/usr/lib/oracle/11.2/client64

1. This is performed by editing a specific file that mod-gearman2-worker checks when the service starts:

/etc/sysconfig/mod-gearman2-worker

2. Open an SSH session to your Mod-Gearman worker.

Type:

$ vi /etc/sysconfig/mod-gearman2-worker

3. Add the following lines to the end of the file and save:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/important_application
ORACLE_HOME=/usr/lib/oracle/11.2/client64

4. Now reload the daemons and restart the Mod-Gearman worker:

$ systemctl daemon-reload
$ systemctl restart mod-gearman2-worker.service

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



Clear Solaris Service Maintenance Status in Nagios - Troubleshoot and Resolve


This article covers how to fix Clear Solaris Service Maintenance Status Nagios issue. Basically, When the Nagios Core service finds an invalid configuration, the core service will not start. 

To fix the problem you must fix the problem Nagios Core is complaining about.

This is normal behavior of Nagios Core, it is not specific to Solaris.

However on Solaris, after a service has failed to start several times, Solaris will put the service into what is called a Maintenance State. This state prevents a small problem from becoming a bigger problem. 

Even after fixing the problem Nagios Core is complaining about, you must also clear the maintenance state on the service before Solaris allows a service to be started again.

This means that the service is in a maintenance state, however there is not a lot of detail as to the cause of the issue except that the Start method failed repeatedly. 

It does however provide the name of a log file /var/svc/log/application-nagios:default.log.

Execute the following command to perform further troubleshooting:

tail -20 /var/svc/log/application-nagios:default.log


To Clear Maintenance State on Nagios:

1. Run the following command to clear the maintenance state:

$ svcadm clear nagios

2. Execute the following command to start Nagios:

$ svcadm enable nagios

3. Now check the state of the service:

$ svcs -xv nagios

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



Listen on Privileged Ports with Nagios Log Servers - How to set it up


This article covers how to configure Nagios Log Servers to listen on privileged ports. Now Nagios Log Server Administrators who would like configure Nagios Log Server to listen on ports below 1024 which are privileged in Linux. This can be useful if you have legacy devices that can only send on specific ports (e.g. syslog on port 514).

Ports below 1024 are privileged on Linux and only allow the root user to listen on them. 

This can be implemented via two solutions:

1. Run Logstash as root

2. Use setcap


To use Use setcap for Listening On Privileged Ports:

Here, you can use the logstash running as the nagios user but this method may be less secure in some environments as it will allow any Java process to listen on privileged ports.

i. The logstash init configuration file requires three lines to be added to the end of it, open the file with the following command:

On Debian | Ubuntu:

$ vi /etc/default/logstash

or

$ sudo /etc/default/logstash

2. Then, Add the following three lines to the end of the file:

echo $(dirname $(find /usr/lib -name libjli.so)) | awk '{print $1}'> /etc/ld.so.conf.d/java.conf

eval "$(which ldconfig)"

setcap 'cap_net_bind_service=+ep' $(readlink -f $(which java))

3. Save the file and close vi.

4. Restart Logstash Service

The logstash service needs to be restarted for these changes to apply:

$ sudo systemctl restart lagstash.service

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



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;

./configure

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:

SELECT, INSERT, UPDATE, DELETE

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

cd db

./installdb

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



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



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/

./configure

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



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



Install ClickHouse on Ubuntu 20.04 - Step by step process to perform it


This article covers how to install ClickHouse on Ubuntu. Basically, ClickHouse is an open-source analytics database developed for big data use cases. 

Install of ClickHouse on Ubuntu involves a series of steps that includes adjusting the configuration file to enable listening over other IP address and remote access. 


Column-oriented databases store records in blocks grouped by columns instead of rows. 

By not loading data for columns absent in the query, column-oriented databases spend less time reading data while completing queries. 

As a result, these databases can compute and return results much faster than traditional row-based systems for certain workloads, such as OLAP.


Online Analytics Processing (OLAP) systems allow for organizing large amounts of data and performing complex queries. 

They are capable of managing petabytes of data and returning query results quickly. 

In this way, OLAP is useful for work in areas like data science and business analytics.


Aggregation queries are queries that operate on a set of values and return single output values. 

In analytics databases, these queries are run frequently and are well optimized by the database. 


Some aggregate functions supported by ClickHouse are:

1. count: returns the count of rows matching the conditions specified.

2. sum: returns the sum of selected column values.

3. avg: returns the average of selected column values.


Some ClickHouse-specific aggregate functions include:

1. uniq: returns an approximate number of distinct rows matched.

2. topK: returns an array of the most frequent values of a specific column using an approximation algorithm.


You can set up a ClickHouse database instance on your server and create a database and table, add data, perform queries, and delete the database.

You can start, stop, and check the ClickHouse service with a few commands.

To start the clickhouse-server, use:

$ sudo systemctl start clickhouse-server

The output does not return a confirmation.

To check the ClickHouse service status, enter:

$ sudo systemctl status clickhouse-server

To stop the ClickHouse server, run this command:

$ sudo systemctl stop clickhouse-server

To enable ClickHouse on boot:

$ sudo systemctl enable clickhouse-server

To start working with ClickHouse databases, launch the ClickHouse client. 

When you start a session, the procedure is similar to other SQL management systems.

To start the client, use the command:

$ clickhouse-client

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



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



Set up email settings in Nagios Log Server


This article will guide you on how #Nagios #Log Server sends emails and the effective ways to configure them.

By default, Nagios #Mail notification is sent using /bin/mail command. To change this, modify the definition for notify-host-by-email command and notify-service-by-email command in /etc/nagios/objects/commands. cfg file and configure the mail server accordingly.

Log Server has user-friendly features like a search function. You can refine your logs to a specific purpose, like failed logins, or a specific date, so you can easily find the logs you need. Log Server's customizable home dashboard lets you display log data in a variety of ways, whether that's a map or a bar chart.

Read More



Backup and Restore Nagios Log Server


This article will guide you on the steps to perform #backup and #restore a #Nagios #Log #Server cluster. Taking Backup and Restore of Nagios Log Server helps not to lose any data as it is held in other instances.

Backup and recovery describes the process of creating and storing copies of #data that can be used to protect organizations against data loss. #Recovery from a backup typically involves restoring the data to the original location, or to an alternate location where it can be used in place of the lost or damaged data.

To do a backup and system restore:

1. Click Start.

2. Go to Control Panel.

3. Go to System and Security.

4. Click Backup and Restore.

5. At the Back up or restore your files screen, click Restore my files. 

6. Browse to locate the backup file. 

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



Nagios Authentication and Importing Users with AD and LDAP


This article will guide you on how to integrate #Nagios Log Server with Active Directory or #LDAP to allow user authentication and validation with the Nagios Log Server interface.
Currently by default LDAP traffic (without SSL/TLS) is unsigned and unencrypted making it vulnerable to man-in-the-middle attacks and eavesdropping. After the patch or the windows update would be applied, LDAPS must be enabled with Active Directory.
To Set up Active Directory Authentication using LDAP:
1. Enter the LDAP "Server" and "Port" attributes on the Server Overview tab of the LDAP Users page.
2. Enter the proper base for the Active Directory in the "Base DN" attribute.
3. Set the Search Scope.
4. Enter the Username Attribute.
5. Enter the Search Filter.
6. Verify that the settings are correct by clicking the Verify button.

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



Send Syslog with SSL TLS to Nagios Log Server


This article will guide you on how to Send #Syslog with #SSL / #TLS to Nagios Log Server by encryption which ensures that the #traffic between the #Linux machine and Nagios Log Server is not sent in plain text.

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



Modify Data Store Path in Nagios Log Server


This article will guide you on the process to modify the data #storage location in a #Nagios #Log #Server.

The Nagios Core log, includes checks, notifications, external #commands, and events. This file is rotated daily into the /usr/local/nagios/var/archives folder by default setting in nagios.

Changing Data Path In Nagios Log Server involves: 

DATA_DIR="$ES_HOME/data" Modify it to the new path you would like to use: DATA_DIR="/new/path/data" Save the file and exit vi. The time it takes to move your existing data will vary depending on how much data there is and the speed of the source and destination #paths.

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



Send NXLogs with SSL TLS to Nagios Log Server


This guide will guide you on how to send NXLogs with SSL/TLS to #Nagios #Log #Server. Encryption ensures that the traffic between the #Windows machine and Nagios Log Server is not sent in plain text.

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



Monitoring squid proxy server with Nagios log server


This article will guide you on how to configure the #Nagios log server to use a #proxy server.

#Squid is a caching and forwarding #HTTP web proxy. It has a wide variety of uses, including speeding up a web server by caching repeated requests, #caching web, #DNS and other computer network #lookups for a group of people sharing network resources, and aiding security by filtering #traffic.

Read More



Configure Nagios log server to use a proxy server


This article will guide you on the steps to configure the #Nagios log server to use a #proxy server.

In order to #monitor the server using Nagios Core, you will need to add the host and services to nagios #server from the command line. 

#Logs located in the /usr/local/nagios/var/archives folder are used as the data source for the Availability and #SLA #reports.

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



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



Scheduling Reports in Nagios Log Server Process to do it


This article will guide you on the steps to manage users in Nagios Log Server by Scheduling Reports in Nagios Log Server which is used by Nagios Log Server Administrators to automate reporting.

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



Process of forwarding Nagios Log Server to another Destination


This article will guide you on the steps to forward Nagios log to another server by creating a new output in NLS.

Read More



Configuration File Is Out Of Date in Nagios


This article will guide you on the different methods to fix Nagios error "Configuration File Is Out Of Date" in CCM after applying configuration changes in Nagios due to incorrect configuration of system time.

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



How to install the Anaconda Python on Ubuntu


This article will guide you on how to install, setup, update, and uninstall Anaconda which involves a series of steps to install and setup the Anaconda environment.

Read More



Steps to install Wraith on Ubuntu


This article will guide you on how to install Wraith on Ubuntu which requires adding Ruby, ImageMagick, and some other dependencies added to the system.

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 nagios error in the process of converting svg


This article will guide you on fixing Nagios error in the process of converting SVG files in the process of working with a performance graph as a PNG, JPEG image in Nagios XI.

Read More



How to fix Nagios error could not create or update nagios configtest


This article will guide you on how to fix Nagios Error: could not create or update nagios.configtest which stops Nagios from starting correctly.

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



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



Nagios did not exit in a timely manner


This article will guide you on how to solve "Nagios did not exit in a timely manner" error which happens in the process of stopping or restarting the Nagios in larger deployments. 

Read More



How to install and configure cacti on Linux


Steps to install and configure Cacti which is network monitoring tool which displays server efficiency information in form of a personalized graph.

Read More



Solution to Nagios access forbidden error 403


Most efficient way to fix Nagios access forbidden error 403.

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