Mysql templates
Moderators: Developers, Moderators
Mysql templates
hello
I have installed mysql-cacti-templates-1.1.1 in my cacti server.
But my graph have no data and when i enter this command for all hosts i have a result.
#php -q ss_get_mysql_stats.php --host 172.159.264.215 --items bd,be,bn,bf,bi,bn --user cactiuser --pass lkdfqmke
I result :
bd:9 be:3092 bf:14 bi:1 bn:33965
Why i have no graph it is all NAN???
help me it is very urgent
thanks for all!!!!!
I have installed mysql-cacti-templates-1.1.1 in my cacti server.
But my graph have no data and when i enter this command for all hosts i have a result.
#php -q ss_get_mysql_stats.php --host 172.159.264.215 --items bd,be,bn,bf,bi,bn --user cactiuser --pass lkdfqmke
I result :
bd:9 be:3092 bf:14 bi:1 bn:33965
Why i have no graph it is all NAN???
help me it is very urgent
thanks for all!!!!!
Mysql templates
Thanks for your anscer.
How I use cmd.php????
How I use cmd.php????
Mysql templates
I find cmd.php in settings/poller and i choose cmd.php in
Poller Type
The poller type to use. This setting will take effect at next polling interval.
But my mysql don't run.
help please!!!!!!!!
Poller Type
The poller type to use. This setting will take effect at next polling interval.
But my mysql don't run.
help please!!!!!!!!
-
- Cacti Guru User
- Posts: 1884
- Joined: Mon Oct 16, 2006 5:57 am
- Location: United Kingdom
- Contact:
Check the data input source for this template. My guess is that it has a different path for the PHP binary.
You'll need to clear the poller cache if you make any changes - avoid doing this during a poller run.
You'll need to clear the poller cache if you make any changes - avoid doing this during a poller run.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Mysql Templates
Thanks !!!!
I not resolve my problem i change the path on Input string on data input methods mysql connection :
#php -q /var/www/html/cacti/scripts/ss_get_mysql_stats.php --host <hostname> --item bd,be,bn,bf,bi,bl --user cactiuser --pass toto
I have graph but it is nan!!!
how i resolve my problem???
Help me please!!!
I not resolve my problem i change the path on Input string on data input methods mysql connection :
#php -q /var/www/html/cacti/scripts/ss_get_mysql_stats.php --host <hostname> --item bd,be,bn,bf,bi,bl --user cactiuser --pass toto
I have graph but it is nan!!!
how i resolve my problem???
Help me please!!!
-
- Posts: 5
- Joined: Fri Apr 10, 2009 3:46 pm
try changing the host
hi 127.0.0.1 did not work on my debian server but changing to to localhost in the config made the command run.
test the script listed here:
System Utilities -> View Poller Cache
<your website>/cacti/utilities.php?action=view_poller_cache
I have just tried it and i hope it works. I added a second host as not sure where it is used. then changed
INSERT INTO `cacti`.`host` (
`id` ,
`host_template_id` ,
`description` ,
`hostname` ,
`notes` ,
`snmp_community` ,
`snmp_version` ,
`snmp_username` ,
`snmp_password` ,
`snmp_auth_protocol` ,
`snmp_priv_passphrase` ,
`snmp_priv_protocol` ,
`snmp_context` ,
`snmp_port` ,
`snmp_timeout` ,
`availability_method` ,
`ping_method` ,
`ping_port` ,
`ping_timeout` ,
`ping_retries` ,
`max_oids` ,
`disabled` ,
`status` ,
`status_event_count` ,
`status_fail_date` ,
`status_rec_date` ,
`status_last_error` ,
`min_time` ,
`max_time` ,
`cur_time` ,
`avg_time` ,
`total_polls` ,
`failed_polls` ,
`availability`
)
VALUES (
'2', '8', 'Localhost', 'localhost', '', 'public', '0', '', '', 'MD5', '', 'DES', '', '161', '500', '3', '2', '23', '400', '1', '10', '', '3', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0.06000', '0.09000', '0.06000', '0.06049', '5873', '0', '100.00000'
);
When you have a new localhost, go to Data Sources and change the dropdown to the new host for each mysql source.
then go back and look at the generated command at System Utilities -> View Poller Cache
I like you had tested the cmd from this thread but that was not the same query as running in cacti.
Now all mine works, hope yours does
test the script listed here:
System Utilities -> View Poller Cache
<your website>/cacti/utilities.php?action=view_poller_cache
I have just tried it and i hope it works. I added a second host as not sure where it is used. then changed
INSERT INTO `cacti`.`host` (
`id` ,
`host_template_id` ,
`description` ,
`hostname` ,
`notes` ,
`snmp_community` ,
`snmp_version` ,
`snmp_username` ,
`snmp_password` ,
`snmp_auth_protocol` ,
`snmp_priv_passphrase` ,
`snmp_priv_protocol` ,
`snmp_context` ,
`snmp_port` ,
`snmp_timeout` ,
`availability_method` ,
`ping_method` ,
`ping_port` ,
`ping_timeout` ,
`ping_retries` ,
`max_oids` ,
`disabled` ,
`status` ,
`status_event_count` ,
`status_fail_date` ,
`status_rec_date` ,
`status_last_error` ,
`min_time` ,
`max_time` ,
`cur_time` ,
`avg_time` ,
`total_polls` ,
`failed_polls` ,
`availability`
)
VALUES (
'2', '8', 'Localhost', 'localhost', '', 'public', '0', '', '', 'MD5', '', 'DES', '', '161', '500', '3', '2', '23', '400', '1', '10', '', '3', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '0.06000', '0.09000', '0.06000', '0.06049', '5873', '0', '100.00000'
);
When you have a new localhost, go to Data Sources and change the dropdown to the new host for each mysql source.
then go back and look at the generated command at System Utilities -> View Poller Cache
I like you had tested the cmd from this thread but that was not the same query as running in cacti.
Now all mine works, hope yours does
Mysql templates
Hello
Thanks for your answer!!!
I have create the new device for each mysql source.
When I execute command present in System Utilities/View Poller Cache in my console serveur cacti:
php -q /var/www/html/cacti/scripts/ss_get_mysql_stats.php --host 192.168.1.1 --items bv,bw,bx,by,bz --user cactiuser --pass toto
He returns:
bv:48991837 bw:1041574944 bx:984755131 by:1083093907 bz:2785
My graph is created but it is NAN.The logs files do not help me and when I turn on the graph debug.
RRDTool Says:
OK
I'm really Lost!!!!
HELP ME PLEASE!!!!!!!!
Thanks for your answer!!!
I have create the new device for each mysql source.
When I execute command present in System Utilities/View Poller Cache in my console serveur cacti:
php -q /var/www/html/cacti/scripts/ss_get_mysql_stats.php --host 192.168.1.1 --items bv,bw,bx,by,bz --user cactiuser --pass toto
He returns:
bv:48991837 bw:1041574944 bx:984755131 by:1083093907 bz:2785
My graph is created but it is NAN.The logs files do not help me and when I turn on the graph debug.
RRDTool Says:
OK
I'm really Lost!!!!
HELP ME PLEASE!!!!!!!!
- Attachments
-
- graph_image.php.png (44.72 KiB) Viewed 11000 times
-
- Posts: 5
- Joined: Fri Apr 10, 2009 3:46 pm
Hi portos67
so you go to Data Sources then choose to ADD
Selected Data Template = X MySQL Command Counters DT
Host = localhost [for me anyway, i think you have 172.159.264.215]
Then you have to wait a bit as that will start collecting data every time its polled.
Then in Graph Management choose ADD
Selected Graph Template = X MySQL Command Counters GT
Host = localhost
then it asks you to match up all the drop downs.
Supplemental Graph Template Data
After that I get an error, but it does not matter:
Notice: Undefined variable: local_graph_id in /usr/share/cacti/site/graphs.php on line 201
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/graphs.php:201) in /usr/share/cacti/site/graphs.php on line 254
I get a graph after few minutes.
If I go to System Utilities > Poller Cache Items
Localhost - MySQL Command Counters
Script: /usr/bin/php -q /usr/share/cacti/site/scripts/ss_get_mysql_stats.php --host localhost --items c6,cb,c4,ca,c8,c7,cc,c5,c3,c9,c2 --user --pass
RRD: /var/lib/cacti/rra/localhost_com_select_19.rrd
if I run that at cmd line i get
c2:51546337 c3:5323583 c4:80201 c5:24886526 c6:35224 c7:5773 c8:0 c9:454491 ca:73 cb:558 cc:9
so you go to Data Sources then choose to ADD
Selected Data Template = X MySQL Command Counters DT
Host = localhost [for me anyway, i think you have 172.159.264.215]
Then you have to wait a bit as that will start collecting data every time its polled.
Then in Graph Management choose ADD
Selected Graph Template = X MySQL Command Counters GT
Host = localhost
then it asks you to match up all the drop downs.
Supplemental Graph Template Data
After that I get an error, but it does not matter:
Notice: Undefined variable: local_graph_id in /usr/share/cacti/site/graphs.php on line 201
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/graphs.php:201) in /usr/share/cacti/site/graphs.php on line 254
I get a graph after few minutes.
If I go to System Utilities > Poller Cache Items
Localhost - MySQL Command Counters
Script: /usr/bin/php -q /usr/share/cacti/site/scripts/ss_get_mysql_stats.php --host localhost --items c6,cb,c4,ca,c8,c7,cc,c5,c3,c9,c2 --user --pass
RRD: /var/lib/cacti/rra/localhost_com_select_19.rrd
if I run that at cmd line i get
c2:51546337 c3:5323583 c4:80201 c5:24886526 c6:35224 c7:5773 c8:0 c9:454491 ca:73 cb:558 cc:9
-
- Posts: 5
- Joined: Fri Apr 10, 2009 3:46 pm
MySQL Templates
Thank you for your answer !!!!!! But my graph is always NAN!!!!
It is the procedure that I accomplished:
-data sources
-ADD
-Selected data templates ( X MySQL Command Counters DT)
-Host ( 192.168.1.5)
-CREATE
-SAVE
-Graph Management
-ADD
-Selected Graph templates ( X MySQL Command Counters GT)
-Host (192.168.1.5)
-I add Graph Item fields ( sea the screen shot) I follow make to change Graph Items???
-He returns error for Notice:
Undefined variable: local_graph_id in /usr/share/cacti/site/graphs.php on line 201
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/graphs.php:201) in /usr/share/cacti/site/graphs.php on line 254
-I go to the graph and I sea NAN after 5 minutes.
Help me, I become very mad
It is the procedure that I accomplished:
-data sources
-ADD
-Selected data templates ( X MySQL Command Counters DT)
-Host ( 192.168.1.5)
-CREATE
-SAVE
-Graph Management
-ADD
-Selected Graph templates ( X MySQL Command Counters GT)
-Host (192.168.1.5)
-I add Graph Item fields ( sea the screen shot) I follow make to change Graph Items???
-He returns error for Notice:
Undefined variable: local_graph_id in /usr/share/cacti/site/graphs.php on line 201
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/graphs.php:201) in /usr/share/cacti/site/graphs.php on line 254
-I go to the graph and I sea NAN after 5 minutes.
Help me, I become very mad
- Attachments
-
- Need it to change stocks????
- capture15.png (200.88 KiB) Viewed 10796 times
-
- Posts: 5
- Joined: Fri Apr 10, 2009 3:46 pm
MySQL Templates
Hello and very thanks for all!!!! but i begin crazy
Yes I enter the command line for my all devices i returns data.
php -q ss_get_mysql_stats.php --host 192.168.1.5 --items bd,be,bn,bf,bi,bn --user cactiuser --pass lkdfqmke
c2:1620172 c3:59867 c4:50697 c5:1237304 c6:22544 c7:5287 c8:0 c9:0 ca:0 cb:0 cc:0
My cacti is installed in servers and my devices is servers.
Help me
Yes I enter the command line for my all devices i returns data.
php -q ss_get_mysql_stats.php --host 192.168.1.5 --items bd,be,bn,bf,bi,bn --user cactiuser --pass lkdfqmke
c2:1620172 c3:59867 c4:50697 c5:1237304 c6:22544 c7:5287 c8:0 c9:0 ca:0 cb:0 cc:0
My cacti is installed in servers and my devices is servers.
Help me
-
- Posts: 1
- Joined: Wed Apr 22, 2009 2:24 pm
I am having the same problem, and like the poster, I can run the command manually and get output as the script user. I'm checking all of the paths in settings; however, I cannot find where "path_cacti" is defined to check it. Any clues on that? I think that this may have an old leftover setting from when it lived in a different location on a different server. My cacti database and rras go back a few years now.
Thanks,
Damon
Thanks,
Damon
Mysql Templates
Thank you dor all!!!!!
I achieved has make work mysql templates. The installation was good if graphs is NAN. Go in /tmp and erase files in duplicate of machine.
I have a question???
How i can install ss_Apache_Stats in cacti?? Have you a idea or a URL for help me????
I achieved has make work mysql templates. The installation was good if graphs is NAN. Go in /tmp and erase files in duplicate of machine.
I have a question???
How i can install ss_Apache_Stats in cacti?? Have you a idea or a URL for help me????
Who is online
Users browsing this forum: No registered users and 2 guests