Works from the command line, but not from poller
Moderators: Developers, Moderators
Hmm, not really sure why a snmpwalk works but cmd.php does not for the same OIDs. Maybe try increasing the timeout for that host. Is it on your LAN or WAN?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Devices that are generating this error are on both LAN and WAN (in relation to the NMS box running Cacti).
I think it's too big of a coincidence that these queries broke exactly at the time I changed the poller, but that's just me.
I'm also seeing weird stuff with my CallManager queries / scripts (which was the original reason I posted to this message).
I've attached the scripts and template files if you have a few minutes to look over them. If I use cactid as the poller I get the errors below for the CCM scripts, but the CCM phones xml template works fine. If I switch to cmd.php the CCM scripts run fine but the phones xml template breaks (with no errors in the log file) and the Cisco router memory queries break also.
I did notice that I had to manually authenticate to my CCM server through my NMS / Cacti server (by simply browsing to a hidden admin share, \\10ccm02\c$, and logging in with the local cacti account, which has same password as cacti account the poller is running as) in order to get the CCM perl scripts to run successfully through CLI.
Could it be possible that cactid is not getting a valid result when running these scripts because it isn't authenticating properly for those particular scripts? My CallManager boxes are not on a Windows domain, but my Cacti box is. Is there a way to force the poller to authenticate a certain way for certain scripts?
All of the scripts / templates are from crackrocksteady's posts:
http://forums.cacti.net/viewtopic.php?t=10857 (MGCP PRI activity)
http://forums.cacti.net/viewtopic.php?t=10209 (# of Phones)
Thanks in advance for any help you provide!
I think it's too big of a coincidence that these queries broke exactly at the time I changed the poller, but that's just me.
I'm also seeing weird stuff with my CallManager queries / scripts (which was the original reason I posted to this message).
I've attached the scripts and template files if you have a few minutes to look over them. If I use cactid as the poller I get the errors below for the CCM scripts, but the CCM phones xml template works fine. If I switch to cmd.php the CCM scripts run fine but the phones xml template breaks (with no errors in the log file) and the Cisco router memory queries break also.
I did notice that I had to manually authenticate to my CCM server through my NMS / Cacti server (by simply browsing to a hidden admin share, \\10ccm02\c$, and logging in with the local cacti account, which has same password as cacti account the poller is running as) in order to get the CCM perl scripts to run successfully through CLI.
Could it be possible that cactid is not getting a valid result when running these scripts because it isn't authenticating properly for those particular scripts? My CallManager boxes are not on a Windows domain, but my Cacti box is. Is there a way to force the poller to authenticate a certain way for certain scripts?
All of the scripts / templates are from crackrocksteady's posts:
http://forums.cacti.net/viewtopic.php?t=10857 (MGCP PRI activity)
http://forums.cacti.net/viewtopic.php?t=10209 (# of Phones)
Thanks in advance for any help you provide!
- Attachments
-
- ccm_script_errors_cactid.JPG (30.13 KiB) Viewed 961 times
-
- ccm_activeCalls.pl
- (462 Bytes) Downloaded 275 times
-
- mgcp.pl
- (952 Bytes) Downloaded 103 times
-
- cacti_graph_template_ccm_active_calls.xml
- (7.37 KiB) Downloaded 116 times
-
- cacti_graph_template_ccm_phones.xml
- (13.98 KiB) Downloaded 137 times
Oh, I completely agree that its got to be related to the cmd/cactid switch.siouxee wrote:I think it's too big of a coincidence that these queries broke exactly at the time I changed the poller, but that's just me.
In general, everything should work fine under cmd.php and possibly break with cactid. While cactid IS faster, it does have certain problems running scripts, etc as you have noticed. My general troubleshooting method is to get everything working under cmd.php first, THEN switch to cactid and see what breaks (and then fix). If your polling times aren't close to 255 sec, then I suggest you do the same.
The two perl scripts seem ok. Although, since they're doing WMI calls, its performance intensive and could be causing some delays which cacti isn't handling properly. When you manually run these from the command prompt, do they execute in a timely manor?siouxee wrote:I've attached the scripts and template files if you have a few minutes to look over them.
Have you ran cacti with debugging logging set, for each of these different polling cycles? See what each script is trying to run and return.siouxee wrote: If I use cactid as the poller I get the errors below for the CCM scripts, but the CCM phones xml template works fine. If I switch to cmd.php the CCM scripts run fine but the phones xml template breaks (with no errors in the log file) and the Cisco router memory queries break also.
I suppose its possible, but it should be using the scheduled task User account. You can verify this with TaskManager and watch what user account cactid is being run under -- it should match the scheduled task user.siouxee wrote:Could it be possible that cactid is not getting a valid result when running these scripts because it isn't authenticating properly for those particular scripts?
Only way I know how, is to either embed the login info inside the script which it'll use, or have that data passed into the script from Cacti. Neither is really secure/ideal though.siouxee wrote:My CallManager boxes are not on a Windows domain, but my Cacti box is. Is there a way to force the poller to authenticate a certain way for certain scripts?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 3 guests