4

I'm trying to get cacti setup to monitor a variety of mysql servers, each with multiple instances running on different ports on the machines.

I'm using the scripts and templates from http://mysql-cacti-templates.googlecode.com/files/better-cacti-templates-1.1.8.tar.gz

I got them all imported and setup a device with the appropriate graph templates. However it's not gathering data. The poller cron is running and I can see it pop up in the process list.

Looking at the Data Input Methods I'm seeing Input Strings that look like

<path_php_binary> -q <path_cacti>/scripts/ss_get_mysql_stats.php --host <hostname> 
--items dy --user <username> --pass <password> --port <port>

That is the literal string it has. I can see where it's able to substitute the path_php_binary and path_cacti from the general Cacti config settings. I see it's pulling hostname from the corresponding devices hostname.

What I cannot figure out is how to pass in the appropriate username, password and port.

Below that I see an Input Fields table enumerating hostname, username, password and port but they just seem to be definitions where you can specify required/optional an a validation regex the match inputs against.

How do I get user/pass/port actually passed in? This is a sample of a literal command I'm seeing in the processlist when the poller runs

/usr/bin/php -q /var/www/cacti/html/scripts/ss_get_mysql_stats.php --host inddbs6  
--items e7,e8,e9,ea,eb,ec,ed --user --pass --port

I really don't want to specify literal values there b/c I'm wanting to reuse this template for many a dozen different mysql instances with different hostname and ports

atxdba
  • 337
  • 1
  • 5
  • 15

1 Answers1

1

Found what I was looking for shortly after posting this. I needed to go to the Data Templates section and find the relevant templates. There is a custom data table with input boxes for the user/past/port values.

You can then click a box for each one to say Per Device Setting. I can then go to DataSource for my various devices and enter the custom port numbers as needed. I was hoping to be able to just set this on a per device level, but I'll just look for someone to batch set this on the back end.

atxdba
  • 337
  • 1
  • 5
  • 15