0
我正在嘗試配置SNMP以在Linux(RHEL 7)框上公開多個進程以進行監視。我已將相應的proc
指令添加到snmp.conf
,並對snmpd
進行了重新加載和重新啓動以嘗試使其工作,但這些進程的信息不可見。無法在RHEL中通過SNMP查看特定進程
我不是一個誰做基礎snmpd
配置,我不是非常熟悉的「如何做」的snmpd
的配置,但在我看來,該snmpd.conf
幾乎是默認的配置文件,所以我懷疑我缺少一些簡單的東西,我需要添加。
這裏是snmpd.conf
經過消毒的版本:
###############################################################################
#
# snmpd.conf:
#
###############################################################################
#
# Many more configuration directives exist than are mentioned in this file.
# For full details, see the snmpd.conf(5) manual page.
#
# All lines beginning with a '#' are comments and are intended for you
# to read. All other lines are configuration commands for the agent.
###############################################################################
# Access Control
###############################################################################
# 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.
####
# First, map the community name "changeme" into a "security name"
# sec.name source community
com2sec notConfigUser default changeme
####
# Second, map the security name into a group name:
# groupName securityModel securityName
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
####
# Third, create a view for us to let the group have rights to:
# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
####
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact systemview none none
###############################################################################
###########################################################################
# SECTION: Monitor Various Aspects of the Running Host
#
# The following check up on various aspects of a host.
# proc: Check for processes that should be running.
# proc NAME [MAX=0] [MIN=0]
#
# NAME: the name of the process to check for. It must match
# exactly (ie, http will not find httpd processes).
# MAX: the maximum number allowed to be running. Defaults to 0.
# MIN: the minimum number to be running. Defaults to 0.
#
# The results are reported in the prTable section of the UCD-SNMP-MIB tree
# Special Case: When the min and max numbers are both 0, it assumes
# you want a max of infinity and a min of 1.
proc httpd
這裏的消毒輸出snmptable
:
[[email protected] ~]$ snmptable -v1 -Ci -Cb -c changeme localhost .1.3.6.1.4.1.2021.2
End of MIB
UCD-SNMP-MIB::ucdavis: No entries
[[email protected] ~]$