Creating an Alias based on ifIndex Value

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
sa10
Posts: 15
Joined: Wed Mar 27, 2002 9:17 am
Location: Rock Hill, SC
Contact:

Creating an Alias based on ifIndex Value

Post by sa10 »

I have created a graph, with the Title of

|host_description| - |query_ifIndex|

query_ifIndex gives 93923833
(this doesnt mean anything to most people looking at it)

Is there a way to match that 93923833 value to another value [say: Interface E 6)

Thanks,
John
melchandra
Cacti User
Posts: 311
Joined: Tue Jun 29, 2004 12:52 pm
Location: Indiana

Post by melchandra »

try |query_ifAlias| or |query_ifName|
Dave
sa10
Posts: 15
Joined: Wed Mar 27, 2002 9:17 am
Location: Rock Hill, SC
Contact:

Post by sa10 »

Dave,

I have tried those, and neither give me the data In the format I need. And unfortunately, on the specific CMTS Router in question I cannot name individual interfaces, so that rules out the ifAlias.

John
melchandra
Cacti User
Posts: 311
Joined: Tue Jun 29, 2004 12:52 pm
Location: Indiana

Post by melchandra »

If you look where you created the graphs (under devices->select device and click "Create Graphs for this host") you will find the interface data query section. Across the top are all the fields that are queried, they are Index, Status, Description, Name, Alias, Type, Speed, Hardware Address, and IP address. You can access any of these using the |query_<field-name>| syntax. You can look at the XML file located in <cacti>/resource/snmp_queries/interface.xml for this information.

They are:

ifIndex
ifOperStatus
ifDescr
ifName
ifAlias
ifType
ifSpeed
ifHwAddr

So.... that is to say when you are creating the graphs, you can look at all the data in the query, if there is some field that you want to show up on the graph title, than use the |query_<name>| syntax to include it. If there is no usable data there than you will probably have to fill in the information manually for each graph title.
Dave
sa10
Posts: 15
Joined: Wed Mar 27, 2002 9:17 am
Location: Rock Hill, SC
Contact:

Post by sa10 »

Thats what Im trying to avoid doing :) as there are no suitable snmp polled values.
I was hoping that there was someway to match based on a query and present a different value.

Thanks
melchandra
Cacti User
Posts: 311
Joined: Tue Jun 29, 2004 12:52 pm
Location: Indiana

Post by melchandra »

You could always create your own query based on the interfaces.xml query. I would read the topics in the documentation advanced topics Data Queries for information on how to create your own queries. What kind of router / software are you running (you mentioned CMTS but I'm sure what that is).

If the router does not contain the information anywhere, than the only other way I can think of the "query" the information is to create a script query that can look at the information the router does provide and determine (via lookup in a database or something...) the appropriate name to provide to cacti.
Dave
sa10
Posts: 15
Joined: Wed Mar 27, 2002 9:17 am
Location: Rock Hill, SC
Contact:

Post by sa10 »

Thanks Dave, Ill start reading.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests