Library

Docs
Beta

Products

Adding MATCH Statements in the SNMP Trap InterfaceAutomatic Agent DeploymentAutomatic Nagios Core Migration to Nagios XIHow To Add A New User In Nagios XIHow To Configure Contact Groups in Nagios XIHow To Customize Your Dashboards With Dashlets In Nagios XIHow To Install Nagios XI via SourceHow To Manage MIBs In Nagios XIHow To Monitor A Gateway Switch With Nagios XIHow To Monitor A System Using SSHHow To Monitor DNS Servers and Queries with Nagios XIHow To Monitor Printers with Nagios XIHow To Monitor Security Cameras using Nagios XIHow To Monitor Websites with Nagios XIHow To Monitor Windows Machines With NCPA In Nagios XIHow To Monitor Windows Using SNMP In Nagios XIHow To Monitor Windows Using WinRMHow To Monitor your Mac OS/X devices using Nagios XIHow To Perform Nagios XI Landing Page CustomizationHow To Repair Crashed DatabasesHow To Select The Right Nagios XI Download For Your EnvironmentHow To Use Capacity PlanningHow To Use Scheduled ReportsHow To View The Latest Alerts In Nagios XIHow To configure Email Notifications in Nagios XIHow To configure Nagios XI to support Multi TenancyHow To configure your Timezone in Nagios XIHow To evaluate Nagios XI using -Hyper VHow To install Nagios XI in AWSHow To install Nagios XI using ESXiHow To install Nagios XI using Hyper VHow To install Nagios XI using VMware WorkstationHow To install Nagios XI using VMwareHow To install additional Configuration Wizards in Nagios XIHow To integrate Slack with Nagios XI 2024How To transfer Nagios XI from CentOS 7 to CentOS 9How To understand Users and Contacts in Nagios XIHow To update/upgrade Nagios XIHow To use Auto Discovery to setup host and service checks in XIHow To use Bulk Host Cloning and the Import WizardHow To use Business Process Intelligence (BPI)How To use Dashboards in Nagios XIHow To use Hypermap in Nagios XIHow To use Minemap MonitoringHow To use Nagios XI to Monitor Active DirectoryHow To use Tactical Overview in Nagios XIHow To utilize Reports and Graphs in Nagios XIHow To utilize Standard Edition (SE) ReportsHow to Agentless Monitor a Windows Machine with Nagios XIHow to Configure Contacts in Nagios XIHow to Use Custom Includes Component in Nagios XIInstalling on Non Standard SystemsManaging Contact TemplatesManaging Host TemplatesManaging Service TemplatesMigrating Nagios XI to a different ServerMonitoring Amazon EC2Monitoring Linux using NCPAMonitoring Office 365 Subscription ServicesMonitoring WebLogic on WindowsMonitoring Windows using NCPANagios Integrating MNTOSNagios XI 10,000 Services and growing NWC14Nagios XI API’s NWC13Nagios XI Accessing And Utilizing The Core Config ManagerNagios XI Activating Your LicenseNagios XI Add NagVis Map To A ViewNagios XI Adding And Removing A Host Using The APINagios XI Adding And Removing A Service Using The APINagios XI Adding Services To Pre existing Switch or RouterNagios XI Adding Windows Disk Usage Checks In XINagios XI Admin TourNagios XI Administrative User AccountsNagios XI Administrator GuideNagios XI Advanced Features of Nagios XI NWC14Nagios XI Ansible TutorialNagios XI Architecture OverviewNagios XI Audit LogNagios XI Automated Host Management In Nagios XINagios XI BPI XML CacheNagios XI Backend APINagios XI Backing Up And Restoring Your Nagios XI SystemNagios XI Backup and Restore OptionsNagios XI Bandwidth Graphs Showing 0Mb/s in Non English SystemsNagios XI Best Practices NWC15Nagios XI Best Practices for Managing ConfigsNagios XI Business Process IntegrationNagios XI Changing Host Alive CheckNagios XI Changing The Check Interval Of A ServiceNagios XI Changing The System TimeNagios XI Check Interval ConsiderationsNagios XI Checking Program Loadtime With autoIT in Nagios XINagios XI Cleaner Cron ArchitecureNagios XI Cloning UsersNagios XI Command Subsystem ArchitectureNagios XI Configuration Wizards and TemplatesNagios XI Configure PHP Development EnvironmentNagios XI Configuring Core Contacts to Use XI’s phpmailer SMTP SettingsNagios XI Configuring DowntimeNagios XI Configuring FTP For NSClient++ DeploymentNagios XI Configuring Global Event HandlersNagios XI Configuring Inbound ChecksNagios XI Configuring NSClient++Nagios XI Configuring Notification PreferencesNagios XI Configuring Outbound ChecksNagios XI Configuring Passive Services With Nagios XINagios XI Configuring SSL for Nagios XINagios XI Connecting To Your Email ServerNagios XI Conversion for VirtualBoxNagios XI Cool Tips & Tricks NWC14Nagios XI Core Config Manager Bulk Modification ToolNagios XI Core Config Manager Bulk Renaming ToolNagios XI Core Config Manager Configuration SnapshotsNagios XI Core Config Manager Escalation WizardNagios XI Core Config Manager Host GroupsNagios XI Core Config Manager How It WorksNagios XI Core Config Manager Service GroupsNagios XI Core Configuration Mananger Display IssuesNagios XI Core Configuration Mananger Mass ChangesNagios XI Create Actions URL Link In Quick Actions MenuNagios XI Create Host And Service URLs With FiltersNagios XI Creating Nagios XI WizardsNagios XI Cron JobsNagios XI Custom Wizards, Components and Dashlets NWC12Nagios XI Customizing The Landing PageNagios XI DB Maintenance ArchitectureNagios XI Database OptimizationNagios XI Display All Scheduled ReportsNagios XI Distributed Monitoring With NRDPNagios XI Downgrading Nagios CoreNagios XI Downloading A System ProfileNagios XI Email Notifications With ColorNagios XI Enabling Ping ActionNagios XI Enterprise Edition ReportsNagios XI Event Manager ArchitectureNagios XI Excluding Hosts And HostgroupsNagios XI Exploring the Graph ExplorerNagios XI Exporting the Config DatabaseNagios XI Folder Watch WizardNagios XI Gauges Understanding ThresholdsNagios XI Generating GraphsNagios XI Generating Reports With Nagios XINagios XI Google Map IntegrationNagios XI Group Deployment of Service Checks NWC15Nagios XI GroupsNagios XI Host and Service Details OverviewNagios XI Hostgroup InheritanceNagios XI How SNMP Traps WorkNagios XI How SNMP Works A Quick GuideNagios XI How To Achieve High AvailabilityNagios XI How To Apply Configuration Using The APINagios XI How To Check For Windows Updates With Nagios XINagios XI How To Create A Virtual Instance In The Amazon EC2 Cloud EnvironmentNagios XI How To Delete A Data Source From An RRD FileNagios XI How To Install On Windows Using Hyper VNagios XI How To Install On Windows Using VMwareNagios XI How To Install On Windows Using vSphereNagios XI How To Monitor A Websensor EM08Nagios XI How To Monitor Apache ActiveMQ With Nagios XINagios XI How To Monitor Apache TomcatNagios XI How To Monitor Devices Using The NCPA Agent and WizardNagios XI How To Monitor Docker ContainersNagios XI How To Monitor GlassFishNagios XI How To Monitor JBoss/WildFlyNagios XI How To Monitor JMX With Nagios XINagios XI How To Monitor Jetty JMXNagios XI How To Monitor WebLogicNagios XI How To Monitor Website Defacement With Nagios XINagios XI How To Select A DownloadNagios XI How To Test Check Commands From The Command lineNagios XI How To Use CA Certificates With check_ldaps PluginNagios XI How To Use Capacity PlanningNagios XI How To Use Deadpool In Nagios XINagios XI How To Use The Actions ComponentNagios XI How To Use The Bulk Host Cloning & Import WizardNagios XI How To Write Custom ComponentsNagios XI How XI WorksNagios XI How to Authenticate and Import -Users with Active DirectoryNagios XI How to Change Default PasswordsNagios XI How to Configure Email And Text NotificationsNagios XI How to Generate SLA ReportsNagios XI How to Install & Configure the Oracle Client & PluginsNagios XI How to Integrate SNMP Traps With Nagios XINagios XI How to Integrate the Bischeck Plugin Extension with Nagios XINagios XI How to Manage Remote Nagios XI ServersNagios XI How to Manually Update Nagios XINagios XI How to Monitor Apache Cassandra Distributed DatabasesNagios XI How to Monitor an AKCP SensorProbe2 using SNMPNagios XI How to Restart A Windows Service With NRPENagios XI How to Upgrade Using the Web UINagios XI How to Use the NSCA AddonNagios XI Importing Config Files From Nagios Core into Nagios XINagios XI Importing Nagios XI into Microsoft Hyper VNagios XI Inbound Email CommandsNagios XI Installing NSClient++Nagios XI License EntitlementsNagios XI Integrating Mod Gearman With Nagios XINagios XI Integrating Mod_Security With Nagios XINagios XI Integrating NagVis With Nagios XINagios XI Integrating On Call Schedules with Nagios NWC13Nagios XI Integrating PuTTY SSH LinksNagios XI Integrating Slack With Nagios XINagios XI Integrating autoIT With NagiosNagios XI Introduction Getting Started with Nagios XI NWC14Nagios XI Introduction to Event HandlersNagios XI JavaScript and jQuery Tips, Tricks and How To NWC14Nagios XI Leveraging and Understanding Performance Data and Graphs NWC13Nagios XI License Maintenance Status CheckNagios XI Link Directly to Graph Explorer GraphsNagios XI Log Locations and DescriptionsNagios XI Log Monitoring with SwatchNagios XI Log Server Integration WizardNagios XI Logging InNagios XI MRTG Clean ConfigsNagios XI Macros and Custom Object VariablesNagios XI Manage MIBs ArchitectureNagios XI Managing ComponentsNagios XI Managing Mobile CarriersNagios XI Managing Plugins In Nagios XINagios XI Managing UsersNagios XI Manual Backup And Restore DatabasesNagios XI Manual Config File ManagementNagios XI Mass Acknowledgement in Nagios XI 2024Nagios XI Mass Delete Old RRD FilesNagios XI Maximizing Performance In Nagios XINagios XI Migrate Performance DataNagios XI Migrating From Nagios CoreNagios XI Mobile User InterfaceNagios XI Mod Gearman Queues and WorkersNagios XI Modifying The Contents Of /usr/local/nagios/etcNagios XI Monitor Active Directory with LDAPNagios XI Monitoring A MySQL ServerNagios XI Monitoring A Nagios XI ServerNagios XI Monitoring A Router Or SwitchNagios XI Monitoring A Website URLNagios XI Monitoring A Windows DesktopNagios XI Monitoring AIX With NagiosNagios XI Monitoring An FTP ServerNagios XI Monitoring An LDAP ServerNagios XI Monitoring Apache Tomcat With XINagios XI Monitoring DNS QueriesNagios XI Monitoring Hosts Using NRPE and NRPE Monitoring WizardNagios XI Monitoring Hosts Using SSHNagios XI Monitoring Linux ServersNagios XI Monitoring Linux Using NRPE and Linux Server Monitoring WizardNagios XI Monitoring Linux Using SNMPNagios XI Monitoring Microsoft SQLNagios XI Monitoring MongoDBNagios XI Monitoring OS/X with Nagios XINagios XI Monitoring Performance Counters in Nagios Using NCPANagios XI Monitoring Performance Counters in Nagios Using NSClient++Nagios XI Monitoring TCP/UDP PortsNagios XI Monitoring Unconfigured ObjectsNagios XI Monitoring Using the Full Power of Nagios XI Enterprise NWC15Nagios XI Monitoring VMware Virtualization Using vMA NWC14Nagios XI Monitoring VMware With Nagios XINagios XI Monitoring Websites With Nagios XINagios XI Monitoring Windows ServersNagios XI Monitoring Windows Using NSClient++Nagios XI Monitoring Windows With NCPANagios XI Monitoring Windows With SNMPNagios XI Monitoring the Nagios XI localhostNagios XI Moving Your XI InstallationNagios XI Multi Tech iSMS IntegrationNagios XI MultiTech MTR API IntegrationNagios XI MySQL/MariaDB Max ConnectionsNagios XI NSP Sorry Dave, I can’t let you do thatNagios XI Nagios AgentsNagios XI Nagios Network Analyzer Reports In XINagios XI Nagios Rapid Deployment Options NWC14Nagios XI Navigating The Nagios XI DashboardNagios XI Network Status Map Customization (Legacy)Nagios XI Network Status Map CustomizationNagios XI Non Administrative UsersNagios XI Offloading MySQL to Remote ServerNagios XI Optimizing The PHP Settings FileNagios XI Overview of ReportingNagios XI Passive Monitoring With NRDS_WinNagios XI Passive Monitoring with NRDSNagios XI Performance Data ArchitectureNagios XI Performance Data AveragingNagios XI Performance Graphs & Graph ExplorerNagios XI Ports And ProtocolsNagios XI Receiving SNMP Traps From Nagios Network AnalyzerNagios XI Recurring Downtime SystemNagios XI Redundancy And Security PlanningNagios XI Removing All Historical DataNagios XI Restarting A Linux Service With NRPENagios XI Restarting Linux Services With NCPANagios XI Restarting Windows Services With NCPANagios XI Restoring A Configuration SnapshotNagios XI Restoring Default ConfigurationNagios XI Running Auto Discovery JobsNagios XI SNMP Monitoring SeriesNagios XI SNMP Trap HardeningNagios XI SNMP Trap TutorialNagios XI SNMP Trap v3 ConfigurationNagios XI SNMP Traps with NXTINagios XI STRICT_TRANS_TABLESNagios XI Scheduled Backup Log LevelNagios XI Scheduling Reports and PagesNagios XI Scheduling ReportsNagios XI Securing Your Nagios Server NWC13Nagios XI Sending SNMP TrapsNagios XI Service DependenciesNagios XI Setup Nagios XI to Send SMS AlertsNagios XI Should You Change RRD Retention PeriodsNagios XI Solaris Monitoring OptionsNagios XI Special CharactersNagios XI Standard Edition ReportsNagios XI Switch and Router Wizard ArchitectureNagios XI System RequirementsNagios XI Terminology OverviewNagios XI Two Factor AuthenticationNagios XI Under the Hood NWC15Nagios XI Understanding And Using Configuration WizardsNagios XI Understanding And Using DashboardsNagios XI Understanding And Using XI ToolsNagios XI Understanding Email SendingNagios XI Understanding Multi TenancyNagios XI Understanding Notification EscalationsNagios XI Understanding Notification VariablesNagios XI Understanding The User Macros ComponentNagios XI Understanding User MacrosNagios XI Understanding User PermissionsNagios XI Understanding the Nagios XI Directory StructureNagios XI Update Components And WizardsNagios XI Update Default snmptt.conf EVENTNagios XI Upgrading Nagios CoreNagios XI User GuideNagios XI Upgrading The Linux NRPE AgentNagios XI Uploading and Managing MIBSNagios XI Users And ContactsNagios XI Using Auto DiscoveryNagios XI Using DUO Two Factor AuthenticationNagios XI Using Different Notification MethodsNagios XI Using NSClient++ For Passive ChecksNagios XI Using Nagios BPINagios XI Using Nagios XI As A Security Tool Software VersionsNagios XI Using Nagios XI As A Security Tool Website DefacementNagios XI Using Recurring DowntimeNagios XI Using SSL with XI Active DirectoryNagios XI Using Scripts / Plugins With NCPANagios XI Using Scripts / Plugins With NSClient++Nagios XI Using The Config Import Prep ToolNagios XI Using The Core Config Manager For Host ManagementNagios XI Using The Core Config Manager For Service ManagementNagios XI Using The Custom Includes ComponentNagios XI Using The Host And Service Object Notes ComponentNagios XI Using The SNMP Walk WizardNagios XI Using The Traceroute ActionNagios XI Using ViewsNagios XI Using rrdcached with Nagios XINagios XI Using the Negate PluginNagios XI Utilizing Data Visualizations in Systems Management -NWC14Nagios XI Utilizing a RAM Disk in Nagios XINagios XI Virtual Machine NotesNagios XI WatchGuard Wizard UsageNagios XI Web Interface ArchitectureNagios XI What Is A Performance CounterNagios XI Wizards AchitectureNagios XI XI Server ConsiderationsNagios Xi Masquerading As Another UserNetwork Monitoring With NagiosNon Admin Walkthrough of Nagios XIParent/Child Host RelationshipsStarting a Nagios XI TrialTemplate IntroductionThird Party Plugins in Nagios XITwilio SMS IntegrationUnderstanding Hosts and Services in Nagios XIUnderstanding Tools in Nagios XIUsing The Generic Plugin Monitoring Wizard In Nagios XIUsing the Nagios XI World MapViewing Configuration Snapshot differencesWebInject InstructionsWorking with Hosts on the Mobile InterfaceWorking with Services on the Mobile InterfaceXI 5.10.0 and newer Postgress to MySQL ConversionOvercoming lack of VMware SDK with VMware Wizard

Third-Party Plugins in Nagios XI

Overview

This is an article on how to install an example 3rd-party plugin on the XI server and details on creating the command and arguments in the Core Config Manager.
This document also describes how to manage plugins on your Nagios XI system, including: finding and installing new plugins, defining commands, and using them in your services.

Note: Not all plugins that are available have the instructions for creating the commands and which arguments they need to run.

Finding and Installing New Plugins

The plugin chosen for the example is the check_snmp_lmsensors.pl

Downloaded here:
https://exchange.nagios.org/directory/Plugins/Network-Protocols/SNMP/check_snmp_lmsensors/details

  • The plugin is used to measure the CPU temperature and Fan speed of a remote linux system using SNMP.
  • It requires the remote system have the net-snmp package installed and the snmpd daemon configured and running.
  • It also requires the lm_sensors package installed and configured.

After you download the plugin and upload it to the XI server using the Admin > Manage Plugins menu, you need to run it from the command line to determine what the plugin needs to run and to use that information to create the command.
Most plugins have a help option you can run to view what sort of arguments it needs.

Example of running the help option:

/usr/local/nagios/libexec/check_snmp_lmsensors.pl -h

Note: Uploading the plugin does not create a command in Nagios.

Here is the output of the plugin:

Can't locate Nagios/Plugin.pm in @INC (you may need to install the Nagios::Plugin module) 

(@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) 

at /usr/local/nagios/libexec/check_snmp_lmsensors.pl line 20.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_snmp_lmsensors.pl line 20.

That message means that the plugin has a requirement needed to run. It needs a perl module installed on the Nagios server called Nagios::Plugin but that module is obsolete and has been replaced with a new one called Nagios::Monitoring::Plugin.

Edit the plugin and change the following from:

use Nagios::Plugin;
my $p = Nagios::Plugin->new(

to:

use Nagios::Monitoring::Plugin;
my $p = Nagios::Monitoring::Plugin->new(

Save the change. Run with the help option:

/usr/local/nagios/libexec/check_snmp_lmsensors.pl -h

Now the help option produces this as the output:

This nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
It may be used, redistributed and/or modified under the terms of the GNU
General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).

This plugin checks the given sensor (Fan or Temp) on the remote
 host with snmp and will output OK, WARNING or CRITICAL if the resulting number
 is between the specified thresholds. Remote host needs lmsensors-enabled net-snmpd.

Usage: check_snmp_lmsensors.pl [ -v|--verbose ] [-H <host>] [-t <timeout>]
 [ -C|--community=<COMMUNITY NAME> ] [ -s|--sensor=<Temp> or <Fan> ]
 [ -i|--index=<sensor index> ]
 [ -c|--critical=<critical threshold> ] [ -w|--warning=<warning threshold> ]

-?, --usage
 Print usage information
 -h, --help
 Print detailed help screen
 -V, --version
 Print version information
 --extra-opts=[section][@file]
 Read options from an ini file. See https://nagios-plugins.org/doc/extra-opts.html
 for usage and examples.
 -w, --warning=INTEGER,[INTEGER]
 Maximum number of allowable result, outside of which a
 warning will be generated. If omitted, no warning is generated.
 -c, --critical=INTEGER,[INTEGER]
 Maximum number of the generated result, outside of
 which a critical will be generated.
 -s, --sensor=STRING
 Specify the Sensortype on the command line. Use Temp or Fan.
 -i, --index=INTEGER
 Specify the Sensor numbers on the command line.
 -C, --community=STRING
 Specify the community name on the command line.
 -H, --host=STRING
 Specify the host on the command line.
 -t, --timeout=INTEGER
 Seconds before plugin times out (default: 15)
 -v, --verbose
 Show details for command-line debugging (can repeat up to 3 times)

 THRESHOLDs for -w and -c are specified 'min:max' or 'min:' or ':max'
 (or 'max'). If specified '@min:max', a warning status will be generated
 if the count *is* inside the specified range.

Examples:

check_snmp_lmsensors -w 10 -c 18 Returns a warning
 if the resulting number is greater than 10,
 or a critical error
 if it is greater than 18.

check_snmp_lmsensors -w 10 : -c 4 : Returns a warning
 if the resulting number is less than 10,
 or a critical error
 if it is less than 4.

In the usage section of the help, you will see the options that are needed for the plugin to run.

The following are the minimal options that are needed to run the plugin:

  • [-H <host>]
  • [ -C|--community=<COMMUNITY NAME> ]
  • [ -s|--sensor=<Temp> or <Fan> ]
  • [ -i|--index=<sensor index> ]
  • [ -c|--critical=<critical threshold> ]
  • [ -w|--warning=<warning threshold> ]

Defining the Command

To create a command in XI so go to the Core Config Manager > Commands menu and add a new command.

Name the command: check_snmp_lmsensors

And for the Command line, we will define it like the following:

$USER1$/check_snmp_lmsensors.pl -H $HOSTADDRESS$ -C $ARG1$ -s $ARG2$ -i $ARG3$ -w $ARG4$ -c $ARG5$ $ARG6$

Make it active and save the command and apply the config.

Command Configuration

  • $ARG1$ will be used for the plugins Community String.
  • $ARG2$ will be used for the plugins Sensor type. Fan or Temp.
  • $ARG3$ will be used for the plugins index to which Fan or Temperature we want to monitor.
  • $ARG4$ will be used for the plugins Warning Threshold.
  • $ARG5$ will be used for the plugins Critical Threshold.
  • $ARG6$ will be used for any miscellaneous arguments that may be needed in the future.

See this link for more details on how ARGx are used in commands and checks.
https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/macros.html#arg

Using in Services

Create a Service by going to the Core Config Manager > Services menu.

Give it a Config Name. Typically, it is the name of the host we are monitoring.

This service is going to monitor the CPU temperature so the Description used is called CPU Temperature.

Click on the Manage Hosts button and select the host and then click on the Manage Templates and select a template you want to use.

Check the Active box to make the check active.

For the Check Command, we will select the command check_snmp_lmsensors

  • In $ARG1$ fill in the Community string of the remote server that we are monitoring
  • In $ARG2$ is the Sensor we are monitoring which will be Temp.
  • In $ARG3$ is the sensor index for the CPU temp which is 1.
  • In $ARG4$ is the temperature warning threshold.
  • In $ARG5$ is the temperature warning threshold.
  • In $ARG6$ will be left blank.

Save the Service and Apply the Config.

Service Configuration

To monitor a Fan, most of the settings will be the same, so copy the Temperature service and edit the Description.

  • Call it CPU Fan.
  • Change $ARG2$ to Fan which is the Sensor Type.
  • The Threshold settings will have to be adjusted as well.

Save the Service and Apply the Config.

Fan Service Configuration

After a few minutes, go to the Home > Host Status menu and select the Host and show it's services.

Here you will see the Status of the CPU Temperature and Fan for the newly created service checks.

Further Information

Managing_Plugins_in_Nagios_XI

Nagios Enterprises, LLC

© All rights reserved. 2026