0

I have custom applications for that I want to graphs the stats. Here is my requirement. I wrote a bash script which give me a numeric value and I am running that script from cron. Now I want that numeric data should be graphed via cacti using SNMP. I know its possible but not sure how?

Zypher
  • 37,405
  • 5
  • 53
  • 95
Ramesh Kumar
  • 1,770
  • 5
  • 19
  • 29

3 Answers3

1

You don't need to involve SNMP. Create a Data Input Method and use "Script/Command" as the Input Type, specifying the path your script.

Here's the relevant documentation page.

jmb
  • 111
  • 3
0

You might like to look at gnuplot.

mdpc
  • 11,856
  • 28
  • 53
  • 67
0

Have your cron call rrdtool directly and make an RRD. It won't show in Cacti but it will make a graph. If you want it in Cacti, you would want to add some script to snmpd.conf that calls the script so Cacti can poll it.

sinping
  • 2,070
  • 14
  • 13
  • I got it working, actually you have to run your script via snmp and it should be done via /etc/snmp/snmpd.conf file. In this file you need to run your script and associate the result to an OID. Below is the entry in /etc/snmp/snmpd.conf sh sh .1.3.6.1.4.1.26145.2.1 UsedPorts /usr/local/scripts/get_used_ports.sh in some of the snmp client its syntax start from exec command rest is same. – Ramesh Kumar Nov 12 '10 at 17:12