Configuring Net-SNMP

Unanswered Question
Jan 14th, 2008

Is there any to configure Net-SNMP to print the IP of the device in each returned line of a query?

For example, the following is the current default return when I query the ifAlias of a switch:

IF-MIB::ifAlias.12013 = STRING: 228A

IF-MIB::ifAlias.12014 = STRING: 228B

IF-MIB::ifAlias.12015 = STRING: 035B

IF-MIB::ifAlias.12016 = STRING: 053A

IF-MIB::ifAlias.12017 = STRING: 029A

IF-MIB::ifAlias.12018 = STRING: 125A

IF-MIB::ifAlias.12019 = STRING: 051A

IF-MIB::ifAlias.12020 = STRING: 203A

IF-MIB::ifAlias.12021 = STRING: 253B

IF-MIB::ifAlias.12022 = STRING: 212A

IF-MIB::ifAlias.12023 = STRING: 170B

IF-MIB::ifAlias.12024 = STRING: 253A

IF-MIB::ifAlias.12025 = STRING: 187A

IF-MIB::ifAlias.12026 = STRING: 064A

IF-MIB::ifAlias.12027 = STRING: 066A

IF-MIB::ifAlias.12028 = STRING: 252A

IF-MIB::ifAlias.12029 = STRING: 187B

IF-MIB::ifAlias.12030 = STRING: 191A

However, I was wondering if the output of this query can be configured to include the management IP address of the switch in each and every line of the above output.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3.5 (2 ratings)
Loading.
Joe Clarke Mon, 01/14/2008 - 10:12

There isn't an output option for net-snmp that will do this. You will need to buffer the output in a script or program then print out the lines with the added content.

yuchenglai Mon, 01/14/2008 - 10:15

That is what I thought. I have figured out within DOS out to buffer the output to a notepad text file. Now the next step will be to figure out how to write a script to add the content.

Actions

This Discussion