- yum install net-snmp
- systemctl enable snmpd
- systemctl start snmpd
- curl -o /usr/local/bin/distro https://gitlab.com/observium/distroscript/raw/master/distro
- chmod +x /usr/local/bin/distro
- mpd.conf:
- extend .1.3.6.1.4.1.2021.7890.1 distro /usr/local/bin/distro
- extend .1.3.6.1.4.1.2021.7890.2 hardware /bin/cat /sys/devices/virtual/dmi/id/product_name
- extend .1.3.6.1.4.1.2021.7890.3 vendor /bin/cat /sys/devices/virtual/dmi/id/sys_vendor
- extend .1.3.6.1.4.1.2021.7890.4 serial /bin/cat /sys/devices/virtual/dmi/id/product_serial
- extend uptime /bin/cat /proc/uptime
In some environments snmpd not have permission for read file /sys/devices/virtual/dmi/id/product_serial. Need to change file permission at boot by adding this command to /etc/rc.local: chmod 444 /sys/devices/virtual/dmi/id/product_serial
- Log into your dedicated server using Remote Desktop
- Click on Windows Key > Administrative Tools > Server Manager.
- Click Manage > Add Roles and Features.
- Click Next > Next > Next > Next. Verify SNMP Services are installed.
- Click Cancel. If SNMP is not installed, contact Support.
- Click on Windows Key > Administrative Tools > Services.
- Right-click on SNMP Service and click on Properties.
- Click on the Security tab.
- Type your randomized 8 - 10 character connection string. Be sure to make it Read Only, not Read Write.
- Get-WindowsCapability -Online -Name "SNMP*"
- Get-WindowsCapability -Online -Name "SNMP*"
- Add-WindowsCapability -Online -Name "SNMP.Client~~~~0.0.1.0"
- esxcli system snmp set --communities YOUR_STRING
- esxcli system snmp set --enable true
- esxcli network firewall ruleset set --ruleset-id snmp --allowed-all true
- esxcli network firewall ruleset set --ruleset-id snmp --enabled true
- /etc/init.d/snmpd restart
- esxcli system snmp set -r
- esxcli system snmp set -c YOUR_STRING
- esxcli system snmp set -p 161
- esxcli system snmp set -L "City, State, Country"
- esxcli system snmp set -C [email protected]
- esxcli system snmp set -e yes