Unable to configure SNMP through the vCenter web interface for SNMP polling, and the monitoring collector is not receiving SNMP responses.
search cancel

Unable to configure SNMP through the vCenter web interface for SNMP polling, and the monitoring collector is not receiving SNMP responses.

book

Article ID: 377897

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

The customer is using ScienceLogic as a SNMP monitoring collector tool, but they are not receiving a response from vCenter when monitoring the SNMP collector.

We’ll discuss how to enable SNMP on the vCenter Server appliance and the detailed steps to configure vCenter SNMP to monitor your networking equipment.

Environment

vCenter 7.0 U3

Cause

Community String was not same on both (vCenter and SNMP Collector) the sides. 

In SNMP (Simple Network Management Protocol) configuration, a "community string" acts as a password that controls access to SNMP-enabled devices. It essentially serves as a form of authentication, allowing network management systems to query devices for information or send commands.

In the context of vCenter, the community string is used when configuring SNMP settings for monitoring virtual infrastructure. 

NOTE   : When setting up SNMP in vCenter, you need to define these community strings to ensure that only authorized management systems can access the monitored information. It's crucial to choose strong, unique strings to enhance security.

Error what customer was getting in SNMP collector : 

Resolution

Configure vCenter SNMP from command line

Here are the commands I have used for the vCenter SNMP configuration. Make sure you are able to login as the root user.

1. Run the command in the console to view the current configuration for SNMP status:

snmp.get

Output should look like : 

on vCenter UI the output should look like this : 

2. Configure the Simple Network Management Protocol communities on the vCenter Server appliance 7.0U3. To Set the community for VCSA, execute the below command

snmp.set --communities Management

3. Set the SNMP target. The SNMP target is a server on which monitoring software is installed to handle SNMP traps and collect monitoring information.

snmp.set --targets 172.x.x.x@162/management-server,172.20.x.x@162/management-server

Syntax :  snmp.set --targets SNMP_collector_IP@Portno./management-server.vCenter_Server_IP@Port_No./management-server

 

4. There are four levels of logging to choose from:  debug|info|warning|error  (“debug” has the highest level of verbosity, and “error” has the lowest). I will be configuring my logging level as “warning”.

snmp.set --loglevel warning

5. Enable the SNMP agent:

snmp.set --enable true

6. Check the SNMP status using the below command:

snmp.get

7. Once all the SNMP configuration is completed, you can send the test trap using the below command.

snmp.test

 

Conclusion :  If you see the snmp.get output in the third line there is a parameter with the name "communities" this is called as a community string  which should be same on vCenter and SNMP Collector. Post changing the communities parameter the issue got resolved.

 

 

Additional Information