Unable to get Cacti to graph a remote MySQL 5 on Ubuntu.

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
prodsacnetworking
Posts: 5
Joined: Wed Aug 08, 2007 1:08 pm

Unable to get Cacti to graph a remote MySQL 5 on Ubuntu.

Post by prodsacnetworking »

Hi,

I'm new to cacti.
I have 10 servers (ubuntu 6.06.1LTS and w2k3).

I have the graphs I need for everything except for :

1:
my 2 MySQL servers.
They are on Ubuntu 6.06. 64bits
MySql version: 5.0.22-Debian_0ubuntu6.06.3-log

I used :
http://forums.cacti.net/viewtopic.php?t=6108

I have a couple of errors:

---
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="morpheus - mail-db-dns1 - MySQL - Command statistics" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--y-grid=access \
--vertical-label="access units" \
--slope-mode \
AREA:#7EE600:"Select" \
GPRINT::LAST:" Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MIN:"Min\:%8.2lf %s" \
GPRINT::MAX:"Max\:%8.2lf %s\n" \
LINE1:#000000:"Change_DB" \
GPRINT::LAST:"Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MIN:"Min\:%8.2lf %s" \
GPRINT::MAX:"Max\:%8.2lf %s\n" \
LINE1:#FF0000:"Delete" \
GPRINT::LAST:" Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MIN:"Min\:%8.2lf %s" \
GPRINT::MAX:"Max\:%8.2lf %s\n" \
LINE1:#FF7D00:"Insert" \
GPRINT::LAST:" Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MIN:"Min\:%8.2lf %s" \
GPRINT::MAX:"Max\:%8.2lf %s\n" \
LINE1:#4444FF:"Update" \
GPRINT::LAST:" Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MIN:"Min\:%8.2lf %s" \
GPRINT::MAX:"Max\:%8.2lf %s\n"
RRDTool Says:

ERROR: invalid y-grid format
---

I tried using:
php -q mysql_stats.php hostname cactiuser "cactiuser" [status_var]
Error: MySQL connect failed. Check MySQL parameters (host/login/password)

any ideas??
-------------------------------
-------------------------------

2:
On the same server, I have 4G of RAM and 500G of HD on /dev/sda1 but I only see 1.5G of ram and 28G of HD...

thanks.

MArc
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please clear "Unit grid value" and "Unit Exponent value" on the related Graph Template and retry (it's a broken template)
Reinhard
prodsacnetworking
Posts: 5
Joined: Wed Aug 08, 2007 1:08 pm

Post by prodsacnetworking »

ok, now, if I try:

MYSQL Traffic:

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="morpheus - mail-db-dns1 - MySQL - Traffic" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
CDEF:cdefa=a,8,* \
CDEF:cdeff=a,8,* \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total In\: 0 bytes\n" \
LINE1:cdeff#002A97:"Outbound" \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total Out\: 0 bytes"
RRDTool Says:

ERROR: invalid rpn expression in: a,8,*


and Command Statistics:

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="morpheus - mail-db-dns1 - MySQL - Command statistics" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="access units" \
--slope-mode \
AREA:#7EE600:"Select" \
GPRINT::LAST:" Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MIN:"Min\:%8.2lf %s" \
GPRINT::MAX:"Max\:%8.2lf %s\n" \
LINE1:#000000:"Change_DB" \
GPRINT::LAST:"Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MIN:"Min\:%8.2lf %s" \
GPRINT::MAX:"Max\:%8.2lf %s\n" \
LINE1:#FF0000:"Delete" \
GPRINT::LAST:" Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MIN:"Min\:%8.2lf %s" \
GPRINT::MAX:"Max\:%8.2lf %s\n" \
LINE1:#FF7D00:"Insert" \
GPRINT::LAST:" Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MIN:"Min\:%8.2lf %s" \
GPRINT::MAX:"Max\:%8.2lf %s\n" \
LINE1:#4444FF:"Update" \
GPRINT::LAST:" Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MIN:"Min\:%8.2lf %s" \
GPRINT::MAX:"Max\:%8.2lf %s\n"
RRDTool Says:

ERROR: Not a valid vname: #7EE600 in line AREA:#7EE600:Select
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This graph is broken. It does not contain any Data Item.
Either delete and re-create it or check the Graph Template: Are the datasources referenced? In this case, please re-import the template
Reinhard
prodsacnetworking
Posts: 5
Joined: Wed Aug 08, 2007 1:08 pm

Post by prodsacnetworking »

ok. I reimported it.
I now have graphics. I'm gonna see if the results are drawed.

thanks.
prodsacnetworking
Posts: 5
Joined: Wed Aug 08, 2007 1:08 pm

Post by prodsacnetworking »

Ok, now on the same server, I have 4G of RAM and 500G of HD on /dev/sda1 but I only see 1.5G of ram and 28G of HD...

thanks.

MArc
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Again, please use the debugging procedure to find the exact OIDs cacti is querying along with the results. You may want to verify those results by running the queries from cli
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest