How can I query a range of SNMP OIDs in one data query. These aren't indexed but would like to be able to read all the values at once without having to create multiple data templates. I dont have any .pl etc ... experience so not sure where to start.
say for example is there a way to read them from something like this.
<oid-1>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.15.2</oid>
</oid-1>
<oid-2>
<name>Number</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.17.0</oid>
</oid-2>
If I do need a script could someone donate along with a kick in the right direction.
Cheers
Writing SNMP Queries
Moderators: Developers, Moderators
That's cumbersome, but it seems to me that there is no other way to do this. Using some sort of SNMP query just does not work (because there is no index needed at all).
I'm just doing this "multiple data sources definition work" right now for UDP, TCP, ICMP and SNMP-related counters from the UDP-MIB, TCP-MIB and IP-MIB. Over 20 data source templates just to change the OID and the name... That's cumbersome indeed.
It would be nice in fact to have a "Get Multiple SNMP Data" data input method... with one OID per data source item. Maybe that would be a reasonable request, dunno.
PS: Of course, the ideal solution would be to integrate a MIB browser in the Cacti and select counters by name...
I'm just doing this "multiple data sources definition work" right now for UDP, TCP, ICMP and SNMP-related counters from the UDP-MIB, TCP-MIB and IP-MIB. Over 20 data source templates just to change the OID and the name... That's cumbersome indeed.
It would be nice in fact to have a "Get Multiple SNMP Data" data input method... with one OID per data source item. Maybe that would be a reasonable request, dunno.
PS: Of course, the ideal solution would be to integrate a MIB browser in the Cacti and select counters by name...
Re:
I have same problem. I need one data source with 2 or more OIDs and one graph (without aggregate plugin).golemb wrote:Yea, I was looking the exact same thing.
Without this "feature", I must create a lot of datasources with one OID
Let the Cacti grow!
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Writing SNMP Queries
resources/*/*.xml is used for Data Query (== indexed data) only. Full stop.
For multiple data fetched "in one go", a script is the only solution. You may either perform an snmpget or a walk within that to fetch whatever you want and process that data if need be. Then, you may define a data template that defines multiple data source items.
Be warned: That's no a very flexible solution! E.g. in case you later need a single additional data source item, you will have to throw away all your rrd files related to that data query. RRDTool does not allow to add a new data source item to an existing rrd file!
So the recommended solution indeed is to better use a data template with a single data source item for that very approach. Of course, you may use the script stuff as described above.
Find more hints and walkthroughs at the 1st link of my sig
R.
For multiple data fetched "in one go", a script is the only solution. You may either perform an snmpget or a walk within that to fetch whatever you want and process that data if need be. Then, you may define a data template that defines multiple data source items.
Be warned: That's no a very flexible solution! E.g. in case you later need a single additional data source item, you will have to throw away all your rrd files related to that data query. RRDTool does not allow to add a new data source item to an existing rrd file!
So the recommended solution indeed is to better use a data template with a single data source item for that very approach. Of course, you may use the script stuff as described above.
Find more hints and walkthroughs at the 1st link of my sig
R.
Who is online
Users browsing this forum: No registered users and 2 guests