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. Setting custom alarm for each condition object

Setting custom alarm for each condition object

Scheduled Pinned Locked Moved Support
11 Posts 2 Posters 38.4k 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.
  • F
    F
    Filipp Sudanov
    wrote on last edited by
    #2

    Hi!

    Actually, Condition objects are planned for removal in a future version, as there are now other options to do things.
    Can you illustrate your use case, what exactly these conditions do and where they take the data?

    1 Reply Last reply
    0
    • D
      D
      Danxy
      wrote on last edited by
      #3

      @filipp-sudanov said in Setting custom alarm for each condition object:

      Hi!

      Actually, Condition objects are planned for removal in a future version, as there are now other options to do things.
      Can you illustrate your use case, what exactly these conditions do and where they take the data?

      Thank you, good to hear, now I am not sure if I can use Netxms for my case. It is following:
      I need to monitor a number of devices exclusively with SNMP. All I need is to poll OIDs (integers) and depending on calculation using several OIDs on the same device create normal, warning and critical alarm and show on dashboard network map (I need to freely arrange icons) green, yellow and red boxes of each device and "subdevice" (I found floor plan layout is best for my purpose). I think that condition object is the only possible solution for this.

      1 Reply Last reply
      0
      • F
        F
        Filipp Sudanov
        wrote on last edited by
        #4

        Let me list what are the options:

        • On the nodes you can have script DCI that polls needed OIDs (or takes their values from another DCIs) and takes some numeric value. Then
            - on map you can use "DCI image" element, which will show specific image for specific value
            - or on that scipt DCI you can check "Use this DCI for node status calculation" (it's in properties on Other Options tab) - and value of that DCI will affect the status of the node (value should be between 0 and 4 for normal ... critical)
          You can have this DCI in a template, it will be applied automatically.

        • You can use business service functionality - it was reworked in 4.0. The idea is that business service object checks status of other things (nodes, DCIs or script) and changes it's status (and also calculates time that it was "up" or "down").
          Creation of business services can be automated - there are "business service prototypes" and auto-bind scripts that will pick up DCIs or nodes that you need.

        • Third option is to create nodes with IP address 0.0.0.0 - such node will not be polled. You can have a DCI on that node with "Use this DCI for node status calculation" enabled and status of that node will depend on value of that DCI.

        Pls update which option looks good for you and if you need any additional information on it.

        1 Reply Last reply
        0
        • D
          D
          Danxy
          wrote on last edited by
          #5

          Thank you for the suggestions, but I am not not sure about your options. The problem is that I need to poll from one node let's s say 10 OIDs and get 10 DCI values, and then I need to get value based on calculation of 3 DCI values and then show result of calculation as an image on the map in certain color. Then take another 3 DCI values, make calculation and show on map and so on.  
          Your first option shows on map image using only one DCI value, and I am not sure that other two options can do what I want. 
          I need some time to figure out business services, but it seems that is is also based on one calculation for each DCI, not group of them.

          1 Reply Last reply
          0
          • F
            F
            Filipp Sudanov
            wrote on last edited by
            #6

            I'd suggest investigating business service approach. If it does not fit for some reason we can look at the other options again.

            A business service has concept of "checks". These are visible in "Object details" as a tab. There can be one or several checks - these could be DCIs (status of the check depends whether a threshold on the DCI is triggered or not) - and there are object status checks and script checks.
            Also, business services can be nested - a business service can contain a number of child business services. Status of child business services will be propagated to the parent business service, so it could also be built that way.

            1 Reply Last reply
            0
            • D
              D
              Danxy
              wrote on last edited by
              #7

              I tried with business services, managed to get something but mostly it is not useful for my purpose. Here I don't see possibility to make script and get result based on DCI values calculation in checks. Condition object was perfect, to bad you are going to remove it.

              1 Reply Last reply
              0
              • F
                F
                Filipp Sudanov
                wrote on last edited by
                #8

                Returning a bit back - there was another approach - to have script DCIs which are pulling several OIDs and doing calculation right within the script. Code of such script DCI might look like this:

                transport = $node->createSNMPTransport();
                if (transport == null) return null;
                
                value1 = transport->getValue(".1.2.3.4.5.6.7.8");
                if (value1 == null) return null;
                
                value2 = transport->getValue(".1.2.3.4.5.6.7.8");
                if (value2 == null) return null;
                
                return value1/value2;
                

                Then on the map you can add "DCI Image" objects. In properties of these "DCI Images" you can configure what image to display depending on the value of the DCI. 

                If you go with this approach, is there anything that is missing?

                1 Reply Last reply
                0
                • D
                  D
                  Danxy
                  wrote on last edited by
                  #9

                  Thanks, It looks  promising, but I couldn't find in documentation how to connect scripts with polls. 
                  When I want to add DCI image, I have to specify DCI in Data source, I cannot select anything else. Which object (connected with my script) I have to create to be able to connect it to DCI image? Or to rephrase, I understood scripts are in Script Library, where I have to call this script to be able to connect with DCI image?

                  1 Reply Last reply
                  0
                  • F
                    F
                    Filipp Sudanov
                    wrote on last edited by
                    #10

                    There are two parts:

                    1. On a node you have a DCI with Origin="Script". The script itself is in script library, DCI has name of that script in "Parameter" (renamed to "Metric" in most recent version) field. It's also possible to pass some parameters to the script by putting:
                      script_name("parameter_1", "parameter_2")
                      or
                      script_name(123,456)

                    Script does it's job, reads some values from nodes, etc. Finally script returns some value with the help or return operator. The value returned by the script is stored as the value of the DCI - it's visible in last values, can be seen on graph, etc.

                    1. On the map, "DCI image" object has this DCI as data source. In properties of the DCI image you can configure the default image and what images should be used if DCI value goes to  some specific value.
                    1 Reply Last reply
                    0
                    • D
                      D
                      Danxy
                      wrote on last edited by
                      #11

                      Great, thank you. That works. But now I have other problems. I have had grouped equipment into containers in such way that I put let's say two conditions into container, another two conditions into second container and then put both into a new container to have status propagation and possibility to unmanage the groups. To do similar thing, I created business services and try similar using script DCI threshold check.
                      The problem is that on false result in script I've got two alarms, one on basic and another on parent business service, and I need only one. Can I somehow disable screen notification (and sound) of parent business service retaining red mark on icon?
                      The second problem is that alarm is deleted in alarm browser view unlike infrastructure services object alarms, which are kept in alarm browser.
                      There is also third problem, unmanaging the business service does not stops the alarms?!

                      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