Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Monitoring the number of active calls in a gateway from HUM

Hi,

we are configuring HUM and we want to display the number of active calls in a gateway but we can't find any OID's that show exactly what we want. So we are going to use the EXPRESSION-MIB in order to calculate some values we need.

In MRTG we launch a snmpwalk query against the OID 1.3.6.1.4.1.9.9.63.1.3.1.1.9 (cvCallActiveInSignalLevel) and we count with a counter the number of rows obtained from that snmpwalk. The calculation is as follows:

@ret=snmpwalk(sigint03.'@'.'x.x.x.x'.'1.3.6.1.4.1.9.9.63.1.3.1.1.9');

foreach $campo (@ret) {

     $cuenta=$cuenta+1;

}

print $cuenta."\n";

But we don't know how to implement the "foreach" loop with the EXPRESSION-MIB... and we don't know any other way for getting the number of active calls.

Can anybody please help me?

Regards.

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

Okay, let's try this:

snmpset -v 2c -c private router expNameStatus.110.110.110.110.110 i 6
snmpset -v 2c -c private router expNameStatus.110.110.110.110.110 i 5
snmpset -v 2c -c private router expExpressionIndex.110.110.110.110.110 gauge 1
snmpset -v 2c -c private router expExpressionComment.1 octetstring "numeroEntradas"
snmpset -v 2c -c private router expExpression.1 octetstring '$1 >= 1'
snmpset -v 2c -c private router expObjectID.1.1 o 1.3.6.1.4.1.9.9.63.1.3.1.1.5
snmpset -v 2c -c private router expExpressionValueType.1 i 4
snmpset -v 2c -c private router expObjectIDWildcard.1.1 i 1
snmpset -v 2c -c private router expObjectStatus.1.1 i 1
snmpset -v 2c -c private router expNameStatus.110.110.110.110.110 i 1

snmpset -v 2c -c private router expNameStatus.111.111.111.111.111 i 6
snmpset -v 2c -c private router expNameStatus.111.111.111.111.111 i 5
snmpset -v 2c -c private router expExpressionIndex.111.111.111.111.111 gauge 2
snmpset -v 2c -c private router expExpressionComment.2 octetstring "sumaEntradas"
snmpset -v 2c -c private router expExpression.2 octetstring 'sum($1)'
snmpset -v 2c -c private router expObjectID.2.1 o expValueInteger32Val.1.0.0
snmpset -v 2c -c private router expExpressionValueType.2 i 4
snmpset -v 2c -c private router expObjectIDWildcard.2.1 i 1
snmpset -v 2c -c private router expObjectStatus.2.1 i 1
snmpset -v 2c -c private router expNameStatus.111.111.111.111.111 i 1
39 REPLIES
Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

What version of IOS as the EXPRESSION-MIB objects will be different depending on the version?  Essentially, though, you will use a wildcard to sum up all of the instances.  See the comments in the EXPRESSION-MIB for more details.  Essentially, your object will be 1.3.6.1.4.1.9.9.63.1.3.1.1.9, and you will use a wildcard with the expression sum($1).

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

Whoops, I think I missed a step.  You're just checking to see if this object is set, then adding to your count.  In that case, you will need two expressions.  The second will be sum($1) as I said (but using an EXPRESSION-MIB OID), but the first will exists($1) using the 1.3.6.1.4.1.9.9.63.1.3.1.1.9 OID.

New Member

Re: Monitoring the number of active calls in a gateway from HUM

Great!

Where can I find more information about these wildcards? I cannot find anything...

Regards.

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

It's all documented in the EXPRESSION-MIB.  Look at the comments under "Wildcarding example" and the documentation of the expExpression object.

New Member

Re: Monitoring the number of active calls in a gateway from HUM

Sorry but it's my first time with the EXPRESSION-MIB and I'm very confused

So I don't know how to implement the counter I need: if I use the calculation counter32(.*), do I have the number of entries in the table?

Thank you very much.

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

You shouldn't be using counter(32) as your expression.  I'm fairly confident that using exists($1) for your first expression and sum($1) as your second expression should work. 

New Member

Re: Monitoring the number of active calls in a gateway from HUM

I have to check of the object is set and then adding to the count, but these objects are part of 1.3.6.1.4.1.9.9.63.1.3.1.1.9 OID, and its type is integer32, do I have to check for all the possible objects??? Or can I do it with exists($1), and $1=1.3.6.1.4.1.9.9.63.1.3.1.1..* ?

I have written down the expressions as I think they are but I'm afraid of not being well and they can cause a crash in the device. File with the expressions is attached.

I will appreciate a lot if you could take a look at them.

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

You need to leave the ".*" off of the end of the OIDs.  For wildcards, just put in the OID without any instances, then set the wildcard object to true.  Your sum($2) expression should be sum($1).  And your second OID needs to point to the entry in expValueTable:

expValueInteger32Val.1.0.0

I think everything else is right.

New Member

Re: Monitoring the number of active calls in a gateway from HUM

Hi, I've applied the snmpset commands but it doesn' work. The entry in expValueTable seems to be empty. Please find attached the sequence of commands and the results of some snmpwalks. Could you please help me to debug the expression?

Many thanks.

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

I still don't know the version of IOS you're using.  Knowing that would allow me to properly test things locally.

New Member

Re: Monitoring the number of active calls in a gateway from HUM

Upps! Sorry.

I'm trying with a couple of routers which have following IOS:

- 12.4(3e)
- 12.4(11)T4

Many thanks!

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

Thanks, I'll play with this tomorrow, and send you an update.

New Member

Re: Monitoring the number of active calls in a gateway from HUM

Many thanks, I appreciate your help.

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

First, 12.4(11)T supports a new standards version of the EXPRESSION-MIB with an entire new object ID, and new configuration structure.  But, as for 12.4 mainline, this should get you what you want:

snmpset -v 2c -c private router expNameStatus.110.110.110.110.110 i 6

snmpset -v 2c -c private router expNameStatus.110.110.110.110.110 i 5

snmpset -v 2c -c private router expExpressionIndex.110.110.110.110.110 gauge 1

snmpset -v 2c -c private router expExpressionComment.1 octetstring "numeroEntradas"

snmpset -v 2c -c private router expExpression.1 octetstring '$1 >= 0'

snmpset -v 2c -c private router expObjectID.1.1 o 1.3.6.1.4.1.9.9.63.1.3.1.1.1

snmpset -v 2c -c private router expExpressionValueType i 4

snmpset -v 2c -c private router expObjectIDWildcard.1.1 i 1

snmpset -v 2c -c private router expObjectStatus.1.1 i 1

snmpset -v 2c -c private router expNameStatus.110.110.110.110.110 i 1

snmpset -v 2c -c private router expNameStatus.111.111.111.111.111 i 6

snmpset -v 2c -c private router expNameStatus.111.111.111.111.111 i 5

snmpset -v 2c -c private router expExpressionIndex.101.50.101.120.112 gauge 2

snmpset -v 2c -c private router expExpressionComment.2 octetstring "sumaEntradas"

snmpset -v 2c -c private router expExpression.2 octetstring 'sum($1)'

snmpset -v 2c -c private router expObjectID.2.1 o expValueInteger32Val.1.0.0

snmpset -v 2c -c private router expExpressionValueType i 4

snmpset -v 2c -c private router expObjectIDWildcard.2.1 i 1

snmpset -v 2c -c private router expObjectStatus.2.1 i 1

snmpset -v 2c -c private router expNameStatus.111.111.111.111.111 i 1

Then, an snmpget on expValueInteger32.2.0.0.0 should give you the sum.  Confirm this works before moving on to the new syntax.

New Member

Re: Monitoring the number of active calls in a gateway from HUM


Hi, I've only changed the command:

snmpset -v 2c -c private router expExpressionValueType i 4

with:

snmpset -v 2c -c private router expExpressionValueType.1 i 4

and

snmpset -v 2c -c private router expExpressionValueType.2 i 4

because, an error message appeared if not using the index. So, finally, the commands used are the following:

snmpset -v 2c -c private router expNameStatus.110.110.110.110.110 i 6

snmpset -v 2c -c private router expNameStatus.110.110.110.110.110 i 5

snmpset -v 2c -c private router expExpressionIndex.110.110.110.110.110 gauge 1

snmpset -v 2c -c private router expExpressionComment.1 octetstring "numeroEntradas"

snmpset -v 2c -c private router expExpression.1 octetstring '$1 >= 0'

snmpset -v 2c -c private router expObjectID.1.1 o 1.3.6.1.4.1.9.9.63.1.3.1.1.1

snmpset -v 2c -c private router expExpressionValueType.1 i 4

snmpset -v 2c -c private router expObjectIDWildcard.1.1 i 1

snmpset -v 2c -c private router expObjectStatus.1.1 i 1

snmpset -v 2c -c private router expNameStatus.110.110.110.110.110 i 1

snmpset -v 2c -c private router expNameStatus.111.111.111.111.111 i 6

snmpset -v 2c -c private router expNameStatus.111.111.111.111.111 i 5

snmpset -v 2c -c private router expExpressionIndex.111.111.111.111.111 gauge 2

snmpset -v 2c -c private router expExpressionComment.2 octetstring "sumaEntradas"

snmpset -v 2c -c private router expExpression.2 octetstring 'sum($1)'

snmpset -v 2c -c private router expObjectID.2.1 o expValueInteger32Val.1.0.0

snmpset -v 2c -c private router expExpressionValueType.2 i 4

snmpset -v 2c -c private router expObjectIDWildcard.2.1 i 1

snmpset -v 2c -c private router expObjectStatus.2.1 i 1

snmpset -v 2c -c private router expNameStatus.111.111.111.111.111 i 1

But there are no entries in the expValueInteger32Val OID, so later, in the sum expression, there is no elements to sum. Please, find attached 2 files with the snmpwalk outputs.

How could we get to have values in expValueTable?

Many thanks.

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

Yes, sorry, I forgot the indexes.  Post the output of an SNMP Walk of

1.3.6.1.4.1.9.9.63.1.3.1.1
New Member

Re: Monitoring the number of active calls in a gateway from HUM

Hi, please find attached the output of some snmpwalk commands. Output of 1.3.6.1.4.1.9.9.63.1.3.1.1 is in snmpwalk3.txt file.

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

Okay, let's try this:

snmpset -v 2c -c private router expNameStatus.110.110.110.110.110 i 6
snmpset -v 2c -c private router expNameStatus.110.110.110.110.110 i 5
snmpset -v 2c -c private router expExpressionIndex.110.110.110.110.110 gauge 1
snmpset -v 2c -c private router expExpressionComment.1 octetstring "numeroEntradas"
snmpset -v 2c -c private router expExpression.1 octetstring '$1 >= 1'
snmpset -v 2c -c private router expObjectID.1.1 o 1.3.6.1.4.1.9.9.63.1.3.1.1.5
snmpset -v 2c -c private router expExpressionValueType.1 i 4
snmpset -v 2c -c private router expObjectIDWildcard.1.1 i 1
snmpset -v 2c -c private router expObjectStatus.1.1 i 1
snmpset -v 2c -c private router expNameStatus.110.110.110.110.110 i 1

snmpset -v 2c -c private router expNameStatus.111.111.111.111.111 i 6
snmpset -v 2c -c private router expNameStatus.111.111.111.111.111 i 5
snmpset -v 2c -c private router expExpressionIndex.111.111.111.111.111 gauge 2
snmpset -v 2c -c private router expExpressionComment.2 octetstring "sumaEntradas"
snmpset -v 2c -c private router expExpression.2 octetstring 'sum($1)'
snmpset -v 2c -c private router expObjectID.2.1 o expValueInteger32Val.1.0.0
snmpset -v 2c -c private router expExpressionValueType.2 i 4
snmpset -v 2c -c private router expObjectIDWildcard.2.1 i 1
snmpset -v 2c -c private router expObjectStatus.2.1 i 1
snmpset -v 2c -c private router expNameStatus.111.111.111.111.111 i 1
New Member

Re: Monitoring the number of active calls in a gateway from HUM

Great!!! It works!!!! Thank you very much!!!!

We can retrieve the number of active calls asking to the OID 1.3.6.1.4.1.9.10.22.1.4.1.1.4.2.0.0 by means of snmpwalk command but now I have another problem : I cannot query that OID from HUM. I have loaded the Expression-MIB and create a new template but, when defining the OID while creating the template, it's impossible to choose this OID. I can choose the expValueInteger32Val, but an error message appears when HUM look for the instances.

How can we choose this 1.3.6.1.4.1.9.10.22.1.4.1.1.4.2.0.0 OID?

Thank you very much.

New Member

Re: Monitoring the number of active calls in a gateway from HUM

Great, the calculation works!!!!

We can retrieve the number of active calls asking to the OID 1.3.6.1.4.1.9.10.22.1.4.1.1.4.2.0.0 by means of snmpwalk command but now I have another problem : I cannot query that OID from HUM. I have loaded the Expression-MIB and create a new template but, when defining the OID while creating the template, it's impossible to choose this OID. I can choose the expValueInteger32Val, but an error message appears when HUM look for the instances.

How can we choose this 1.3.6.1.4.1.9.10.22.1.4.1.1.4.2.0.0 OID?

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

It's working for me.  I have HUM 1.2.1, and I loaded the EXPRESSION-MIB, then defined a Template for expValueInteger32Val.  I then defined a poller, and when I clicked Next, I saw all the instances of that object on the device.  You should see one of those instances as 2.0.0.0.  I didn't get any errors, and the poller is now running.

New Member

Re: Monitoring the number of active calls in a gateway from HUM

OK, we're going to update HUM to version 1.2.1 and we will try to define the poller again. I will keep you updated.

Thank you very much for your help!

New Member

Re: Monitoring the number of active calls in a gateway from HUM

Hi, finally we have updated to HUM 1.2.1 and have created again the template for expValueInteger32Val but when defining the poller, we see only the 1.0.0.* values (the active calls IDs) but not the 2.0.0.0. I don't know what it's happening because if we execute a snmpwalk to the 2.0.0.0 OID, we can see its value.

How can we get in HUM the OID we need? Is it necessary to configure the Expression MIB persistence?

Please find attached a file with the output of the snmpwalk and 2  screenshots with the poller and template created.

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

What do you get when you walk the entire expValueTable?

New Member

Re: Monitoring the number of active calls in a gateway from HUM

Hi, I get this:

E:\CSCOpx\objects\jt\bin>snmpwalk.exe -v 2c -c comm 10.132.15.4 .1.3.6.1.4.1.9.10.22.1.4.1

iso.3.6.1.4.1.9.10.22.1.4.1.1.4.1.0.0.3949614539.1 = INTEGER: 1
iso.3.6.1.4.1.9.10.22.1.4.1.1.4.1.0.0.3949715557.1 = INTEGER: 1
iso.3.6.1.4.1.9.10.22.1.4.1.1.4.1.0.0.3949721347.1 = INTEGER: 1
iso.3.6.1.4.1.9.10.22.1.4.1.1.4.1.0.0.3949727014.1 = INTEGER: 1
iso.3.6.1.4.1.9.10.22.1.4.1.1.4.1.0.0.3949731285.1 = INTEGER: 1
iso.3.6.1.4.1.9.10.22.1.4.1.1.4.2.0.0.0 = INTEGER: 5

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

Those indexes may be causing a problem.  I don't have a router with dial or voice on which to test, so I was using instances from the ifTable (essentially I just counted all of my interfaces).  I didn't see any problems.  Perhaps HUM can't deal with wrapping of the 32-bit signed numbers.  Post a sniffer trace of all SNMP traffic to this router when trying to define a poller.

New Member

Re: Monitoring the number of active calls in a gateway from HUM

Hi, I agree with you, it seems that the root cause are these indexes. Please find attached the sniffer trace.

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

You have stumbled across a fundamental flaw in our SNMP manager stack in LMS.  It cannot properly encode OID elements which exceed the signed 32-bit maximum (2^31-1).  Therefore, HUM is unable to properly walk the rows of the expValueTable as you have defined them.  I believe I have created a working patch for this, but I cannot test it.  If you want to try it, you can open a TAC service request, and have your engineer contact me directly.  I will warn you, though, that the code being touched is central to numerous components in LMS, and may cause some unforeseen problems.

Cisco Employee

Re: Monitoring the number of active calls in a gateway from HUM

I should also point out that in your case, the large indexes are coming from the fact that your device has been up for a while.  If you reload the device, then recreate your expressions, the index will be low.  You can then define your poller, and it should continue to work even after the device has been up over 249 days.

2609
Views
50
Helpful
39
Replies