Cacti Script returns data but cacti says not valid

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

Moderators: Developers, Moderators

Post Reply
User avatar
thisted
Cacti User
Posts: 69
Joined: Fri Apr 15, 2005 10:11 am
Location: Bay City, MI
Contact:

Cacti Script returns data but cacti says not valid

Post by thisted »

I'm running the mysql_stats script and have it installed. In my log file I'm getting:

Code: Select all

01/10/2006 08:48:05 AM - CACTID: Poller[0] Host[2] ERROR: Empty result [FFGCACTI.fic.ffg]: 'c:/php/php.exe -q C:/Apache2/htdocs/cacti/scripts/mysql_stats.php command FFGCACTI.fic.ffg cacti password'
01/10/2006 08:48:05 AM - CACTID: Poller[0] Host[2] DS[255] WARNING: Result from SCRIPT not valid. Partial Result: ...
But when I run that exact command from the command line I get this:

Code: Select all

C:\Apache2\htdocs\cacti\scripts>c:\php\php.exe -q C:\Apache2\htdocs\cacti\scripts\mysql_stats.php command ffgcacti cacti password
change_db:253 delete:8631 insert:1160 select:13418 update:1187
Any idea why cacti doesn't like what I'm giving it?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Since that script uses WMI, it's probably related to user security (or lack there of). When you start a command prompt with your cacti user account that runs the scheduled task (right click on cmd.exe and do runas...), does that mysql script work? I bet not.

Read last FAQ in my guide on how to add additional users to WMI: phttp://bsod2600.home.comcast.net/install_windows.html#FAQ
User avatar
thisted
Cacti User
Posts: 69
Joined: Fri Apr 15, 2005 10:11 am
Location: Bay City, MI
Contact:

Post by thisted »

I followed the instructions at your site and I'm still having the same problems. I am trying to collect statistics from the same machine that I'm running the wmi query from. When I log into my cacti server as a certain user it can run the query just fine as outlined above, but when ran through the scheduled task I get the error above.

UPDATE
alright, I tried running it with the cmd poller instead of cactid and it worked fine.

Code: Select all

01/10/2006 04:38:04 PM - CMDPHP: Poller[0] Host[2] DS[255] CMD: c:/php/php.exe -q C:/Apache2/htdocs/cacti/scripts/mysql_stats.php command FFGCACTI.fic.ffg cacti password, output: change_db:2041 delete:146161 insert:18683 select:186798 update:19197
So why does it work that way but not with cactid, version info:

Code: Select all

CACTID: Using cactid config file [cactid.conf]
CACTID: Version 0.8.6f starting
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Not sure, something buggy with cactid. You running 0.8.6f-1? You could also try the beta of cactid 0.8.6g, in the announcement forum.
User avatar
thisted
Cacti User
Posts: 69
Joined: Fri Apr 15, 2005 10:11 am
Location: Bay City, MI
Contact:

Post by thisted »

The beta is not compiled, TheWitness posted that the official release should be available sometime today. I tired using the older version .d and got the same results. Also, it appears I did something that is now causing these errors:

Code: Select all

01/11/2006 02:16:35 PM - PCOMMAND: Poller[0] Host[18] WARNING: Recache Event Detected for Host
What causes these errors? Sometimes I see Re-cache successful but most of the time I don't. What does that mean?

Thanks for the help so far.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

recache often means an index count / number changed and cacti is freshing them. Nothing to worry about.
User avatar
thisted
Cacti User
Posts: 69
Joined: Fri Apr 15, 2005 10:11 am
Location: Bay City, MI
Contact:

Post by thisted »

I know you said the recache is usually nothing to worry about but ever since I started getting those warnings I've been getting gaps in my graphs.

The warnings just started happening a couple days ago. Is there anything else that I could have mis-configured that could be causing these errors?

Also, still waiting for the official release of the new cactid.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) What uptime detection method did you set for the devices which are recaching?

2) What graphs are broken? is it only for a specific device or everything?
User avatar
thisted
Cacti User
Posts: 69
Joined: Fri Apr 15, 2005 10:11 am
Location: Bay City, MI
Contact:

Post by thisted »

Currenly I have Ping and SNMP with ICMP selected. The graphs that are breaking are the ones using "SNMP - Get Mounted Partitions". These graphs are breaking on 3 or 4 of my hosts, but not all of them.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) cactid 0.8.6g has been released. Try that.
2) ARe you running cacti 0.8.6h? If not, you should. make sure you install the patches. Also make sure you copy over the updated scripts. The SNMP - Get Mounted Partitions script was fixed in a patch in 0.8.6g and I haven't noticed any problems since.
User avatar
thisted
Cacti User
Posts: 69
Joined: Fri Apr 15, 2005 10:11 am
Location: Bay City, MI
Contact:

Post by thisted »

Well, it appears that the new version of Cactid has resolved the problem I was having with polling for WMI data.

I am still having the problem of gaps in my graphs. I am running 0.8.6h
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Are the hosts with the broken graphs all windows? Are those machines under a heavy CPU or I/O load? If so, then that is the cause of the broken graphs.

Please verify you are using the updated cacti\resource\script_server\host_disk.xml and \cacti\scripts\ss_host_disk.php templates which came with 0.8.6h.
User avatar
thisted
Cacti User
Posts: 69
Joined: Fri Apr 15, 2005 10:11 am
Location: Bay City, MI
Contact:

Post by thisted »

They are windows machines however their CPU load is low to medium. I have extracted the files from a new download of .0.8.6h and placed them in the scripts directory and I still have the gaps.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests