Closed GoogleCodeExporter closed 8 years ago
To fix this in our installation we changed all the Data Input Methods to look
something like this:
Input String
------------
<path_php_binary> -q <path_cacti>/scripts/ss_get_mysql_stats.php --host
<hostname>:<port> --items bd,be,bf,bi,bl,bn --user <username> --pass <password>
Input Fields
------------
hostname 2 Hostname
port 3 Port
username 4 Username
password 5 Password
Port Input Field
----------------
Field [Input]: port
Friendly Name: Port
Then finally in all the Data Templates we did this:
Custom Data
-----------
Port
[X] Use Per-Data Source Value (Ignore this Value) [3306]
This means that when new graphs are created for a host the user will be
prompted for
the port, but it will be pre-filled with the 3306 value, so they only need to
type
something if it is different, otherwise they can just continue.
I hope this helps design this feature and implement it in future template
releases.
Sean
Original comment by spkan...@gmail.com
on 4 Jun 2009 at 4:17
I tried your method, never work .
if i put value not same as '3306' it produce blank graph whole time
Original comment by housy....@gmail.com
on 5 Sep 2009 at 12:02
The php scripts requires some changes to support port 3309. I have created
about 95%
of the changes and have a functional script. However I'm not much of a coder and
don't know how to submit a patch properly.
In addition I have a bug with my script that I'm still trying to work out.
Original comment by scott.ka...@gmail.com
on 2 Oct 2009 at 11:00
here is my problem I can't work out, if anyone can help or point me in the
correct
place, line 227 of the ss_php_mysql_stats.php
$conn = @mysql_connect($options['host'].':'.$port, $user, $pass);
I have modified the script so that the variable port shows up however this lines
doesn't format correctly when attempting to connect to the alternate mysql
running on
the alternate port.
Original comment by scott.ka...@gmail.com
on 2 Oct 2009 at 11:06
Attached are some new templates that have username / password / port can be
changed
inside of cacti. Also attached is the new working script that collects data on
alternate ports.
Original comment by scott.ka...@gmail.com
on 5 Oct 2009 at 8:29
Attachments:
Hi! thanks for the code changes to ss_get_mysql_stats.php. The templates
themselves
are not all that useful to contribute back to the project, since this project
doesn't
really create templates -- there is code to auto-generate the templates. What
we
need to do is modify the template definitions. I'll take a look at all of this
now
and perhaps check something into Subversion in the next little bit.
Original comment by baron.schwartz
on 10 Oct 2009 at 3:00
This should be fixed in r212 through r218.
Original comment by baron.schwartz
on 10 Oct 2009 at 5:59
so do we need fix the template manually or just follow the new one you
attached, i will
being exciting to have a try :)
Thanks a lot
Original comment by housy....@gmail.com
on 16 Oct 2009 at 2:35
I have not tested an upgrade process, can you try it and let me know, and I'll
document the results? If you are brave you can just re-import the template and
copy
the new PHP file over. Back up your database first!
Original comment by baron.schwartz
on 17 Oct 2009 at 7:05
the template can not work with my cacti 8.8.7b
Error: XML: Hash version does not exist.
Original comment by housy....@gmail.com
on 22 Oct 2009 at 10:04
hi friend, I finally import the template, but still, i can not get anything
from the
graph, and the /tmp do not produce any temp file.
Do you test this template with Cacti ? what version of cacti you use ?
The php file is good, i run php -q ss_get_mysql_stats.php --item a1 -- ...
can give me the result, but still no graph, would you please check it ?
Thanks a lot.
Original comment by housy....@gmail.com
on 23 Oct 2009 at 12:41
I think you should follow the debugging process in the Cacti documentation to
find
out where the problem is.
Original comment by baron.schwartz
on 23 Oct 2009 at 2:34
ok, thanks, 1 month ago , i also change the php code to let it work with
no-default
port, but to fix the template is too hard a work, and I see another topic you
fix the
issue of thread_cache_size
http://www.xaprb.com/blog/2009/10/15/a-tip-when-upgrading-
mysql-cacti-templates/, is this template also fix it?
I will let you know what it goes on with my new try.
anyway, thanks a lot.
Original comment by housy....@gmail.com
on 23 Oct 2009 at 3:28
Baron,
Along a similar line, what would it take to sponsor the development of
host-specific SSH tunneling for MySQL
connections?
Original comment by ak.from....@gmail.com
on 11 Feb 2010 at 3:47
Original issue reported on code.google.com by
baron.schwartz
on 17 Apr 2009 at 3:58