i haven't found anywhere examples on how to do the following.
i have a net-snmpd server proxying snmp requests to a switch that is behind the firewall (eg, the cacti can't get to it directy). i can query the snmpd index (<oid_index>) at .1.3.6.1.4.1.9999.26.1.1 which redirects the request to the switch at index .1.3.6.1.2.1.2.2.1.1
this all works perfectly, however when i want to add another switch (say at .1.3.6.1.4.1.9999.27.1.1 i'll have to duplicate my xml file to a different name and add a new data_query.
my question is, is there a way to write the data_query xml file so that the cacti interface asks me for the integer after 27. or, "ask the user for an int, now query the index at .1.3.6.1.4.1.9999.XXXX.1.1" ?
pat
snmp_query dynamic resource
Moderators: Developers, Moderators
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Not 100% sure, but my gut says no.
I will ask the developer more familar with this code to comment.
I will ask the developer more familar with this code to comment.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
I do not believe this is possible using a standard SNMP query. What you are talking about is one level of abstraction above what Cacti provides. You could probably make this work by being really creative with the index to include the switch number, but then Cacti would have problems identifying the switches from one another.
Probably your best bet is to write a script query that does all of the dirty work. It could possibly contain a lookup table which takes in the hostname from Cacti and queries the appropriate OID based on the table. The script query option usually requires more work, but it should do the trick.
-Ian
Probably your best bet is to write a script query that does all of the dirty work. It could possibly contain a lookup table which takes in the hostname from Cacti and queries the appropriate OID based on the table. The script query option usually requires more work, but it should do the trick.
-Ian
Who is online
Users browsing this forum: No registered users and 2 guests