[Linux-ha-dev] Proposed Linux-HA SNMP Agent MIB Changes
Zou, Yixiong
yixiong.zou at intel.com
Mon Oct 18 18:17:11 MDT 2004
I had a very good chat with my colleague the other day about the current
Linux-HA mib file. Basically I now realize that the current Linux-HA
mib
is not very script-friendly. It just shows how clueless I was when I
was
drafting the MIB.
There are a couple things that are addressed this time:
1) A CurrentNodeID is added to the ClusterInfo group. This can be used
to determine the node id that this SNMP agent is running on.
2) A resourceGroupCount is added to the ClusterInfo group. This can be
used to determine how many resource group is currently configured.
3) The IFTable. Removed the nodename as one of the indexes in the
IFTable.
Because string is so much harder to parse and an nodeIndexID would be
enough.
4) The ResourceGroupTable is changed to so that the primary node name
is not part of the index. It will just be indexed by a number.
below is the updated MIB. Again, feedbacks are welcome.
-- Linux-HA: SNMP Subagent
--
-- Copyright (C) 2002 Yixiong Zou (yixiong.zou at intel.com)
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
--
LINUX-HA-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, enterprises,
Counter32, INTEGER, Integer32
FROM SNMPv2-SMI
TEXTUAL-CONVENTION, DisplayString,
TimeStamp, TruthValue, DateAndTime
FROM SNMPv2-TC
MODULE-COMPLIANCE, OBJECT-GROUP
FROM SNMPv2-CONF;
LinuxHA MODULE-IDENTITY
LAST-UPDATED "200211040000Z" -- Nov. 4, 2002
ORGANIZATION "High-Availability Linux Project"
CONTACT-INFO
"Alan Robertson
Postal: Linux-HA Project
13750 Bayberry Drive
Broomfield, CO 80020-6163
Phone: 303-466-7405
FAX: n/a
Email: alanr at unix.sh
Yixiong Zou
Postal: Intel Corp.
CO5-162
15400 NW Greenbrier Parkway
Beaverton, OR 97006
USA
Phone: 503-677-4988
Fax: 503-677-6670
Email: yixiong.zou at intel.com
In addition, the Linux-HA mailing list is where all the
discussion about this MIB happens. To join the mailing list,
send a request message to linux-ha-subscribe at muc.de.
The mailing list address is
linux-ha-dev at lists.community.tummy.com."
DESCRIPTION
"This MIB can be used to manage a Linux-HA cluster. The initial
plan is
to make the heartbeat, resource managment, and memberships
accessible
through SNMP. Hopefully more things can be added as Linux-HA
matures."
REVISION "200211040000Z" -- Nov. 4, 2002
DESCRIPTION
"The original version of this MIB."
::= { enterprises 4682 }
-- Current LinuxHA core MIB entries
-- LHAClusterInfo OBJECT IDENTIFIER ::= { LinuxHA 1 }
-- LHANodeTable OBJECT IDENTIFIER ::= { LinuxHA 2 }
-- LHAIFStatusTable OBJECT IDENTIFIER ::= { LinuxHA 3 }
-- LHAResourceGroupTable OBJECT IDENTIFIER ::= { LinuxHA 4 }
-- LHAMembershipTable OBJECT IDENTIFIER ::= { LinuxHA 6 }
-- LHAHeartbeatConfigInfo OBJECT IDENTIFIER ::= { LinuxHA 7 }
-- LHATrapTable OBJECT IDENTIFIER ::= { LinuxHA 900
}
LHAClusterInfo OBJECT IDENTIFIER ::= { LinuxHA 1 }
LHATotalNodeCount OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of nodes that are currently configured for this
cluster."
::= { LHAClusterInfo 1 }
LHALiveNodeCount OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of nodes that are currently active in this cluster."
::= { LHAClusterInfo 2 }
LHACurrentNodeID OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The nodes id of the host that this agent currently represents.
This value is the same as the LHANodeIndex value of this node."
::= { LHAClusterInfo 3 }
LHAResourceGroupCount OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total number of Resource Groups that has been configured
for this cluster."
::= { LHAClusterInfo 4 }
LHANodeTable OBJECT-TYPE
SYNTAX SEQUENCE OF lhaNodeEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A table contains information about all the nodes in the
cluster."
::= { LinuxHA 2 }
LHANodeEntry OBJECT-TYPE
SYNTAX lhaNodeEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry containing a node and its statistics."
INDEX { LHANodeIndex }
::= { LHANodeTable 1 }
lhaNodeEntry ::= SEQUENCE {
LHANodeIndex Integer32,
LHANodeName DisplayString,
LHANodeType DisplayString,
LHANodeStatus DisplayString,
LHANodeUUID DisplayString,
LHANodeIFCount Counter32,
}
LHANodeIndex OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An integer that uniquelly identifies a node in a cluster."
::= { LHANodeEntry 1 }
LHANodeName OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A readable name that represents that node."
::= { LHANodeEntry 2 }
LHANodeType OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"There could be many types of nodes in the cluster. For
example, a node could be a normal node, or a ping node depending
on the configuration."
::= { LHANodeEntry 3 }
LHANodeStatus OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The status of the node. For heartbeat, this would normally be
init, up, active, or dead. Since the status can be customrized,
it is defined as a DisplayString instead of an INTEGER."
::= { LHANodeEntry 4 }
LHANodeUUID OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The UUID of the current node."
::= { LHANodeEntry 5 }
LHANodeIFCount OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of interfaces that is used by heartbeat
for this node."
::= { LHANodeEntry 6 }
LHAIFStatusTable OBJECT-TYPE
SYNTAX SEQUENCE OF lhaIFEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A table containing all the interfaces of a node."
::= { LinuxHA 3 }
LHAIFStatusEntry OBJECT-TYPE
SYNTAX lhaIFStatusEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry containing information about that interface.
The LHANodeIndex is listed in the LHANodeTable."
INDEX { LHANodeIndex, LHAIFIndex }
::= { LHAIFStatusTable 1 }
lhaIFStatusEntry ::= SEQUENCE {
LHAIFIndex Integer32,
LHAIFName DisplayString,
LHAIFStatus DisplayString
}
LHAIFIndex OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An unique integer identifies this interface."
::= { LHAIFStatusEntry 1 }
LHAIFName OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A name for this interface."
::= { LHAIFStatusEntry 2 }
LHAIFStatus OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The status for this interface.
NOTE WELL
This is somewhat confusing as Linux-HA only reports if the
heartbeat
can be heard on that interfce or not. So for ethernet
interfaces, the
interfaces for the node itself is always dead as no heartbeat
can be
heard on that interface."
::= { LHAIFStatusEntry 3 }
LHAResourceGroupTable OBJECT-TYPE
SYNTAX SEQUENCE OF lhaResourceGroupEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A table containing information for resource groups."
::= { LinuxHA 4 }
LHAResourceGroupEntry OBJECT-TYPE
SYNTAX lhaResourceGroupEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry containing a resource group and its information."
INDEX { LHAResourceGroupIndex }
::= { LHAResourceGroupTable 1 }
lhaResourceGroupEntry ::= SEQUENCE {
LHAResourceGroupIndex Integer32,
LHAResourceGroupMaster DisplayString,
LHAResourceGroupResources DisplayString,
LHAResourceGroupStatus Integer32
}
LHAResourceGroupIndex OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A unique integer that identifies this resource group that
'belongs'
to a particular resource mater node."
::= { LHAResourceGroupEntry 1 }
LHAResourceGroupMaster OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The master node of this resource group. This is normally the
node that controls this resource group.
For example, if the line in haresources is shown as the
following:
just.linux-ha.org 192.168.1.1 httpd
then the host name: just.linux-ha.org will be the value for
LHAResourceGroupMaster"
::= { LHAResourceGroupEntry 2 }
LHAResourceGroupResources OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The resources contained in this resource group."
::= { LHAResourceGroupEntry 3 }
LHAResourceGroupStatus OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The status of this resource group.
0 program is running
1 program is dead and /var/run pid file exists
2 program is dead and /var/lock lock file exists
3 program is stopped
4-100 reserved for future LSB use
100-149 reserved for distribution use
150-199 reserved for application use
200-254 reserved
"
::= { LHAResourceGroupEntry 4 }
LHAMembershipTable OBJECT-TYPE
SYNTAX SEQUENCE OF lhaMembershipEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A table containing membership information for the cluster.
A successful membership has to have qurom.
NOTE WELL
If this table does not contain any entries, that means the
node is not part of the cluster membership."
::= { LinuxHA 6 }
LHAMembershipEntry OBJECT-TYPE
SYNTAX lhaMembershipEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry containing a member and its status."
INDEX { LHAMemberIndex }
::= { LHAMembershipTable 1 }
lhaMembershipEntry ::= SEQUENCE {
LHAMemberIndex Integer32,
LHAMemberName DisplayString,
LHAMemberAddress DisplayString,
LHAMemberClusterName DisplayString,
LHAMemberIsMember TruthValue,
LHAMemberLastChange INTEGER,
LHAMemberBootTime TimeStamp,
}
LHAMemberIndex OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A unique integer that identifies this member."
::= { LHAMembershipEntry 1 }
LHAMemberName OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The name of the cluster member."
::= { LHAMembershipEntry 2 }
LHAMemberAddress OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The address of the cluster member."
::= { LHAMembershipEntry 3 }
LHAMemberClusterName OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The name of this cluster."
::= { LHAMembershipEntry 4 }
LHAMemberIsMember OBJECT-TYPE
SYNTAX TruthValue
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"If this node is part of the membership or not."
::= { LHAMembershipEntry 5 }
LHAMemberLastChange OBJECT-TYPE
SYNTAX INTEGER {
nochange (1),
joined (2),
left (3)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"If this node is part of the membership or not."
::= { LHAMembershipEntry 6 }
LHAMemberBootTime OBJECT-TYPE
SYNTAX TimeStamp
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The time when this cluster member last started."
::= { LHAMembershipEntry 7 }
LHAHeartbeatConfigInfo OBJECT IDENTIFIER ::= { LinuxHA 7 }
LHAHBVersion OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The heartbeat version."
::= { LHAHeartbeatConfigInfo 1 }
LHAHOPFudge OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of hops count minus the numer of nodes in cluster."
::= { LHAHeartbeatConfigInfo 2 }
LHAKeepAlive OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The heartbeat interval."
::= { LHAHeartbeatConfigInfo 3 }
LHADeadTime OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The time it waits before declaring a node to be dead."
::= { LHAHeartbeatConfigInfo 4 }
LHADeadPing OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The time it waits before declaring a ping node to be dead."
::= { LHAHeartbeatConfigInfo 5 }
LHAWarnTime OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The time it waits before issuing a 'late heartbeat' warning."
::= { LHAHeartbeatConfigInfo 6 }
LHAInitDead OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Very first dead time. Should be twice the normal dead time."
::= { LHAHeartbeatConfigInfo 7 }
LHAWatchdogTimer OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Watchdog timer that is configured for this node."
::= { LHAHeartbeatConfigInfo 8 }
LHABaudRate OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Baud rate for serial ports."
::= { LHAHeartbeatConfigInfo 9 }
LHAUDPPort OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"UDP port used for heartbeat communication."
::= { LHAHeartbeatConfigInfo 10 }
LHNiceFailBack OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This is an obsolete option for the failback setting."
::= { LHAHeartbeatConfigInfo 11 }
LHAutoFailBack OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Determins whether a resource will automatically fail back to
its primary node, or remain on whatever the node is serving.
Possible values are: on, off, legacy."
::= { LHAHeartbeatConfigInfo 12 }
LHAStonith OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The STONITH device configured for this cluster."
::= { LHAHeartbeatConfigInfo 13 }
LHAStonithHost OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The STONITH host configured for this cluster."
::= { LHAHeartbeatConfigInfo 14 }
LHARespawn OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The other services that got respawned by heartbeat daemon."
::= { LHAHeartbeatConfigInfo 15 }
LHAGenMethod OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Heartbeat Generation Method creation method. Normally this is
stored on disk and incremented as needed."
::= { LHAHeartbeatConfigInfo 16 }
LHARealTime OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Realtime excution of heartbeat. High Priority, etc."
::= { LHAHeartbeatConfigInfo 17 }
LHARTPriority OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Realtime Priority."
::= { LHAHeartbeatConfigInfo 18 }
LHADebugLevel OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The debug level. Default is 0."
::= { LHAHeartbeatConfigInfo 19 }
LHANormalPoll OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"To use normal Poll instead of heartbeat's own poll() call."
::= { LHAHeartbeatConfigInfo 20 }
LHAAPIAuth OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The authentication information needed for the heartbeat
clients."
::= { LHAHeartbeatConfigInfo 21 }
LHAMsgFmt OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Heartbeat message format."
::= { LHAHeartbeatConfigInfo 22 }
LHALogFile OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Log file location."
::= { LHAHeartbeatConfigInfo 23 }
LHADebugFile OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Debug file location."
::= { LHAHeartbeatConfigInfo 24 }
LHALogFacility OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Log facility to use."
::= { LHAHeartbeatConfigInfo 25 }
LHATrapTable OBJECT IDENTIFIER ::= { LinuxHA 900 }
LHANodeStatusUpdate NOTIFICATION-TYPE
OBJECTS { LHANodeName LHANodeStatus }
STATUS current
DESCRIPTION
"A node status change event just happened."
::= { LHATrapTable 1 }
LHAIFStatusUpdate NOTIFICATION-TYPE
OBJECTS { LHANodeName LHAIFName LHAIFStatus }
STATUS current
DESCRIPTION
"A link status just changed."
::= { LHATrapTable 3 }
LHAMembershipChange NOTIFICATION-TYPE
OBJECTS { LHANodeName LHAMemberLastChange }
STATUS current
DESCRIPTION
"A node just changed it membership. "
::= { LHATrapTable 5 }
END
-----------------------------------
Yixiong Zou (yixiong.zou at intel.com)
All views expressed in this email are those of the individual sender.
More information about the Linux-HA-Dev
mailing list