I've written a data input method script for Cacti (in Ruby, to collects stats from beanstalkd) and it works from the command line (returning a single simple integer, as documented here) when run as the cacti user account but the Cacti tool itself isn't harvesting any data and there's nothing in the logs.

And the secondary issue was the proper configuration of the Data Input Methods (one for each separate metric I wanted to collect, even though they all used the same script) which feeds the Data Sources which feeds the Data Templates (or vice versa, I'm still not clear on that) which feeds the Graph Templates which need to be assigned to the Devices then added to the Graph Trees. In summary, it's a major debacle with crap for documentation and I hope to never have to do it again.

1 Answer
1

When I was trying to debug a custom script, I found it helpful to have the script append some information to a temp file every time it was run; that way I could make sure it was being called the way I expected. Things like the cmd line args, environment, and what value(s) it was going to return. You also might want to redirect stderr to a log file to catch error output from the script.

I see you made a Data Input Method and a Graph Template; did you also make a Data Template?