Forum Discussion

netcruiser's avatar
5 years ago

How to add interface description to the name

Hi everyone, I'm new here and we have installed Logmonitor and get alerts as following:

Active Alert NotificationAPP  10:00 AM
Host - DEN-LEAF04
Datasource - Interfaces (64 bit)-Ethernet9
Datapoint - StatusFlap

I wonder is there a way to add the Interface description to Ethernet9?

Thank you, Keith

 

2 Replies

  • Anonymous's avatar
    Anonymous

    Hey @netcruiser, welcome to the communities.

    Level setting a bit: that datasource is configured to pull the value from 1.3.6.1.2.1.2.2.1.2 and use it as the "name" of the interface (aka in LM as the WildAlias).  It pulls the value from 1.3.6.1.2.1.31.1.1.1.18 and uses it as the "description" of the interface. The object in LM is called an "instance". 

    The answer to your question depends on how you want it listed:

    If you want the name of the instance swapped with the description of the instance, you would simply switch these two OIDs in the datasource configuration. The better way to do this is to clone the OOTB datasource and make your change on the clone. It's recommended to do this so that updates that are made from the LM monitoring engineering team don't clobber your changes if/when you pull down updates. This does however, require you to disable the OOTB DS by adding " && false()" to the AppliesTo on that DS.

    If you want the current name concatenated with the current description and that whole thing used as the name of the instance, you'd have to rewrite the datasource as a scripted datasource (because concatenating two OID values to use as the name isn't supported with a simple SNMP datasource like the current datasource). This has been done by several people, myself included and doesn't take too much effort to do right if you know what you're doing. Reply here if this is the route you want to take (it's the most difficult).

    It seems unlikely that this is what you want, but: if you simply want to change how the thing shows up in the alert message, this is an easier change. Once again, it is recommended to clone the OOTB DS, disable it, and on the new clone, make your changes. You'd scroll down to the StatusFlap datapoint and click the gear. Scroll down to the very bottom to the "Description" field. This is where you modify the message that goes into the alarm (and hence the email message). 

    Currently it's set to:

    Network interface ##INSTANCE## ##DSIDESCRIPTION## on ##HOST## is up, but has flapped multiple times (up => down => up => down => up). 
    
    Flapping is commonly caused by bad cables and/or duplex mismatch.
    
    This started at ##START##, -- or ##DURATION## ago.

    You'd want to reference this page for tokens that can be inserted into the message: https://www.logicmonitor.com/support/logicmodules/about-logicmodules/tokens-available-in-datasource-alert-messages. You'll notice that ##DSIDESCRIPTION##, which is the DS Instance Description, is already in the alarm message, but you can rearrange it any way that you want.

  • Thank you very much Stuart! 

    Will discuss with team and decide what to do.