mirror of https://github.com/sipwise/heartbeat.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
README
Linux-HA SNMP Subagent
1. Introduction
The SNMP Subagent is based on AgentX protocol. It is implemented
using the NET-SNMP api. It exports the Linux-HA cluster information
through the SNMP interface so that the cluster can be monitored
remotely.
Currently, node, link, membership and heartbeat configuration
parameters can be viewed through SNMP command. In addition, SNMP traps
will be sent for node, link, and membership events.
Cluster Resources are not well supported. It only displays
the resources defined in the /etc/ha.d/haresource file for now. It
does not integrate with the CRM yet. The work is being planned.
2. Build
Here's how to build the subagent:
./ConfigureMe config --enable-snmp-subagent
You must have NET-SNMP library and header installed. On most
systems, these are the net-snmp and net-snmp-devel packages. The old
UCD-SNMP is no longer supported. As of this writing, the latest
NET-SNMP version is 5.1.
3. SNMP daemon Configuration
You need to turn on the Agentx support in the SNMP daemon.
Also you need to define at least one trap sink in order to receive
the traps. Also, the LINUX-HA-MIB.mib file needs to be installed
to your default mib location so the SNMP daemon can parse it.
This should be taken care of by the 'make install' though.
Here's what it normally takes in your snmpd.conf file:
# create a SNMPv1/SNMPv2 community
rwcommunity public
# this makes the snmpd a master snmp agent, which can
# support AgentX subagents.
master yes
# this defines your localhost as the trapsink. so traps
# or rather the SNMPv2 informs, will be sent to localhost.
trap2sink localhost
4. Demo Output
[yzou@matrix mibs]$ snmpwalk -v2c localhost -c public LinuxHA
LINUX-HA-MIB::LHATotalNodeCount.0 = Counter32: 2
LINUX-HA-MIB::LHALiveNodeCount.0 = Counter32: 2
LINUX-HA-MIB::LHANodeName.0 = STRING: phantom
LINUX-HA-MIB::LHANodeName.1 = STRING: matrix
LINUX-HA-MIB::LHANodeType.0 = STRING: normal
LINUX-HA-MIB::LHANodeType.1 = STRING: normal
LINUX-HA-MIB::LHANodeStatus.0 = STRING: active
LINUX-HA-MIB::LHANodeStatus.1 = STRING: active
LINUX-HA-MIB::LHAIFStatus."matrix.".0."eth0." = STRING: up
LINUX-HA-MIB::LHAIFStatus."phantom.".0."eth0." = STRING: up
LINUX-HA-MIB::LHAResourceGroupResources."matrix.".1 = STRING: 192.168.1.112
LINUX-HA-MIB::LHAResourceGroupResources."phantom.".1 = STRING: 192.168.1.111 httpd
LINUX-HA-MIB::LHAResourceGroupStatus."matrix.".1 = INTEGER: 0
LINUX-HA-MIB::LHAResourceGroupStatus."phantom.".1 = INTEGER: 3
LINUX-HA-MIB::LHAMemberName.0 = STRING: matrix
LINUX-HA-MIB::LHAMemberAddress.0 = STRING:
LINUX-HA-MIB::LHAMemberClusterName.0 = STRING:
LINUX-HA-MIB::LHAMemberIsMember.0 = INTEGER: true(1)
LINUX-HA-MIB::LHAMemberLastChange.0 = INTEGER: nochange(1)
LINUX-HA-MIB::LHAMemberBootTime.0 = Timeticks: (0) 0:00:00.00
LINUX-HA-MIB::LHAHBVersion.0 = STRING: 1.3.0.cvs.20040616
LINUX-HA-MIB::LHAHOPFudge.0 = STRING: 1
LINUX-HA-MIB::LHAKeepAlive.0 = STRING: 500ms
LINUX-HA-MIB::LHADeadTime.0 = STRING: 30
LINUX-HA-MIB::LHADeadPing.0 = STRING: 30000ms
LINUX-HA-MIB::LHAWarnTime.0 = STRING: 10
LINUX-HA-MIB::LHAInitDead.0 = STRING: 120
LINUX-HA-MIB::LHAWatchdogTimer.0 = STRING: N/A
LINUX-HA-MIB::LHABaudRate.0 = STRING: 19200
LINUX-HA-MIB::LHAUDPPort.0 = STRING: 694
LINUX-HA-MIB::LHNiceFailBack.0 = STRING: N/A
LINUX-HA-MIB::LHAutoFailBack.0 = STRING: on
LINUX-HA-MIB::LHAStonith.0 = STRING: N/A
LINUX-HA-MIB::LHAStonithHost.0 = STRING: N/A
LINUX-HA-MIB::LHARespawn.0 = STRING: N/A
LINUX-HA-MIB::LHAGenMethod.0 = STRING: file
LINUX-HA-MIB::LHARealTime.0 = STRING: true
LINUX-HA-MIB::LHARTPriority.0 = STRING: N/A
LINUX-HA-MIB::LHADebugLevel.0 = STRING: 0
LINUX-HA-MIB::LHANormalPoll.0 = STRING: true
LINUX-HA-MIB::LHAAPIAuth.0 = STRING: N/A
LINUX-HA-MIB::LHAMsgFmt.0 = STRING: classic
LINUX-HA-MIB::LHALogFile.0 = STRING: /var/log/ha-log
LINUX-HA-MIB::LHADebugFile.0 = STRING: /var/log/ha-debug
LINUX-HA-MIB::LHALogFacility.0 = STRING: local0
5. Bugs
Please forward all bug report to Linux-HA dev mailing list.