所以我在我的Ubuntu服务器上有一个Gunicorn服务。
首先,我将proc gunicorn添加到这个文件中:/etc/snmp/snmpd.conf。
但我不知道怎样才能得到正确的价值。
我看到了这个问题(如何使用SNMP监视服务?)并尝试了这个命令snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.25.4.2.1.2,但是我收到了这样的消息:
HOST-RESOURCES-MIB::hrSWRunName = No more variables left in this MIB View (It is past the end of the MIB tree)
所以我想OID是错的,或者我有其他的配置。
如何使用snmp获取服务的状态?
发布于 2021-07-11 05:13:42
由于snmpd守护进程配置(/etc/snmp/snmpd.conf),您可能无法看到用于进程监视的相应输出。
# As shipped, the snmpd demon will only respond to queries on the
# system mib group until this file is replaced or modified for
# security purposes. 仅用于调试目的,可以通过编辑/etc/snmp/snmpd.conf将访问控制配置为完全打开。
# name incl/excl subtree mask(optional)
view allview included .1
# group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact allview none none然后重新启动snmpd守护进程。
systemctl restart snmpd这仅仅是为了调试目的,对于生产,访问控制应该被调优为不那么允许。
发布于 2019-02-13 19:29:43
snmpwalk -v 2c -c 209ijvfwer0df92jd -O e 127.0.0.1 1.3.6.1.2.1.25.4.2.1.2https://serverfault.com/questions/934468
复制相似问题