[mrtg] Cisco VOIP Monitoring

McDonald, Dan Dan.McDonald at austinenergy.com
Mon Nov 23 15:55:29 CET 2009


On Mon, 2009-11-23 at 07:34 -0700, Eric Brander wrote:
> Greets List,
> 
> I see in the archives a few questions over the years about monitoring
> Cisco VOIP for such things as active calls, trunks in use and other
> performance stats. Not many (or any) answers really. I've searched
> through MIBs and OIDs and really have come up empty. By chance is
> anyone here using MRTG and SNMP or a script to monitor such things on
> a Cisco Call Manager or a router acting as a voice gateway?

I haven't been able to get much out of a call manager, but for the voice
gateway I did find a way to get the number of calls.  I walk the Active
table and count the number of entries that have an encoding set - that
indicates that the call is being translated from VOIP to POTS.

I then define a router2.cgi user-defined graph, so that I can aggregate
all of the voice gateways onto a single graph.

Here's the section of my template that I use for this.

# First see if there are VOIP interfaces:
my %iftype;

if ($$router_opt{'interfaces'}) {
   foreach my $ifindex (sort {int($a) <=> int($b)} keys %$router_ref) {
        next unless $ifindex =~ /^\d+$/;
             my $i = $$router_ref{$ifindex};
             my $if_type = $$i{ifType};
             ++$iftype{$if_type};
        }
}
if ($iftype{81} +$iftype{102} > 0) {
   my $maxcalls = $iftype{81}+$iftype{102};
   my $target_name = $router_name.".call";
   $head_lines .= <<CALLS
#.....................................................................
# Voip Concurrent Calls
#

Target[$target_name]:  CnTWaLKcvCommonDcCallActiveCoderTypeRate&PseudoZero:public:$router
SnmpOptions[$target_name]: $v3options
MaxBytes[$target_name]: $maxcalls
routers.cgi*ShortDesc[$target_name]:  Calls
bb*host[$target_name]: $router_name
bb*svc[$target_name]: call
routers.cgi*Graph[$target_name]: ALL_CALLS
bb*red[$target_name]: 90%
bb*yellow[$target_name]: 70%
Options[$target_name]:  gauge, noo
Directory[$target_name]: $directory_name
WithPeak[$target_name]: wmy
YLegend[$target_name]: calls
ShortLegend[$target_name]: calls
Legend1[$target_name]: calls
LegendI[$target_name]:  calls :
Title[$target_name]: $sysname
PageTop[$target_name]: <H1>$sysname Concurrent Calls</H1>
 <TABLE>
   <TR><TD>System:</TD><TD>$sysname  </TD></TR>
   <TR><TD>Location:</TD><TD>$syslocation </TD></TR>
 </TABLE>
CALLS
; 
}



On the call manager, I found the number of registered phones.  Watching
the unregistered number is somewhat interesting:.  I'm not certain where
I got maxbytes from on this template - it's probably just a placeholder,
since we have about 2000 phones...


#--------------------------------------------------------------------------------------
# registered phones

my $target_name = $router_name.+".phones";
$target_lines .= <<PHONES
Target[$target_name]: ccmRegisteredPhones.0&ccmUnregisteredPhones.0:
$router
SnmpOptions[$target_name]: $v3options
YLegend[$target_name]: Phones
Options[$target_name]: gauge 
routers.cgi*Options[$target_name]: nototal
routers.cgi*GraphStyle[$target_name]: mirror
routers.cgi*Graph[$target_name]: ALL_PHONES
Directory[$target_name]: $directory_name
MaxBytes[$target_name]: 2000
ShortLegend[$target_name]: phones
Legend1[$target_name]: Phones Registered
Legend2[$target_name]: Phones UnRegistered
LegendI[$target_name]: Registered
LegendO[$target_name]: Un Registered

WithPeak[$target_name]: ymw
Title[$target_name]: $sysname
PageTop[$target_name]: <H1>Phones Registered on $sysname/H1>
 <TABLE>
   <TR><TD>System:</TD><TD>$sysname  </TD></TR>
   <TR><TD>Location:</TD><TD>$syslocation </TD></TR>
 </TABLE>
PHONES
;


> 
> TIA,
> 
> Eric Brander
> _______________________________________________
> mrtg mailing list
> mrtg at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg


-- 
Daniel J McDonald, CCIE # 2495, CISSP # 78281, CNX
www.austinenergy.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20091123/4b6c8c46/attachment.pgp 


More information about the mrtg mailing list