I've got an application which keeps an error counter in a table in MySQL. I want to be able to put this information into Cacti for long term graphing, so I'm learning about SNMP now.

I want to write a script in PHP (called by a bash script if need be), which an SNMP daemon can use to check the error count from the database table and return the value.

I tried putting "exec . test /bin/bin errorCountScript" in my snmpd.conf file but when I'm using Paessler SNMP Tester to check to see if it's going to work, it keeps telling me that my OID doesn't exist, however it is connecting.

Exact error is: "Value: No such object (SNMP error # 222)"

Can ideas as to how I can get the snmp to run my script and find how to find the OID I should be using would be great.


Don't bother with SNMP. Over complicating it. Cacti supports running scripts as one of it's data sources. The link which explain this is here: http://www.cacti.net/downloads/docs/html/how_to.html

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.