Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue May 21, 2019 11:43 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Script Server Version of teMySQL stats and Host Template
PostPosted: Tue Oct 10, 2006 12:49 pm 
Offline
Cacti User
User avatar

Joined: Tue Nov 01, 2005 2:10 pm
Posts: 72
Location: Lafayette, LA
The Witness has converted the teMySQL stats script and host template to Script Server for us!

The modified php script can be found here

And, the host template can be found here

Many thanks to everyone who contributed to this script/template. Especially The Witness who converted it to Script Server, after I failed miserably.

Be sure to rebuild your poller's cache after you import it. The template is setup for a 5 minute polling interval. I have a 30 second interval template if anyone is interested. Some of the graphs are still logarithmic (edit the graph template and uncheck the box to change it)

After the conversion the load on my cacti box has dropped considerably.

Enjoy!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 10, 2006 6:35 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
Do you have some before and after snapshots on load average?

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 11, 2006 10:05 am 
Offline
Cacti User
User avatar

Joined: Mon Nov 04, 2002 9:15 am
Posts: 110
Location: ACEH
I'm having problem when importing cacti_host_template_temysql_host.xml to my cacti. Any help would be great. Thanks.


Attachments:
cacti-error.jpg
cacti-error.jpg [ 94.57 KiB | Viewed 21882 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 11, 2006 11:29 am 
Offline
Cacti User
User avatar

Joined: Sun Mar 20, 2005 9:14 am
Posts: 61
Looks like the template was exported in the new "i" version. Upgraded mine and it imported fine.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 11, 2006 1:37 pm 
Offline
Cacti User
User avatar

Joined: Tue Nov 01, 2005 2:10 pm
Posts: 72
Location: Lafayette, LA
I had that problem too, but I figured it was a good time to upgrade anyway. The upgrade went fine, so I was happy. :D


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 11, 2006 3:07 pm 
Offline
Cacti User
User avatar

Joined: Tue Jul 12, 2005 8:16 pm
Posts: 250
i have problems with this

Code:
10/11/2006 09:10:36 PM - PHPSVR: Poller[0] DEBUG: INC: 'E:/www/cacti/scripts/ss_mysql_stats.php' FUNC: 'ss_mysql_stats' PARMS: 'command 127.0.0.1rootxxx'
10/11/2006 09:10:36 PM - CMDPHP: Poller[0] ERROR: MySQL Stats - Parameters Missing, can not continue
10/11/2006 09:10:36 PM - CMDPHP: Poller[0] ERROR: MySQL Stats - Connect failed. Check MySQL parameters (host/login/password)
10/11/2006 09:10:36 PM - CACTID: Poller[0] Host[69] DS[778] SS[0] WARNING: Result from SERVER not valid.  Partial Result: ...
10/11/2006 09:10:36 PM - CACTID: Poller[0] Host[69] DS[778] SS[0] SERVER: E:/www/cacti/scripts/ss_mysql_stats.php ss_mysql_stats command 127.0.0.1rootxxx, output: U
10/11/2006 09:10:37 PM - PHPSVR: Poller[0] DEBUG: INC: 'E:/www/cacti/scripts/ss_mysql_stats.php' FUNC: 'ss_mysql_stats' PARMS: 'handler 127.0.0.1rootxxx'
10/11/2006 09:10:37 PM - CMDPHP: Poller[0] ERROR: MySQL Stats - Parameters Missing, can not continue
10/11/2006 09:10:37 PM - CMDPHP: Poller[0] ERROR: MySQL Stats - Connect failed. Check MySQL parameters (host/login/password)


at the cli, it works

i don't understand why i don't have space between hostname, username and password


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 11, 2006 7:23 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
Yea, this must be an issue with the template export. We need to submit a bug reports on this.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 12, 2006 11:20 am 
Offline
Cacti User
User avatar

Joined: Tue Nov 01, 2005 2:10 pm
Posts: 72
Location: Lafayette, LA
gilles

Code:
10/11/2006 09:10:36 PM - PHPSVR: Poller[0] DEBUG: INC: 'E:/www/cacti/scripts/ss_mysql_stats.php' FUNC: 'ss_mysql_stats' PARMS: 'command 127.0.0.1rootxxx'




I had this problem too, but when I looked at the xml, the spaces were there. Edit the Data Inupt Method -> Input String and add the spaces. You'll probably have to do it to all the DIMs untill we can figure out what the problem is.

~Jonathan


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 12, 2006 11:52 am 
Offline
Cacti User
User avatar

Joined: Tue Nov 01, 2005 2:10 pm
Posts: 72
Location: Lafayette, LA
Something else I'm having problems with.

Image

This is happening to all my MySQL graphs with out any consistency. Sould I up the timeout value for the scripts?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 12, 2006 5:31 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
Review your Cacti log for odd messages. Also, confirm in the script the error level is set to '0'. It should be one of the first lines in the script.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 13, 2006 3:26 am 
Offline

Joined: Wed Sep 28, 2005 4:21 am
Posts: 6
Quote:
10/13/2006 10:20:14 AM - CMDPHP: Poller[0] Host[4] DS[90] WARNING: Result from SERVER not valid. Partial Result: U
10/13/2006 10:20:14 AM - CMDPHP: Poller[0] ERROR: MySQL Stats - Connect failed. Check MySQL parameters (host/login/password)
10/13/2006 10:20:14 AM - CMDPHP: Poller[0] ERROR: MySQL Stats - Parameters Missing, can not continue


I just upgraded to cacti 086i, and imported the server script, and i got this error ...

Any clue ?

Logs is quite empty, and if I run the script from a command line I have a "U" as output ...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 13, 2006 5:47 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
mahuani,

Can you edit your posted XML file and add the spaces.

gilles,

You know I'm after you about Manage 4.3. Are you planning on responding to my e-mails?

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 15, 2006 9:17 pm 
Offline
Cacti User
User avatar

Joined: Tue Nov 01, 2005 2:10 pm
Posts: 72
Location: Lafayette, LA
Here are some before and after screenshots of the load avg on one of my boxes.

Before:

Image

After:
Image

The after shot also includes a upgrade of rrdtool and cacti


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 16, 2006 6:29 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
Cut in half, that's good.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 15, 2006 4:55 pm 
Offline

Joined: Wed Nov 15, 2006 4:40 pm
Posts: 5
I'm getting an error of 'ERROR: invalid y-grid format

I edited the graph template, putting " " arround the y-grid title, but still the same problem

Thanks!

Code:
RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Local MySQL Server - teMySQL - Old Handler Stats" \
--base=1000 \
--height=150 \
--width=600 \
--alt-autoscale-max \
--lower-limit=1 \
--y-grid=access units \
--vertical-label="" \
--slope-mode \
DEF:a="/var/www//htdocs/cacti/rra/local_mysql_server_write_73.rrd":read_rnd_next:AVERAGE \
DEF:b="/var/www//htdocs/cacti/rra/local_mysql_server_write_73.rrd":read_first:AVERAGE \
DEF:c="/var/www//htdocs/cacti/rra/local_mysql_server_write_73.rrd":read_key:AVERAGE \
DEF:d="/var/www//htdocs/cacti/rra/local_mysql_server_write_73.rrd":read_next:AVERAGE \
DEF:e="/var/www//htdocs/cacti/rra/local_mysql_server_write_73.rrd":read_prev:AVERAGE \
DEF:f="/var/www//htdocs/cacti/rra/local_mysql_server_write_73.rrd":read_rnd:AVERAGE \
DEF:g="/var/www//htdocs/cacti/rra/local_mysql_server_write_73.rrd":delete:AVERAGE \
DEF:h="/var/www//htdocs/cacti/rra/local_mysql_server_write_73.rrd":update:AVERAGE \
DEF:i="/var/www//htdocs/cacti/rra/local_mysql_server_write_73.rrd":write:AVERAGE \
AREA:a#FFD660:"Read Rnd Next"  \
GPRINT:a:LAST:"Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MIN:"Min\:%8.2lf %s"  \
GPRINT:a:MAX:"Max\:%8.2lf %s\n"  \
LINE1:b#FF4105:"Read First"  \
GPRINT:b:LAST:"   Current\:%8.2lf %s"  \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MIN:"Min\:%8.2lf %s"  \
GPRINT:b:MAX:"Max\:%8.2lf %s\n"  \
LINE1:c#623465:"Read Key"  \
GPRINT:c:LAST:"     Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:c:MIN:"Min\:%8.2lf %s"  \
GPRINT:c:MAX:"Max\:%8.2lf %s\n"  \
LINE1:d#9FA4EE:"Read Next"  \
GPRINT:d:LAST:"    Current\:%8.2lf %s"  \
GPRINT:d:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:d:MIN:"Min\:%8.2lf %s"  \
GPRINT:d:MAX:"Max\:%8.2lf %s\n"  \
LINE1:e#7EE600:"Read Prev"  \
GPRINT:e:LAST:"    Current\:%8.2lf %s"  \
GPRINT:e:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:e:MIN:"Min\:%8.2lf %s"  \
GPRINT:e:MAX:"Max\:%8.2lf %s\n"  \
LINE1:f#4444FF:"Read Rnd"  \
GPRINT:f:LAST:"     Current\:%8.2lf %s"  \
GPRINT:f:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:f:MIN:"Min\:%8.2lf %s"  \
GPRINT:f:MAX:"Max\:%8.2lf %s\n"  \
LINE1:g#797C6E:"Delete"  \
GPRINT:g:LAST:"       Current\:%8.2lf %s"  \
GPRINT:g:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:g:MIN:"Min\:%8.2lf %s"  \
GPRINT:g:MAX:"Max\:%8.2lf %s\n"  \
LINE1:h#005D57:"Update\:"  \
GPRINT:h:LAST:"      Current\:%8.2lf %s"  \
GPRINT:h:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:h:MIN:"Min\:%8.2lf %s"  \
GPRINT:h:MAX:"Max\:%8.2lf %s\n"  \
LINE1:i#005199:"write\:"  \
GPRINT:i:LAST:"       Current\:%8.2lf %s"  \
GPRINT:i:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:i:MIN:"Min\:%8.2lf %s"  \
GPRINT:i:MAX:"Max\:%8.2lf %s\n"

RRDTool Says:

ERROR: invalid y-grid format


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group