script runs fine when manually executed, but not by cacti
Moderators: Developers, Moderators
-
- Posts: 12
- Joined: Mon Sep 20, 2004 3:52 pm
script runs fine when manually executed, but not by cacti
I just downloaded and imported the data templates for the MySQL Graph
Collection (http://forums.cacti.net/viewtopic.php?t ... sc&start=0)
by ottob.
IMPORTANT: To get around the max of 3 uploads. I uploaded a file called cacti_debug.jpg it is really a word document. Rename it too cacti_debug.doc to view my pictures. THANKS!
I'm very frustrated with this and have spent hours looking and fooling around with settings to get this to work. It looks like such a nice add-in that i really want to use but its not working!! ggrr..
I add the MySQL - Command Statistics graph template to my localhost (this is where the mysql server is running) and then i create a graph. You can see by the attached screen shots that it says that it is graphing. But when i turn on graph debug mode rrdtool says that it
ERROR: can't parse '#7EE600:Select'
Is this SELECT the same selec that is shown in the 3rd screen shot? or is select an acutal built in rrdtool function? When i saw the error i revied the poller cache and here is the output.
View Poller Cache [1 Items]
--------------------------------
Data Source: localhost - MySQL - Command statistics
RRD: c:\Inetpub\wwwroot\cacti\rra\localhost_change_db_48.rrd
Action: 1, Script: c:\php\php.exe -q c:\Inetpub\wwwroot\cacti\scripts\mysql_stats.php command localhost cactiuser cactiuser
Everything looked fine so i went to view the cacti log file, here are the results ( you can also view a screen shot of it too)
View Cacti Log File [5 Items]
---------------------------------
03/03/2005 01:30:02 PM - SYSTEM STATS: Time: 1.0191 s, Method: cactid, Processes: 1, Threads: 5, Hosts: 2, Hosts/Process: 2
03/03/2005 01:30:01 PM - CACTID: Poller[0] Time: 0.5640 s, Threads: 5, Hosts: 1
03/03/2005 01:30:01 PM - CACTID: Poller[0] Host[6] SCRIPT: c:/php/php.exe -q c:/Inetpub/wwwroot/cacti/scripts/mysql_stats.php command localhost cactiuser cactiuser, output: U
03/03/2005 01:30:01 PM - CACTID: Poller[0] Host[6] WARNING: Result from SCRIPT not valid. Partial Result: U...
03/03/2005 01:30:01 PM - CACTID: Poller[0] Host[6] ERROR: Empty result [localhost]: 'c:/php/php.exe -q c:/Inetpub/wwwroot/cacti/scripts/mysql_stats.php command localhost cactiuser cactiuser'
What does this mean? When i manually execute
c:\php\php.exe -q c:\Inetpub\wwwroot\cacti\scripts\mysql_stats.php command localhost cactiuser cactiuser
i get the reasults back that you seen in the screen shot.
change_db:53 delete:20 insert:42 select:996 update:20
that is what the script returns. and that coresponds with exactly what is expected for output in SS #3. I read some posts and it seems maybe it is an authentication problem? I have IIS running as an administrator account. Does anyone else know where else i could look?
Collection (http://forums.cacti.net/viewtopic.php?t ... sc&start=0)
by ottob.
IMPORTANT: To get around the max of 3 uploads. I uploaded a file called cacti_debug.jpg it is really a word document. Rename it too cacti_debug.doc to view my pictures. THANKS!
I'm very frustrated with this and have spent hours looking and fooling around with settings to get this to work. It looks like such a nice add-in that i really want to use but its not working!! ggrr..
I add the MySQL - Command Statistics graph template to my localhost (this is where the mysql server is running) and then i create a graph. You can see by the attached screen shots that it says that it is graphing. But when i turn on graph debug mode rrdtool says that it
ERROR: can't parse '#7EE600:Select'
Is this SELECT the same selec that is shown in the 3rd screen shot? or is select an acutal built in rrdtool function? When i saw the error i revied the poller cache and here is the output.
View Poller Cache [1 Items]
--------------------------------
Data Source: localhost - MySQL - Command statistics
RRD: c:\Inetpub\wwwroot\cacti\rra\localhost_change_db_48.rrd
Action: 1, Script: c:\php\php.exe -q c:\Inetpub\wwwroot\cacti\scripts\mysql_stats.php command localhost cactiuser cactiuser
Everything looked fine so i went to view the cacti log file, here are the results ( you can also view a screen shot of it too)
View Cacti Log File [5 Items]
---------------------------------
03/03/2005 01:30:02 PM - SYSTEM STATS: Time: 1.0191 s, Method: cactid, Processes: 1, Threads: 5, Hosts: 2, Hosts/Process: 2
03/03/2005 01:30:01 PM - CACTID: Poller[0] Time: 0.5640 s, Threads: 5, Hosts: 1
03/03/2005 01:30:01 PM - CACTID: Poller[0] Host[6] SCRIPT: c:/php/php.exe -q c:/Inetpub/wwwroot/cacti/scripts/mysql_stats.php command localhost cactiuser cactiuser, output: U
03/03/2005 01:30:01 PM - CACTID: Poller[0] Host[6] WARNING: Result from SCRIPT not valid. Partial Result: U...
03/03/2005 01:30:01 PM - CACTID: Poller[0] Host[6] ERROR: Empty result [localhost]: 'c:/php/php.exe -q c:/Inetpub/wwwroot/cacti/scripts/mysql_stats.php command localhost cactiuser cactiuser'
What does this mean? When i manually execute
c:\php\php.exe -q c:\Inetpub\wwwroot\cacti\scripts\mysql_stats.php command localhost cactiuser cactiuser
i get the reasults back that you seen in the screen shot.
change_db:53 delete:20 insert:42 select:996 update:20
that is what the script returns. and that coresponds with exactly what is expected for output in SS #3. I read some posts and it seems maybe it is an authentication problem? I have IIS running as an administrator account. Does anyone else know where else i could look?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Please insure that you have Cygwin installed (base install only) and then delete any DLL and EXE files out of C:\CACTID other than Cactid itself and your scripts will start running just fine from Cactid.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Posts: 12
- Joined: Mon Sep 20, 2004 3:52 pm
cygwin install
do i need cygwin even if i'm using poller.php?
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Yep.....
For the scripts...
Or at least that is my understanding.
For the scripts...
Or at least that is my understanding.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
You don't need it all, but installing the base is so easy that you don't have to worry about it.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Posts: 12
- Joined: Mon Sep 20, 2004 3:52 pm
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Delete the cygwin1.dll in that directory.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Posts: 12
- Joined: Mon Sep 20, 2004 3:52 pm
thanks got it working. i had to add the path to the environ variable.
next question though...
GOOOD NEWS!!!!! after making those changes i'm getting this in my cacti log files!
04/13/2005 11:42:00 AM - CACTID: Poller[0] Host[11] SCRIPT: c:/php/php.exe -q c:/Inetpub/wwwroot/cacti/scripts/mysql_stats.php command localhost cactiuser cactiuser, output: change_db:2644 delete:1276 insert:2533 select:55501 update:1550
yippie!
oh except my data source still doesn't graph. there is no graph when i turn on the debug. just
i was looking at it and i have duplicate data and when i copy and past that into the cmd.exe i end up getting the error duplicate RS: select, updated, delete, etc...
Data Source Debug
c:\rrdtool\rrdtool.exe create \
c:\Inetpub\wwwroot\cacti/rra/localhost_select_56.rrd \
--step 300 \
DS:select:COUNTER:600:0:10000000000 \
DS:change_db:COUNTER:600:0:10000000000 \
DS:insert:COUNTER:600:0:10000000000 \
DS:update:COUNTER:600:0:10000000000 \
DS:delete:COUNTER:600:0:10000000000 \
DS:select:COUNTER:600:0:10000000000 \
DS:insert:COUNTER:600:0:10000000000 \
DS:update:COUNTER:600:0:10000000000 \
DS:delete:COUNTER:600:0:10000000000 \
DS:change_db:COUNTER:600:0:10000000000 \
RRA:AVERAGE:0.5:24:2160 \
RRA:AVERAGE:0.5:1:51840 \
RRA:AVERAGE:0.5:6:8736 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:51840 \
RRA:MAX:0.5:24:2160 \
RRA:MAX:0.5:6:8736 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:51840 \
RRA:LAST:0.5:24:2160 \
RRA:LAST:0.5:6:8736 \
RRA:LAST:0.5:288:797 \
but when i edit it to
c:\rrdtool\rrdtool.exe create c:\Inetpub\wwwroot\cacti/rra/localhost_select_58.rrd --step 300 DS:select:COUNTER:600:0:10000000000 DS:change_db:COUNTER:600:0:10000000000 DS:insert:COUNTER:600:0:10000000000 DS:update:COUNTER:600:0:10000000000 DS:delete:COUNTER:600:0:10000000000 RRA:AVERAGE:0.5:1:51840 RRA:AVERAGE:0.5:24:2160 RRA:AVERAGE:0.5:6:8736 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:51840 RRA:MAX:0.5:24:2160 RRA:MAX:0.5:6:8736 RRA:MAX:0.5:288:797 RRA:LAST:0.5:24:2160 RRA:LAST:0.5:1:51840 RRA:LAST:0.5:6:8736 RRA:LAST:0.5:288:797
it created the RRD file in the /RRA dir that i need.
any ideas why i'm getting duplicated DS?
next question though...
GOOOD NEWS!!!!! after making those changes i'm getting this in my cacti log files!
04/13/2005 11:42:00 AM - CACTID: Poller[0] Host[11] SCRIPT: c:/php/php.exe -q c:/Inetpub/wwwroot/cacti/scripts/mysql_stats.php command localhost cactiuser cactiuser, output: change_db:2644 delete:1276 insert:2533 select:55501 update:1550
yippie!
oh except my data source still doesn't graph. there is no graph when i turn on the debug. just
i was looking at it and i have duplicate data and when i copy and past that into the cmd.exe i end up getting the error duplicate RS: select, updated, delete, etc...
Data Source Debug
c:\rrdtool\rrdtool.exe create \
c:\Inetpub\wwwroot\cacti/rra/localhost_select_56.rrd \
--step 300 \
DS:select:COUNTER:600:0:10000000000 \
DS:change_db:COUNTER:600:0:10000000000 \
DS:insert:COUNTER:600:0:10000000000 \
DS:update:COUNTER:600:0:10000000000 \
DS:delete:COUNTER:600:0:10000000000 \
DS:select:COUNTER:600:0:10000000000 \
DS:insert:COUNTER:600:0:10000000000 \
DS:update:COUNTER:600:0:10000000000 \
DS:delete:COUNTER:600:0:10000000000 \
DS:change_db:COUNTER:600:0:10000000000 \
RRA:AVERAGE:0.5:24:2160 \
RRA:AVERAGE:0.5:1:51840 \
RRA:AVERAGE:0.5:6:8736 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:51840 \
RRA:MAX:0.5:24:2160 \
RRA:MAX:0.5:6:8736 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:51840 \
RRA:LAST:0.5:24:2160 \
RRA:LAST:0.5:6:8736 \
RRA:LAST:0.5:288:797 \
but when i edit it to
c:\rrdtool\rrdtool.exe create c:\Inetpub\wwwroot\cacti/rra/localhost_select_58.rrd --step 300 DS:select:COUNTER:600:0:10000000000 DS:change_db:COUNTER:600:0:10000000000 DS:insert:COUNTER:600:0:10000000000 DS:update:COUNTER:600:0:10000000000 DS:delete:COUNTER:600:0:10000000000 RRA:AVERAGE:0.5:1:51840 RRA:AVERAGE:0.5:24:2160 RRA:AVERAGE:0.5:6:8736 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:51840 RRA:MAX:0.5:24:2160 RRA:MAX:0.5:6:8736 RRA:MAX:0.5:288:797 RRA:LAST:0.5:24:2160 RRA:LAST:0.5:1:51840 RRA:LAST:0.5:6:8736 RRA:LAST:0.5:288:797
it created the RRD file in the /RRA dir that i need.
any ideas why i'm getting duplicated DS?
-
- Posts: 12
- Joined: Mon Sep 20, 2004 3:52 pm
fixed. i had to remove the tabs from the data template.
http://forums.cacti.net/about4820-0-asc-15.html
http://forums.cacti.net/about4820-0-asc-15.html
Who is online
Users browsing this forum: No registered users and 0 guests