Purpose: Agent Installation Instructions
Purpose: Agent Installation Instructions
Purpose
This document describes how to install the Nagios Cross Platform Agent (NCPA) on Windows,
Linux and Mac OS X. NCPA is intended to simplify and universalize agent-based monitoring
across different operating systems.
Target Audience
This document is intended for use by Nagios Administrators who wish to use NCPA to monitor servers. NCPA
simplifies monitoring configurations and maintenance by allowing Nagios to monitor servers using the same
agent regardless of platform.
You can also install NCPA from source by following the Building NCPA documentation.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 1 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
Active vs Passive
NCPA can be used for both Active and Passive monitoring:
• Active = Nagios is responsible for performing the check on a schedule
• Passive = NCPA is responsible for submitting check results in Nagios
The NCPA installer may prompt you for settings for active and passive. Active is the most common method
used. If you are not using passive monitoring then you do not need to configure those settings.
If you are installing NCPA on Linux then the steps below for each Linux distribution will show you how to
download the package at the command line, you do not need to download it right now.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 2 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
Click I Agree
URL
This is the URL on your Nagios Host that accepts passive
check results to be submitted.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 3 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
NRDP Token
This is the token you will be using when passing NCPA passive checks to Nagios for NRDP to accept the
check. This is separate from the token that was provided for active checks.
The URL and NRDP token in Nagios XI are configured via Admin > Check Transfers > Inbound Transfers.
Hostname
The hostname that the passive checks belong to on the Nagios server.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 4 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
Now that NCPA has been installed please proceed to the Configure Firewall - Windows section of this
document.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 5 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
Directive Explanation
/S This is how you tell the installer you are performing a silent install
/D The directory to install NCPA to. This is optional, must be the last argument,
cannot contain quotes, and must be an absolute path.
/TOKEN The token that will be used to access the agent’s API and web interface
/IP The IP address to bind to. The default is 0.0.0.0 which binds to all IPv4
addresses. Use :: for binding to IPv6 addresses.
/NRDPURL This is the URL on your Nagios Host that accepts passive check results to be
submitted
/NRDPTOKEN This is the token you will be using when passing NCPA passive checks to Nagios
for NRDP to accept the check. This is separate from the token that was provided
for active checks.
/NRDPHOSTNAME The hostname that the passive checks belong to on the Nagios server
Using the previous graphic install of NCPA as an example, here is how you would install NCPA silently using
those settings:
Now that NCPA has been installed please proceed to the Configure Firewall - Windows section of this
document.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 6 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
6.x
rpm -Uvh http://repo.nagios.com/nagios/6/nagios-repo-6-4.el6.noarch.rpm
7.x
rpm -Uvh http://repo.nagios.com/nagios/7/nagios-repo-7-4.el7.noarch.rpm
8.x
rpm -Uvh http://repo.nagios.com/nagios/8/nagios-repo-8-1.el8.noarch.rpm
Once the repository has been installed you will need to execute the following command to install NCPA:
Now that NCPA has been installed please proceed to the Configuring NCPA section of this document.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 7 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
Now that NCPA has been installed please proceed to the Configuring NCPA section of this document.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 8 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
Ubuntu i386
wget https://assets.nagios.com/downloads/ncpa/ncpa-latest.i386.deb
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 9 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
Ubuntu amd64
wget https://assets.nagios.com/downloads/ncpa/ncpa-latest.amd64.deb
sudo dpkg -i ./ncpa-latest.amd64.deb
Now that NCPA has been installed please proceed to the Configuring NCPA section of this document.
Some versions of Mac OS have a built-in security feature that will block applications that are not "Apple
certified". If, after installing the DMG package, you notice that the NCPA listener service does not start, follow
the steps below:
sudo spctl --master-disable
spctl --status
sudo /usr/local/ncpa/ncpa_listener
Verify that NCPA is running by:
sudo launchctl list | grep -Ei 'ncpa'
Now that NCPA has been installed please proceed to the Configuring NCPA section of this document.
Configuring NCPA
This section is specifically for the Linux / Mac OS X / AIX installations as they do not provide configuration
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 10 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
options as part of the installer. However the configuration file in Windows is the same, hence the information
here is also valid for Windows.
This documentation will only focus on configuring NCPA for Active checks. Passive checks are covered in the
following documentation:
Using NCPA For Passive Checks
/usr/local/ncpa/etc/ncpa.cfg
sudo vi /usr/local/ncpa/etc/ncpa.cfg
When using the vi editor, to make changes press i on the keyboard first to enter insert mode. Press Esc to
exit insert mode.
community_string = mytoken
community_string = Str0ngT0k3n
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 11 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
You will now need to restart the ncpa_listener service for these changes to take affect, please proceed to
the Restart Service section of this documentation.
Restart Service
The command required for this will differ depending on your OS and version.
Ubuntu 15.x +
sudo systemctl restart ncpa_listener.service
Debian 7.x
service ncpa_listener restart
Debian 8.x +
systemctl restart ncpa_listener.service
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 12 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
AIX
stopsrc -s ncpa_listener
startsrc -s ncpa_listener
Mac OS X
sudo launchctl stop com.nagios.ncpa.listener
sudo launchctl start com.nagios.ncpa.listener
Now that the ncpa_listener service has been restarted please proceed to the Configure Firewall - Linux
section of this document.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 13 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
To change the firewall settings, select Start and type firewall in the search dialog box and open Windows
Firewall with Advanced Security.
In Server 2012 / 2016 this is located at Server Manager > Tools > Windows Firewall with Advanced
Security.
Select Port
Click Next
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 14 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
Select TCP
Click Next
Click Next
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 15 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
Now that the firewall has been created please proceed to the Test NCPA section of this document.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 16 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
Debian
iptables -I INPUT -p tcp --destination-port 5693 -j ACCEPT
apt-get install -y iptables-persistent
Answer yes to saving existing rules
openSUSE Leap
The firewall is not enabled by default and allows port 5693.
AIX
Please refer to the AIX documentation.
Mac OS X
The firewall is not enabled by default and allows port 5693.
Now that the firewall has been defined please proceed to the Test NCPA section of this document.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 17 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
Test NCPA
To ensure that the installation was successful and NCPA is now listening, try accessing the web interface of
the agent. In order to do this you will need to know:
• The IP Address of the machine you installed NCPA on
• The token / community_string you configured NCPA to use
Open a web browser and connect to the NCPA web interface using the following URL:
https://<NCPA IP Address>:5693/
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 18 / 19
Updated – January, 2022
The Industry Standard In Infrastructure Monitoring
Configuring Nagios
Now that NCPA is installed on the remote machine, you can monitor the machine using the NCPA monitoring
wizard in Nagios XI. Please refer to the following documentation for detailed steps:
Monitoring Devices Using The NCPA Agent And Nagios XI
The NCPA agent has built-in documentation in web interface, this is located on the Help tab. This gives the
options to view or change configuration settings remotely as well as access additional info on NCPA.
Finishing Up
This completes the documentation on how to install the Nagios Cross Platform Agent.
If you have additional questions or other support related questions, please visit us at our Nagios Support
Forums:
https://support.nagios.com/forum
https://support.nagios.com/kb
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 19 / 19
Updated – January, 2022