Skip to content
Luca Dell'Oca Principal Cloud Architect @Veeam
Virtual To The Core Virtual To The Core

Virtualization blog, the italian way.

  • Media
  • About me
Virtual To The Core
Virtual To The Core

Virtualization blog, the italian way.

Usare snmp con ESX 4

Luca Dell'Oca, September 8, 2010December 4, 2016

Ho attivato da un cliente settimana scorsa il protocollo snmp di alcuni nodi esx, per poterli poi campionare con il loro sistema centralizzato, nello specifico Cacti.

Il protocollo snmp nativo di vmware è disabilitato per default, e va attivato e configurato prima di poterlo usare. ESX da a disposizione il demone net-snmp (snmpd) che però non mostra i MIB specifici di esx, ma solo quelli classici linux. Per abilitare anche il monitoraggio di parametri specifici vmware, bisogna “proxare” l’snmp nativo di vmware all’interno di net-snmp.

Si procede in questo modo:

  1. da vsphere client si abilita nel firewall dell’ESX la porta 161 di snmp!!
  2. si accede via ssh al nodo ESX
  3. service stop snmpd
  4. si edita /etc/snmp/snmpd.conf, e oltre ai vari parametri possibili, in particolare è necessario aggiungere la riga:
    proxy -v 1 -c public udp:127.0.0.1:171 .1.3.6.1.4.1.6876
    la porta 171 è solitamente proposta da vmware, in quanto i due snmp non possono ovviamente girare contemporaneamente sulla 161. Questa stringa dice a net-snmp di inoltrare tutte le richieste relative all’OID indicato (ovvero quello di vmware) a localhost sulla porta 171, ovvero dove è in ascolto l’snmp nativo
  5. tramite vsphere CLI, si configura il file /etc/vmware/snmp.xml usato dall’snmp nativo:
    vicfg-snmp.pl –server <hostname> –username <username> –password <password> -E -c public –port 171
  6. service mgmt-vmware restart
  7. service snmpd start

Adesso avrete la possibilità di collegare qualsiasi sistema snmp al nodo ESX.

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to email a link to a friend (Opens in new window) Email
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
Tecnologia esxsnmp

Post navigation

Previous post
Next post

Search

Sponsors

Latest Posts

  • Migrate WSL (Windows Subsystem for Linux) to a new computer
  • Pass keystrokes to a pfSense virtual machine to install it automatically
  • Automatically deploy pfSense with Terraform and Ansible
  • My Automated Lab project: #6 Create a S3 Bucket with Terraform
  • My Automated Lab project: #5 Deploy a Linux vSphere VM with Terraform and custom disks
©2025 Virtual To The Core | WordPress Theme by SuperbThemes
We use cookies to ensure that we give you the best experience on our website, and to collect anonymous data regarding navigations stats using 3rd party plugins; they all adhere to the EU Privacy Laws. If you continue to use this site we will assume that you are ok with it.OkNoPrivacy Policy