Added the count of locked and idle circuits to the SNMP trunk data.

git-svn-id: http://yate.null.ro/svn/yate/trunk@5028 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2012-04-24 22:24:09 +00:00
parent 701add70c8
commit b25d94adfc
3 changed files with 44 additions and 6 deletions

View File

@ -356,8 +356,10 @@ protected:
{
public:
enum TrunkExtraInfo {
CIRCUITS = 7,
CALLS = 8,
CIRCUITS = 7,
CALLS = 8,
LOCKED = 9,
IDLE = 10,
};
// Constructor
inline TrunkInfo()
@ -1145,6 +1147,8 @@ static TokenDict s_categories[] = {
{"trunkCircuitCount", Monitor::TRUNKS},
{"trunkCurrentCallsCount", Monitor::TRUNKS},
{"trunkDownAlarms", Monitor::TRUNKS},
{"trunkCircuitsLocked", Monitor::TRUNKS},
{"trunkCircuitsIdle", Monitor::TRUNKS},
// engine info
{"plugins", Monitor::ENGINE},
{"handlers", Monitor::ENGINE},
@ -1292,6 +1296,8 @@ TokenDict TrunkInfo::s_trunkInfo[] = {
{"trunkCircuitCount", TrunkInfo::CIRCUITS},
{"trunkCurrentCallsCount", TrunkInfo::CALLS},
{"trunkDownAlarms", TrunkInfo::ALARMS_COUNT},
{"trunkCircuitsLocked", TrunkInfo::LOCKED},
{"trunkCircuitsIdle", TrunkInfo::IDLE},
{0,0}
};
@ -1300,8 +1306,10 @@ TokenDict TrunkInfo::s_trunkStatus[] = {
{"trunk", TrunkInfo::ID},
{"type", TrunkInfo::TYPE},
{"circuits", TrunkInfo::CIRCUITS},
{"calls", TrunkInfo::CALLS},
{"calls", TrunkInfo::CALLS},
{"status", TrunkInfo::STATUS},
{"locked", TrunkInfo::LOCKED},
{"idle", TrunkInfo::IDLE},
{0,0}
};
@ -2046,6 +2054,8 @@ void TrunkInfo::discard()
nl->setParam(lookup(TYPE,s_trunkInfo,""),"");
nl->setParam(lookup(CIRCUITS,s_trunkInfo,""),"0");
nl->setParam(lookup(CALLS,s_trunkInfo,""),"0");
nl->setParam(lookup(LOCKED,s_trunkInfo,""),"0");
nl->setParam(lookup(IDLE,s_trunkInfo,""),"0");
}
m_reload = true;
}

View File

@ -21,7 +21,7 @@ yate MODULE-IDENTITY
Email: office@null.ro"
DESCRIPTION
"The MIB module for Yate."
REVISION "201103281730Z"
REVISION "201204242240Z"
DESCRIPTION
"Most recent version of this MIB module."
REVISION "201009281300Z"
@ -420,7 +420,9 @@ TrunkEntry ::= SEQUENCE {
trunkType DisplayString,
trunkCircuitCount Counter32,
trunkCurrentCallsCount Counter32,
trunkDownAlarms Counter32
trunkDownAlarms Counter32,
trunkCircuitsLocked Counter32,
trunkCircuitsIdle Counter32
}
trunkIndex OBJECT-TYPE
@ -471,6 +473,22 @@ trunkDownAlarms OBJECT-TYPE
"Number of times an alarm that signals that a trunk is down alarm has been sent."
::= { trunkEntry 6 }
trunkCircuitsLocked OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of locked circuits of the PSTN trunk."
::= { trunkEntry 7 }
trunkCircuitsIdle OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of idle circuits of the PSTN trunk."
::= { trunkEntry 8 }
-- trunks END
-- linksets BEGIN

View File

@ -259,7 +259,7 @@ revision=200910201200Z
[1.3.6.1.4.1.34501.1]
name=yate
revision=201103281730Z
revision=201204242240Z
[1.3.6.1.4.1.34501.1.1]
name=yateMIBRevision
@ -517,6 +517,16 @@ name=trunkDownAlarms
access=read-only
type=Counter32
[1.3.6.1.4.1.34501.1.6.1.2.1.7]
name=trunkCircuitsLocked
access=read-only
type=Counter32
[1.3.6.1.4.1.34501.1.6.1.2.1.8]
name=trunkCircuitsIdle
access=read-only
type=Counter32
[1.3.6.1.4.1.34501.1.6.2]
name=linksets