Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Switch Version Check - String transformation

Switch Version Check - String transformation

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 23.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    A
    anw
    wrote on last edited by
    #1

    Hi
    i want to monitor my Switch OS Versions.
    Could you help me transform the Value i get after doing snmp check
    the value i get is:
    Juniper Networks, Inc. ex2200-c-12t-2g Ethernet Switch, kernel JUNOS 12.3R11.2, Build date: 2015-09-24 11:55:10 UTC Copyright (c) 1996-2015 Juniper Networks, Inc.

    how can i transform this to only check the "JUNOS 12.3R11.2" part  , and setup notifications if its not version XXX

    thanks

    1 Reply Last reply
    0
    • T
      T
      tomaskir
      wrote on last edited by
      #2

      You can use a transformation script like this:

      foundMatch = $1 ~= "Juniper Networks, Inc\. .* kernel (.*), Build date: .*";
      
      return foundMatch ? $1 : "Unknown";
      

      Then set threshold on the DCI to "Operation" "!= : not equal to" and the version you want to have on your devices into "Value".

      This will generate SYS_THRESHOLD_REACHED events (by default, feel free to generate different event if you want) when the version is invalid.
      Handle the event in EPP as you wish to generate Alarms / notifications (by default it will already create an Alarm in NetXMS).

      1 Reply Last reply
      0
      • A
        A
        anw
        wrote on last edited by
        #3

        awesome thank you

        i created a new event, and setup EPP notification to send me an email.

        how can forward the actual Kernel Version to the notification?
        so i get an email like: "JUNOS is out of date, running Version XXX"

        thanks!

        1 Reply Last reply
        0
        • T
          T
          tomaskir
          wrote on last edited by
          #4

          Here is general info on how to setup emails (I guess you already have that working tho):
          https://wiki.netxms.org/wiki/How_to_send_e-mail_notification_when_disk_space_is_low

          In the "Send E-Mail" action, you have access to all parameters of the event.
          See this link for how they are formatted:
          https://wiki.netxms.org/wiki/UM:Event_Processing#Macros_for_Event_Processing

          Threshold violation events are all modeled by the "SYS_THRESHOLD_REACHED" event.
          Which means that %4 is the current value of the DCI.
          For list of all parameters and what numbers they are see the "SYS_THRESHOLD_REACHED" event template (Configuration > Event configuration).

          1 Reply Last reply
          0
          • A
            A
            anw
            wrote on last edited by
            #5

            ok got it working

            thank you very much

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better đŸ’—

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            Powered by NodeBB Contributors
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups