1-
createa a data input method.
Name: choose a name
Input Type: script/command
Input string: /usr/local/bin/perl <path_cacti>/scripts/myscript name
(since ur using php, replace the FULL path to perl, with your full path to php
Input fields:
things like ip address or community or whatever it is u need to pass to your script as argument, if anything
Output Fields:
(choose your own friendly names, and mark update RRA)
CASE MUST MATCH EXACTLY. (upper and lower case)
Questions
Slow_queries
Qcache_queries_in_cache
Qcache_inserts
(etc. you get the idea. use the same name as what's displayed in your script, just remove all the : )
Same your data input method.
Create a new data TEMPLATE
Choose a name for it
Data source
Name: |host_description| -whateverhere
data input method. Select the data input method created above.
Data source active must be checked.
Data source Item:
create one data source item PER value being returned by your script.
for example, if your script returns 10 diff values, create 10 data source items.
i use the Output field name_STATS name for each of my data sources to keep them straight. example: Questions_STATS Slow_queries_STATS
etc
choose the appropriate min and max value, the type of data source, counter gauge etc, and then the output field.
then you do the same with a graph template and you carry on.
If you want an example on how i did the same thing, look at
http://www.raxnet.net/board/viewtopic.php?t=3361
i did the same thing for my bind 8 stats. it's basically the same principle.
hope this helps.