Cisco CallManager MGCP PRI usage

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

terrymason
Posts: 5
Joined: Tue May 29, 2007 4:01 pm

Post by terrymason »

Thanks for the script! I've been working with this for a while, and have found some interesting things. The precompiled perfmon script above will only work with activestate perl 5.6, not the latest 5.8 version.

I've gotten it working fine from command line:

Code: Select all

C:\Perl>c:/Perl/bin/perl.exe C:/Inetpub/wwwroot/cacti/scripts/mgcp.pl 10.X.X.X
 XX-vgw-1 XX-vgw-1
pri_one:73 pri_two:73 total_pri:73
however, I can't seem to get it to work from the poller:

Code: Select all

05/29/2007 04:57:02 PM - CACTID: Poller[0] Host[43] DS[701] WARNING: Result from SCRIPT not valid. Partial Result: ...  
05/29/2007 04:57:02 PM - CACTID: Poller[0] Host[43] ERROR: Empty result [10.X.X.X]: 'c:/Perl/bin/perl.exe C:/Inetpub/wwwroot/cacti/scripts/mgcp.pl X.X.X.X xx-vgw-1 xx-vgw-1'  
05/29/2007 04:57:02 PM - CACTID: Poller[0] Host[40] DS[698] WARNING: Result from SCRIPT not valid. Partial Result: ...  
05/29/2007 04:57:02 PM - CACTID: Poller[0] Host[40] ERROR: Empty result [10.X.X.X]: 'c:/Perl/bin/perl.exe C:/Inetpub/wwwroot/cacti/scripts/mgcp.pl x.x.x.x xx-vgw-1 xx-2851-1'  

I"m thinking this is a permissions issue, since the cacti machine is in a workgroup, and the call manager is in it's own domain. Any ideas?
crackrocksteady
Posts: 45
Joined: Wed Dec 06, 2006 12:02 am
Location: Perth , Australia

Post by crackrocksteady »

I don't have my Callmanagers connected to our active directory and it works fine. However I had to create a user with the same username and password on the CCM as the User that runs the poller. This is probably what is causing your problems.
crackrocksteady
Posts: 45
Joined: Wed Dec 06, 2006 12:02 am
Location: Perth , Australia

Post by crackrocksteady »

As a side note I run Activestate 5.8.8 and the script runs fine....
nduda78
Cacti User
Posts: 111
Joined: Tue Mar 01, 2005 11:26 am

WOW

Post by nduda78 »

I havent checked this thread in a long time, glad to see it got some interest and a port over to w32. I recently updated my script to reflect witch CCM the gateway was associated with.

While this info can be found out via the CCM interface and obviously perfmon (which is were I pull from) we wanted a way to just look in one spot at all gateways and see what CCM it was registered to and also how many calls in use. Here is what it looks like, if interested I can post the script but its pretty darn basic!
Attachments
ccm.JPG
ccm.JPG (47.79 KiB) Viewed 10119 times
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

Yes, please post your updated script. Thanks!
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

Here's the error I get when trying to run this script from command line:

C:\>perl c:/inetpub/wwwroot/cacti/scripts/mgcp.pl 10.222.2.31 10.10.100.2 10.3.100.100

Failed to create object [ERROR: Don't really know what happened though !]
Can't call method "AddCounter" on an undefined value at c:/inetpub/wwwroot/cacti/scripts/mgcp.pl line 10.


Any ideas? Not sure what's missing...
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

Also, when I try to run perfmon on CCM box everything's greyed out (if that matters)...

Any assistance would be much appreciated! :)
Attachments
ccm_mgcp_error_092107.JPG
ccm_mgcp_error_092107.JPG (52.94 KiB) Viewed 10103 times
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

crackrocksteady, do you have any insight as to why i get the following errors on your scripts? i can't figure out what it's missing.

i get similar errors for both the mgcp.pl script and the activeCalls.pl script when querying my subscriber. i've verified perfmon counters are working locally on the box and have also verified that local user account is same as cacti poller.

--------------

perl c:\inetpub\wwwroot\cacti\scripts\ccm_activeCalls.pl 10ccm02

Failed to create object [ERROR: Don't really know what happened though !]

Can't call method "AddCounter" on an undefined value at c:\inetpub\wwwroot\cacti\scripts\ccm_activeCalls.pl line 7.

--------------

perl c:\inetpub\wwwroot\cacti\scripts\mgcp.pl 10ccm02 hou-vgw-2811.englobal.com hou-ms-ar01.englobal.com

Failed to create object [ERROR: Don't really know what happened though !]

Can't call method "AddCounter" on an undefined value at c:\inetpub\wwwroot\cacti\scripts\mgcp.pl line 10.

--------------
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

OK, appears to be a permissions issue, at least when I manually run it through command prompt. I still get the same errors in cacti.log when I try to let the poller run it.

My CCM boxes are not on a domain (and my Cacti box is) and after trying to run this manually from command prompt (and receiving the same error) I browsed to \\10ccm02\c$ and was immediately prompted for credentials. I supplied the login credentials for the Cacti poller job but with CCM servername in front of it (10ccm02\cacti). This is the same local account / password on both my Cacti and CCM boxes. I then re-ran the script and it ran successfully.

One question, though. Why isn't it automatically authenticating in the first place? Is there a way to modify the perl script to supply the authentication credentials when the script is executed? Or am I way off base on this one?

I can run it all day through command prompt, but it always generates the same error in cacti.log when I try to let the poller run it. I'm currently using cactid as my poller. Which poller are you using to get these to run successfully?
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

I should also mention that if I change my poller from cactid to cmd.php both your MGCP PRI script and your Active Calls script run fine, but your registered / unregistered phone queries break.

Any help or insight would be greatly appreciated!
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

I take that last statement back. It doesn't seem to be working with either poller right now and the exact same error is generated in cacti.log.

Could this boil down to a permissions issue? And is there a way to embed the credentials inside the script to ensure it's using the correct ones?
turlockaviator
Posts: 25
Joined: Wed Sep 12, 2007 12:17 pm
Contact:

Linux CCM

Post by turlockaviator »

I know this thread is a bit dated, but thought I'd throw this out there. Anyone get this working with the Linux based CCM (version 5.x)? And if yes, can you provide some details? My Cacti install is running on a Suse Enterprise Linux Host. I'd like to query my Call Managers for PRI usage (or my Gateway routers) and graph this data over time.

Thanks in advance...
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Adding additional voice gateways

Post by siouxee »

Can someone outline what exactly needs to modified in order to add additional voice gateways (more than two)?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests