Adding additional poller jobs?

Discussions on developing plugins for the Cacti Plugin Architecture

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
Howie
Cacti Guru User
Posts: 5333
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Adding additional poller jobs?

#1 Post by Howie » Fri Feb 25, 2011 8:08 am

Is it possible to add new items to poller_items so that the Cacti poller will collect additional SNMP data for me?

In both uptime and weathermap, it'd probably be better if I let (for example) Spine do the data collection instead of me trying to duplicate writing something that efficiently collects SNMP data.
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Adding additional poller jobs?

#2 Post by gandalf » Fri Feb 25, 2011 4:33 pm

Not yet. Were do you suppose that this data should be stored, then? In an rrd file? You will need the whole "environment", then, not only the poller_item
R.

User avatar
Howie
Cacti Guru User
Posts: 5333
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Adding additional poller jobs?

#3 Post by Howie » Fri Feb 25, 2011 5:51 pm

gandalf wrote:Not yet. Were do you suppose that this data should be stored, then? In an rrd file? You will need the whole "environment", then, not only the poller_item
R.
That's what I thought. I've never really looked too closely at the data flow in the poller. It could just collect in in a poller_output hook and then let it be dropped on the floor, I suppose?

I was writing something to use Cacti SNMP functions to collect version info last week, and it got me wondering if I could make use of the already-existing and already-optimised poller to fetch other data (like uptime, or other SNMP things that plugins might use but not be graphed by Cacti). The other use-case was for script-queries where SNMP data is parsed and processed to make data for Cacti - like VPN stats or BGP stats on some Cisco devices. If the poller collected the values, it would probably be more efficient than the naive script duplicating effort.
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Adding additional poller jobs?

#4 Post by gandalf » Thu Mar 03, 2011 3:06 pm

For sure you may use the poller to fetch data. But you still have to deal "with the rest" to make it at least NOP (no operation). I honestly do not know whether this is possible at all. But it may be worth the investigation.
Plugin DSSTATS makes use of poller_output data so this may serve as an example how to fetch data from there to use it in any plugin. But I fear that this way of "design" can't be stressed very far. So perhaps we need a "real design" to add this capability to cacti through a set of function calls (well, Tony doesn't like api_<functions> so I won't mention them here :wink: ).
R.

Post Reply