DX NetOps

 View Only

  • 1.  For interface alarms, I only need the device name-not the model name (bad link).

    Posted 25 days ago

    Hi, team

    Alarms originating from interfaces are standardized to include both the device name and the interface name; however, the ServiceNow integration requires that the "node" field contain only the device name, while the message itself displays the combined device and interface identification. This enables proactive identification of the faulty device within ServiceNow, while allowing us to pinpoint the specific interface in the description.

    In the attached image, I have highlighted the relevant fields in yellow; the "node" field should contain only the equipment name for interface alarms, and the "message" field should show the standardized device-plus-interface designation.



  • 2.  RE: For interface alarms, I only need the device name-not the model name (bad link).

    Posted 24 days ago

    I would say you'd need to customize the integration and not use the default one.  Customizing allows you to use SANM and AlarmNotifier to filter/create custom actions for specific needs. I think with the default integration the sent object will always be ModelName. That is the attribute that is sent over to SNOW. 

    I would create a custom AlarmNotifier instance and for each bad link link alarms could use the Device_Mdl_Handle(0x10069) to identify relevant device name and use it in the call to open/close/update the tickets on the SNOW part.

    I tried customizing once the NIM but I was not successful and information was scarce. In the end I came with this workaround. 



    ------------------------------
    Cătălin Fărcășanu
    Senior Consultant
    SolvIT Networks
    ------------------------------



  • 3.  RE: For interface alarms, I only need the device name-not the model name (bad link).

    Posted 24 days ago
    Good morning, Catalin.

    Thanks for your reply; I'm going to run some tests with the notifier and add that attribute to the SetScript. However, regarding the device ID handle-how did you retrieve the device name using that handle? Or did you only manage to use the `Device_Mdl_Handle` ID? I ask because I need the name so it can be identified in SNOW. Many thanks.



  • 4.  RE: For interface alarms, I only need the device name-not the model name (bad link).

    Posted 23 days ago

    You can issue and additional API call and get the model name, once you have the device model handle. 



    ------------------------------
    Cătălin Fărcășanu
    Senior Consultant
    SolvIT Networks
    ------------------------------



  • 5.  RE: For interface alarms, I only need the device name-not the model name (bad link).

    Posted 23 days ago

    Hi

    Our integration to SNOW is a custom integration using SANM/AlarmNotifier and we had the same issue as you describe for BAD LINK alarms. We solved very easily in the set and clear scripts by stripping everything from the last _ in the model name for BAD LINK alarms. 

     if [ $CAUSE = "1040a" ]
       then
         TEMPMNAME=${MNAME%_*}
         MNAME=$TEMPMNAME
    fi

    We use MNAME as the CI name in the Rest call to SNOW.

    I'm sure this or something similar should work for you.

    Regards, John




  • 6.  RE: For interface alarms, I only need the device name-not the model name (bad link).

    Posted 22 days ago
    Good afternoon,
     
    Thank you for your contribution; the information is very valuable. I will implement it and then recommend it to the user, if I see it as the only way to carry out this process.
     
    I'll keep you updated, and thank you very much.



  • 7.  RE: For interface alarms, I only need the device name-not the model name (bad link).

    Broadcom Employee
    Posted 22 days ago

    You are welcome to make use of the following script, or just extract out the useful bits.  I had written it some time ago to send alarms into ServiceNow Event Manager before that became part of the GA product.  The script looks to see if the alarm is occurring on a device and if not, gets the device model handle:

    # Check if we're alarming on a device.  If not, get the device model handle.
    if [ "$MHANDLE" = "$SANM_0X10069" ] || [ "$DTYPE" = "N/A" ] || [ "$SANM_0X10069" = "0x0" ] || [ "$SANM_0X10069" = "N/A" ] || [ "$SANM_0X10069" = " N/A" ]
      then
        DEVICENAME="$MNAME"
      else
        DEVICENAME=`$CURL -sL -H 'content-type: application/xml' -H "Authorization: Basic $SPEC_ENC" -X GET $OCURL1"/model/"$SANM_0X10069"/?attr=0x1006e" | xmllint --format - | grep attribute | cut -d '>' -f2 | cut -d '<' -f1`    
    fi   

    It then gets the model class.  Originally, I retrieved the list of model classes on every execution but then realized that's a bit of a waste so I just reference a cached version.  You would just update the file after upgrades, etc.

    # Get model class
    #MODELCLASS=`$CURL -sL --header 'content-type: application/xml' --header 'Authorization: Basic $SPEC_ENC' -X GET $OCURL1"/attribute/0x11ee8/enums"  | xmllint --format - | grep id=\"$SANM_0x11ee8\" | cut -d "\"" -f2`
    MCLASSHEX=`printf '%x' $SANM_0X11EE8`
    MODELCLASS=`grep $MCLASSHEX ./modelClassEnums.txt | cut -b 1-32 | awk '{$1=$1};1' | head -n 1`

    Then the JSON payload gets constructed and sent up to SNOW.  Hopefully, you find it useful.

    -Rob


       


    Attachment(s)

    txt
    modelClassEnums.txt   3 KB 1 version
    txt
    SNOWEventSetScript.txt   9 KB 1 version
    txt
    snow-event.alarmrc.txt   886 B 1 version


  • 8.  RE: For interface alarms, I only need the device name-not the model name (bad link).

    Posted 22 days ago
    Good afternoon,
     
    Thank you so much for taking the time to share your valuable information. I'm going to try it and will let you know how it goes. Thanks for the detailed information.
     
    Regards.