Works from the command line, but not from poller

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

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

Works from the command line, but not from poller

Post by terrymason »

I"m trying to use a mgcp pri script that I found in the scripts section, and I've gotten it working fine from command line:
Code:

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'  
What do you guys think? Is this a script specific error?

Ths cacti machine is windows 2003, and the machine being polled is windows 2000. I'll update this thread with version numbers once I get to work.

Thanks!
Terry
JamesD
Posts: 22
Joined: Fri Feb 03, 2006 12:15 pm

does it work with cmd.php

Post by JamesD »

I had a couple of scripts that would work under cmd.php but not under CACTID. The problem may not be with your script but with the CACTID poller
terrymason
Posts: 5
Joined: Tue May 29, 2007 4:01 pm

Post by terrymason »

Thank you very much for the reply. I've gotten cmd.php working, and get this:

Code: Select all

05/30/2007 01:45:58 PM - CMDPHP: Poller[0] Host[40] DS[704] WARNING: Result from CMD not valid. Partial Result: Failed to create obj  
05/30/2007 01:45:58 PM - CMDPHP: Poller[0] Host[40] DS[698] WARNING: Result from CMD not valid. Partial Result: Failed to create obj  
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) Are DS[704] and DS[698] running the mgcp.pl script?
2) Does the user that runs the scheduled task, have access to perl.exe, your script and the remote host (if needed) ?
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Same problem

Post by siouxee »

Has anyone found a resolution to this? I am seeing the exact same error in my Cacti log and graphs do not get generated for some reason.

I can successfully run the query manually through DOS but not through the poller.

I have verified local credentials on the CCM boxes match the credentials on the scheduled poller job.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

siouxee: You using the cmd or cactid poller? If cactid, switch to cmd and see if it works.
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

I was using cactid and switched to cmd.php. Look at the pretty log file now! :)

I only changed the poller under Cacti Settings (poller). Does this need to be changed anywhere else to take effect?
Attachments
cmdphp_error.JPG
cmdphp_error.JPG (162.67 KiB) Viewed 4710 times
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

OK, I now see graph data for the MGCP script, but have a ton of the "Result from SNMP not valid. Partial Result:" errors for Cisco Router - I/O Mem Free and Cisco Router - Proc Mem Free data templates.

What do I gain / lose by switching the poller from cactid to cmd.php?

Also, since I'm now seeing graph data for this script, does this point to a problem with cactid and the MGCP script?
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

BTW, the Cisco Router - I/O Mem Free and Cisco Router - Proc Mem Free data templates have now stopped generating graph data while using cmd.php as the poller.
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

Here's what I see for these in debug mode...
Attachments
poller_error.JPG
poller_error.JPG (47.99 KiB) Viewed 4689 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Manually snmmpwalk those two OIDs you posted from the debug log -- do they return data? Post the results. I'm betting no. Are you sure that snmp script hasn't been broken all along?
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

Yes, this query was working before (see graph below) and both OIDs are still good. It appears this particular query broke at the time I switched to cmd.php as the poller...

I'll switch the poller back to cactid to see if the error goes away (just to make sure it's related).

Any other suggestions?
Attachments
getif_bcsrav01.JPG
getif_bcsrav01.JPG (50.12 KiB) Viewed 4655 times
bcsrav_mem.JPG
bcsrav_mem.JPG (23.93 KiB) Viewed 4655 times
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

snmpwalk -v 1 -c R!t3$HsUk$! 10.7.10.150 1.3.6.1.4.1.9.9.48.1.1.1.6

SNMPv2-SMI::enterprises.9.9.48.1.1.1.6.1 = Gauge32: 1423908
SNMPv2-SMI::enterprises.9.9.48.1.1.1.6.2 = Gauge32: 1477704
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

ok, mem graphs are getting populated again after i switched back to cactid.

what else can i try?
Attachments
bcsrav_mem_cactid.JPG
bcsrav_mem_cactid.JPG (26.8 KiB) Viewed 4649 times
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Post by siouxee »

oops! wrong device, same results.
Attachments
bcsrav_mem_cactid.JPG
bcsrav_mem_cactid.JPG (24.13 KiB) Viewed 4647 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests