New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


[ifalias] different from older scheme, creates new sensor

Votes:

0

Your Vote:

Up

Down

I have had PRTG installed for a number of years and have been upgrading with each new version. All of the switchports that were created a while back look like this "(006) Fa0/6 Fa0/6" or if they have a custom description "(007) Fa0/7 Server123". In the SNMP compatibility options, I have the Port name template set as ([port]) [ifname] [ifalias].

Now, when I run an auto-discovery, it will try to create new entries for all of the ports without a custom description, like "(006) Fa0/6 FastEthernet0/6". It doesn't recognize the port "(006) Fa0/6 Fa0/6" as being the same one, even with Port Name Update set to "Automatic sensor name update".

Any ideas of what i can change so that it doesn't try to create new sensors for all of the existing sensors when I run auto-discover?

auto-discover ifalias port-name

Created on Jul 16, 2012 7:10:08 PM by  Sara Edwards (0) 1



3 Replies

Votes:

0

Your Vote:

Up

Down

Hello,

please check the "Interface Number"-Field in the settings of an old and a new (duplicate) sensor for the same interface. Do they show something different?

best regards.

Created on Jul 17, 2012 11:25:07 AM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

This example is from a different switch, but old (original) port discovery has "10101" for the interface number and the newly discovered port has "10101:_".

Created on Jul 17, 2012 12:01:12 PM by  Sara Edwards (0) 1



Votes:

0

Your Vote:

Up

Down

Hello,

if you look at the "Settings" of one "old" and one "new (duplicate)" sensor for the same interface you will likely note a slight difference in the "Interface Number" field, which is a :_
The _ is part of a fix introduced with version 9.1.6, to be able to differ in cases where the ifAlias was empty (like in this case) against when there was no ifAlias defined at all for an interface. For interfaces with empty ifAlias PRTG now internally uses the _ to mark this. This was implemented to be able to detect interface name changes from "empty" to "something" in the ifAlias.

The problem now here is, that this can't be changed in another way I'm afraid. It would also have occurred with the older version of PRTG as it was not able to handle an empty ifAlias correctly. However, to go forward with this, the only way also for future discoveries to avoid duplicate sensors again, would sadly be to using/keeping the new sensors, which have the _, and then to delete the old sensors.

The other "possible solution" would be:

use a gawk-script to replace the IDs http://gnuwin32.sourceforge.net/packages/gawk.htm

gawk -f PRTGFix.awk "PRTG Configuration.dat" > "PRTG Configuration_Fixed.dat"

Contents of PRTGFix.awk
=====================================

BEGIN {  

# print "Start program" > log.txt
# Discoveryfound =0: Not found
# Discoveryfound =1: Found, not yet fixed
# Discoveryfound =2: Found and fixed
discoveryfound=0
interfacefound=0 } {
if ( discoveryfound >= 1 ) {  
            if (discoveryfound == 1 ) { 
                        if ($0 ~ /snmptraffic[0-9]+/ && $0 !~ /:/ ) { 
                                  print $0":_"
                            discoveryfound = 2
                                  interfacefound = 0
                                  }
                        else { print $0 }
                        }
            else {
                        if (interfacefound == 1 ) { 
                                  print $0":_"
                                  discoveryfound = 0
                                  interfacefound = 0
                                  }
                        else { print $0 }
            }
            if ($0 ~ /<interfacenumber>/ ) { interfacefound = 1 }
            }
  else { print $0 }
if ($0 ~ /<discoveryid>/ ) { 
            discoveryfound=1
            }
}

=====================================

Beware that his will fix _all_ SNMP traffic sensors (Switch/Router/Servers etc), so the SNMP traffic sensors on Servers (which don't have the IfAlias property) will error (SNMP Error no such name), removing the :_ will return these to a working state.

Created on Jul 17, 2012 2:11:57 PM by  Torsten Lindner [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.