이 콘텐츠는 선택한 언어로 제공되지 않습니다.
9.8. Querying a Pacemaker Cluster with SNMP (Red Hat Enterprise Linux 7.5 and later)
As of Red Hat Enterprise Linux 7.5, you can use the
pcs_snmp_agent
daemon to query a Pacemaker cluster for data by means of SNMP. The pcs_snmp_agent
daemon is an SNMP agent that connects to the master agent (snmpd
) by means of agentx
protocol. The pcs_snmp_agent
agent does not work as a standalone agent as it only provides data to the master agent.
The following procedure sets up a basic configuration for a system to use SNMP with a Pacemaker cluster. You run this procedure on each node of the cluster from which you will be using SNMP to fetch data for the cluster.
- Install the
pcs-snmp
package on each node of the cluster. This will also install thenet-snmp
package which provides thesnmp
daemon.yum install pcs-snmp
# yum install pcs-snmp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add the following line to the
/etc/snmp/snmpd.conf
configuration file to set up thesnmpd
daemon asmaster agentx
.master agentx
master agentx
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add the following line to the
/etc/snmp/snmpd.conf
configuration file to enablepcs_snmp_agent
in the same SNMP configuration.view systemview included .1.3.6.1.4.1.32723.100
view systemview included .1.3.6.1.4.1.32723.100
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start the
pcs_snmp_agent
service.systemctl start pcs_snmp_agent.service systemctl enable pcs_snmp_agent.service
# systemctl start pcs_snmp_agent.service # systemctl enable pcs_snmp_agent.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To check the configuration, display the status of the cluster with the
pcs status
and then try to fetch the data from SNMP to check whether it corresponds to the output. Note that when you use SNMP to fetch data, only primitive resources are provided.The following example shows the output of apcs status
command on a running cluster with one failed action.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow