MySQL Template

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
siegfredev
Posts: 7
Joined: Mon Jul 23, 2018 3:15 am

MySQL Template

Post by siegfredev »

anyone knows what is my error on making the mysql template to work? I'm not getting the data
Screenshot from 2018-08-22 11-09-47.png
Screenshot from 2018-08-22 11-09-47.png (68.08 KiB) Viewed 725 times
I got the template from


manual command using mysql_stats.php is working
Screenshot from 2018-08-22 11-10-23.png
Screenshot from 2018-08-22 11-10-23.png (6.57 KiB) Viewed 725 times
RRD debugging says it's ok

Code: Select all

RRDtool Command:

/bin/rrdtool graph - \
--imgformat=PNG \
--start='1534892867' \
--end='1534907267' \
--pango-markup  \
--title='Local Linux Machine - MySQL Commands' \
--vertical-label='Commands / second' \
--slope-mode \
--base=1000 \
--height=120 \
--width=500 \
--tabwidth '30' \
--alt-autoscale-max \
--lower-limit='0' \
COMMENT:"From 2018/08/22 07\:07\:47 To 2018/08/22 11\:07\:47\c" \
COMMENT:"  \n" \
--color BACK#F3F3F3 \
--color CANVAS#FDFDFD \
--color SHADEA#CBCBCB \
--color SHADEB#999999 \
--color FONT#000000 \
--color AXIS#2C4D43 \
--color ARROW#2C4D43 \
--color FRAME#2C4D43 \
--border 1 --font TITLE:11:'Arial' \
--font AXIS:8:'Arial' \
--font LEGEND:8:'Courier' \
--font UNIT:8:'Arial' \
--font WATERMARK:6:'Arial' \
--slope-mode \
--watermark 'Generated by Cacti®' \
DEF:a='/usr/share/cacti/rra/local_linux_machine_mysql_comquestions_294.rrd':'mysql_comquestions':AVERAGE \
DEF:b='/usr/share/cacti/rra/local_linux_machine_mysql_comselect_297.rrd':'mysql_comselect':AVERAGE \
DEF:c='/usr/share/cacti/rra/local_linux_machine_mysql_comdelete_290.rrd':'mysql_comdelete':AVERAGE \
DEF:d='/usr/share/cacti/rra/local_linux_machine_mysql_cominsert_292.rrd':'mysql_cominsert':AVERAGE \
DEF:e='/usr/share/cacti/rra/local_linux_machine_mysql_comupdate_298.rrd':'mysql_comupdate':AVERAGE \
DEF:f='/usr/share/cacti/rra/local_linux_machine_mysql_comreplace_295.rrd':'mysql_comreplace':AVERAGE \
DEF:g='/usr/share/cacti/rra/local_linux_machine_mysql_comload_293.rrd':'mysql_comload':AVERAGE \
DEF:h='/usr/share/cacti/rra/local_linux_machine_mysql_comdelmulti_291.rrd':'mysql_comdelmulti':AVERAGE \
DEF:i='/usr/share/cacti/rra/local_linux_machine_mysql_comupdatemult_299.rrd':'mysql_comupdatemult':AVERAGE \
DEF:j='/usr/share/cacti/rra/local_linux_machine_mysql_comreplacesel_296.rrd':'mysql_comreplacesel':AVERAGE \
AREA:a#CCBB00FF:'Questions (Total Statements Executed)'  \
AREA:b#4444FFFF:'SELECT                               '  \
AREA:c#FF0000FF:'DELETE                               ':STACK \
AREA:d#A150AAFF:'INSERT                               ':STACK \
AREA:e#FF00FFFF:'UPDATE                               ':STACK \
AREA:f#562B29FF:'REPLACE                              ':STACK \
AREA:g#FFF200FF:'LOAD                                 ':STACK \
AREA:h#B90054FF:'DELETE Multi                         ':STACK \
AREA:h#9FA4EEFF:'INSERT SELECT                        ':STACK \
AREA:i#FFAB00FF:'UPDATE Multi                         ':STACK \
AREA:j#797C6EFF:'REPLACE SELECT                       ':STACK \
LINE1:a#000000FF:'' 

RRDtool Says:
OK
I am using the 1minute polling from
and Cacti version 1.1.37

Thank you in advance.
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: MySQL Template

Post by netniV »

OK, so far you have shown that the template looks OK, but are you actually getting any data back for the device in question when running as the poller? Switch your logging to medium and you will see the results of each poll request made.

If you can provide a zip file with the templates and scripts, I can try it out myself.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
siegfredev
Posts: 7
Joined: Mon Jul 23, 2018 3:15 am

Re: MySQL Template

Post by siegfredev »

netniV wrote:OK, so far you have shown that the template looks OK, but are you actually getting any data back for the device in question when running as the poller? Switch your logging to medium and you will see the results of each poll request made.

If you can provide a zip file with the templates and scripts, I can try it out myself.
teMySQLcacti-20060810.tar.gz
(82.28 KiB) Downloaded 80 times
here is the archive for the template and scripts.

Sorry for the noob question, but how can I switch my logging to medium? Thanks
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: MySQL Template

Post by netniV »

It's under the system settings.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
siegfredev
Posts: 7
Joined: Mon Jul 23, 2018 3:15 am

Re: MySQL Template

Post by siegfredev »

netniV wrote:It's under the system settings.
here is the output of the cacti.log file

Code: Select all

2018/08/23 08:27:01 - POLLER: Poller[1] NOTE: Poller Int: '60', Cron Int: '60', Time Since Last: '60.75', Max Runtime '58', Poller Runs: '1'
2018/08/23 08:27:01 - POLLER: Poller[1] WARNING: Poller Output Table not Empty.  Issues: 1, DS[300]
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[290] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[291] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[292] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[293] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[294] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[295] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[296] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[297] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[298] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[299] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] STATUS: Device 'cacti' is UP.
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[306] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[306] SNMP: v2: cacti, dsname: mysql_comdelete, oid: NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysqlcomm".3, output: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[307] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[307] SNMP: v2: cacti, dsname: mysql_comdelmulti, oid: NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysqlcomm".8, output: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[308] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[308] SNMP: v2: cacti, dsname: mysql_cominsert, oid: NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysqlcomm".4, output: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[309] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[309] SNMP: v2: cacti, dsname: mysql_comload, oid: NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysqlcomm".7, output: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[310] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[310] SNMP: v2: cacti, dsname: mysql_comquestions, oid: NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysqlcomm".1, output: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[311] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[311] SNMP: v2: cacti, dsname: mysql_comreplace, oid: NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysqlcomm".6, output: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[312] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[312] SNMP: v2: cacti, dsname: mysql_comreplacesel, oid: NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysqlcomm".11, output: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[313] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[313] SNMP: v2: cacti, dsname: mysql_comselect, oid: NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysqlcomm".2, output: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[314] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[314] SNMP: v2: cacti, dsname: mysql_comupdate, oid: NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysqlcomm".5, output: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[315] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[10] DS[315] SNMP: v2: cacti, dsname: mysql_comupdatemult, oid: NET-SNMP-EXTEND-MIB::nsExtendOutLine."mysqlcomm".10, output: U
2018/08/23 08:27:02 - POLLER: Poller[1] WARNING: Invalid Response(s), Errors[10] Device[10] Thread[1] DS[306, 307, 308, 309, 310, 311, 312, 313, 314, 315]
2018/08/23 08:27:02 - POLLER: Poller[1] Time: 0.2275 s, Poller: , Theads: N/A, Devices: 1
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[300] WARNING: Result from CMD not valid.  Partial Result: Error: MySQL connect
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[301] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[302] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[303] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[304] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] Device[1] DS[305] WARNING: Result from SNMP not valid.  Partial Result: U
2018/08/23 08:27:02 - POLLER: Poller[1] WARNING: Invalid Response(s), Errors[16] Device[1] Thread[1] DS[290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305]
2018/08/23 08:27:04 - POLLER: Poller[1] Time: 2.4762 s, Poller: , Theads: N/A, Devices: 4
2018/08/23 08:27:05 - SYSTEM STATS: Time:3.4081 Method:cmd.php Processes:1 Threads:N/A Hosts:5 HostsPerProcess:5 DataSources:193 RRDsProcessed:97
siegfredev
Posts: 7
Joined: Mon Jul 23, 2018 3:15 am

Re: MySQL Template

Post by siegfredev »

netniV wrote:It's under the system settings.
it seems working now
Screenshot from 2018-08-23 13-26-17.png
Screenshot from 2018-08-23 13-26-17.png (101.64 KiB) Viewed 692 times
Thanks for the debugging tip :D
found the error on mysql connection
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests