•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Infrastructure
      • iColocation
    • Compute
      • cMetal
      • cVirtual
    • Storage
      • sObject
      • sBlock
    • Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • Protection
      • pBackup
      • pDDoS
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • new-colocation-header-img
      Infrastructure
      • iColocation
    • new-compute-header-img
      Compute
      • cMetal
      • cVirtual
    • new-storage-header-img
      Storage
      • sObject
      • sBlock
    • new-networking-header-img
      Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • new-protection-header-img
      Protection
      • pBackup
      • pDDoS
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

Configure Nagios snmp monitoring

  • Home
  • Client
  • Qa Forum
  • Configure Nagios snmp monitoring

Posted By: Lachlan | 1 Replies | Last Reply On: Oct 12, 2017 04:13:42

How to configure SNMP monitoring for Nagios? 

Psychz - Raviteja

Votes: 0Posted On: Oct 12, 2017 04:13:42
 

Hi! We will guide you through the process of configuring Nagios for SNMP monitoring. We are assuming that you have Nagios Core and Plugins installed and configured on your server. Also, the host on which you want the SNMP monitoring should also be configured on the host server before configuring SNMP.   

 

Prerequisites 

1. Operating System - CentOS 7 

2. Nagios Core(Latest stable version) - Installed and configured. Please visit the following link to install Nagios Core and Nagios Plugins on CentOS 7. 

https://www.psychz.net/client/question/en/how-to-install-nagios-on-linux-step-by-step.html

3. Nagios Plugin should be installed

4. Host to be monitored - The remote host to be monitored should also be configured on the server.  

 

 

SNMP Installation

1. Install SNMP on your CentOS operating system.

yum install net-snmp -y

 

2. Once the SNMP is installed, the configuration files are stored in "/etc/snmp/snmpd.conf". To be safe, we can create a backup of the file.

mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak

 

3. Next, we have to add the IP address and name to the configuration file. 

rocommunity public IP_address_of_your_server

where "public" is the community name followed by IP address of your server.

 

4. Now start the SNMP service.

service snmpd start

 

5. Set the SNMP service such that it starts on boot.

chkconfig snmpd on

 

 

Configuration of SNMP command block

Before proceeding further, please make sure that the Nagios plugins are installed. You can visit the following link to install plugins. Please check that "/usr/local/nagios/libexec/check_snmp" exists or the plugin is not installed correctly.

https://www.psychz.net/client/question/en/how-to-install-nagios-on-linux-step-by-step.html

 

In this part of the setup, we will create a command line for SNMP monitoring. The SNMP commands are stored in "/usr/local/nagios/etc/objects/commands.cfg". Under this file, you will find the format of SNMP command. Here is a sample of the same.


define command{
        command_name    check_snmp
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
} 

 

 

CPU Load check of Remote Server

On the basis of this format, we define three commands that perform SNMP checks at an interval of 1 and 15 minutes respectively.


define command{
        command_name    snmp_load_1m
        command_line    $USER1$/check_snmp -o .1.3.6.1.4.1.2021.10.1.3.1 -H $HOSTADDRESS$ $ARG1$
}
 
define command{
        command_name    snmp_load_15m
        command_line    $USER1$/check_snmp -o .1.3.6.1.4.1.2021.10.1.3.3 -H $HOSTADDRESS$ $ARG1$
}


These commands create the SNMP checks with the appropriate OIDs. 
(Note: OIds are Object IDs each designed to perform a specific task.)


Now, open the host configuration file that you must have created at the time of adding a host to the Nagios server. To the host configuration file, please add the following service checks.


define service{
        use                     generic-service
        host_name               test.linux.com
        service_description     CPU load One Minute Interval
        check_command           snmp_load_1m!-C public
}
 
define service{
        use                     generic-service
        host_name               test.linux.com
        service_description     CPU load Fifteen Minute Interval
        check_command           snmp_load_15m!-C public
}


Here is a description of all the fields in "define service block".

1. Use - The category of the service

2. host_name - The host on which the service is to be monitored.

3. service_description - The brief description of service

4. check_command  - The check command used. (Note: THe -C is used for adding the community)

Similarly, you can perform SNMP check on other system maintenance tasks such as Disk Usage, RAM usage, System Uptime among others.

Was this reply helpful?

Related topics

  • PDU recommendation with SNMP and port power monitoring
  • Best Open Source Monitoring Tools For Server
  • How does Nagios monitoring work?
  • How to do PDU monitoring for colocation?
  • How to configure an IP range on Centos 7?
  • Reference Architecture (Active-Passive Configuration)
  • Free Server Performance Monitoring Tools
  • cVirtual Best Security Practices
  • Community Strings For Psychz Networks
  • The ELK Stack: Elasticsearch, Logstash, Kibana.
  • What is IPMI? Benefits and Drawbacks?
  • DDoS Attacks Are Still On The Rise
  • Why Gaming Companies are Choosing Bare Metal Servers
  • Tools That Make Kubernetes Easier
  • Cloud Deployment on Dedicated Servers
Copyright © 2025 Psychz Networks,
A Profuse Solutions Inc Company
Hosting Services
Infrastructure
  • iColocation
Compute
  • cMetal
  • cVirtual
Storage
  • sObject
  • sBlock
Networking
  • nCDN
  • nIP Transit
  • nWavelength
Protection
  • pBackup
  • pDDoS
Company
  • About Us
  • Blog
  • Careers
  • Contact Us
  • Data Centers
  • Looking Glass
  • Network
  • Reseller
Policies
  • Acceptable Usage Policy
  • Privacy Policy
  • Service Level Agreement
  • Terms and Conditions
Support
  • Community
  • Knowledge Base
  • Open A Ticket
Get In Touch
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801