VMware vSphere

 View Only

SNMPD service running or not?

  • 1.  SNMPD service running or not?

    Posted Oct 11, 2024 12:26 PM

    I've been trying to understand how the SNMPD service in ESXi behaves, as I am somewhat confused by some things that I see.

    We have an automated installation process, that at some point sets up SNMP, and finishes by doing :

    Get-VMHost | Get-VMHostService | Where-Object {$_.Key -eq "snmpd"} | Start-VMHostService -Confirm:$false

    The automation scripts even confirm the status later by writing the status of the service before and after that section of the installation process, and I have seen it change from False to True.

    However later on we have some installation checks that audit the system. This does the following:

    Get-VMHostService -VMHost * | Where-Object {$_.Key -eq 'snmpd'} | Sort-Object VMHost | FT VMHost, Label, Policy, Running -AutoSize

    This more often than not indicates that the service is at least enabled (Policy = On), but not actually running.

    VMHost     Label        Policy Running
    ------      -----       ------  -------
    Host-1      SNMP Server   on      False
    Host-2      SNMP Server   on      False
    Host-3      SNMP Server   on      False

    And yet, our system health monitor is getting traps when things are done like starting stopping VMs.

    Tinkering from a Powershell session and webclient, trying several commands to check SNMP settings and operation, I will occasionally notice that the web client shows the SNMPD is running, and a rerun of the audit checks will agree. 

    What is the behaviour of SNMPD supposed to be? If I set it running explicitly during host setup, should I expect it to be running thereafter, or does it not get started at the next reboot, or does it start and stop as required?