top of page
Server Room

NagiosXI Monitoring

Setup a free NagiosXI VM and monitor the Websites, Database Servers, MS Windows & Linux servers and services. Simply install the NCPA agent on clients. Links provided below.

NagiosXI Install & Monitoring Configuration

NagiosXI Server Setup

You can visit the Nagios website and download the software for free. This should include a OVA file that can easily be used to spin up a VM within ESXi or VMware Workstation. There are limitations on the free version but for home labs its perfect for about 7

systems. 

​

  • Spin up the server in VMware Workstation

  • Verify the settings and change it to Bridged

 

  • Default Console Login:

    • Username: root

    • Password: nagiosxi

 

  • Command to Get IP: hostname -I

 

  • The website default username for Nagios XI: 

    • Username: nagiosadmin

    • Password: nagiosxi

 

 

  • Set Login:

    • Username: nagiosadmin

    • Password: xxxxxx

 

NCPA Agent Setup

#Pull RPM
wget https://assets.nagios.com/downloads/ncpa/ncpa-latest.el9.x86_64.rpm

#Install Pre-Req
dnf install -y python3 python3-pip -y

#Install NCPA RPM
dnf install -y ./ncpa-latest.el9.x86_64.rpm -y

#Open Firewall Port:
firewall-cmd --permanent --add-port=5693/tcp
firewall-cmd --reload

#Set API Token /usr/local/ncpa/etc/ncpa.cfg
sudo sed -i 's/community_string = /community_string = mytoken/g' /usr/local/ncpa/etc/ncpa.cfg

#Restart Listener:
systemctl restart ncpa_listener
systemctl restart ncpa_passive


### Notes on how to remove ports as well ###
###  List Ports ###
#sudo firewall-cmd --list-ports
###  Remove Ports ###
#sudo firewall-cmd --remove-port=5693/tcp

 

 

Check Community String

https://192.168.254.210:5693/login

Monitoring Setup

Once logged in the Admin section allows for quick setup of email and users.

Nagios2.jpg

Click to Enlarge

E-Mail Notification Setup: 

​

Under admin \ email you can setup SMTP utilizing your local SMTP or remote Gmail. When using Gmail you will be requires to make an app password to bypass the Dual Auth process. 

​

To use Gmail to send emails within your applications with a password, you need to generate an "App Password" in your Google Account settings, which is a unique password specifically for applications and requires enabling 2-Step Verification on your account; use this app password as the password when configuring your application's email settings to send emails through Gmail's SMTP server.

 

Key steps:

  • Enable 2-Step Verification:

    Log into your Google account, go to "Security" settings, and turn on 2-Step Verification if it's not already enabled. 

​

  • Create an App Password:

    • In your Google Account settings, navigate to "Security" and then "App passwords". 

    • Select "Select app" and choose the application you're using (or "Other" if not listed). 

    • Click "Generate" to create a unique app password. 

    • Copy this generated password as it will only be displayed once. 

​

Nagios3.png

Click to Enlarge

Adding a host or service to monitor is simple using the built in options by running the wizard.

Nagios1.png

Click to Enlarge

Once at the Wizard page simply type in the search for the technology you are looking to monitor. Note, install the NCPA agent on your clients first. 

 

I have utilized the following with the free licnese:

 

  • Credentialed Monitoring with MySQL Server 

  • Monitor Splunk URL 

  • Monitor IIS URL 

  • RHEL 9 using the NCPA Agent Community String 

    • Server Status​ & Resources

    • NFS Service

    • SSHD Service 

  • MS Windows using the NCPA Agent â€‹

​

NagiosXI4.png

Click to Enlarge

nagiosxi5.png

The majority of these are default performance counters from the Wizard and NCPA agent on RHEL 9.5. The only services I added was sshd and the nfs server monitroing. 

nagios_services.png

Click to Enlarge

bottom of page