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. Polls needed for deactivation event 'rearm-event' in THRESHOLD configuration

Polls needed for deactivation event 'rearm-event' in THRESHOLD configuration

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 9.8k 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.
  • M
    M
    MarkusO
    wrote on last edited by
    #1

    I know how to configure the number of polls needed for an activation event in THRESHOLD configuration. This is the 'samples' field.

    Can this also be done for the number of polls needed for a deactivation event in THRESHOLD configuration.

    At the moment when i have a look at the logging values of  a DCI with a threshold set i can see that a deactivation event already occurs after 1 poll with a value below the set threshold.
    I would like to set the number of polls needed for a deactivation event  (rearm-event) to for example 5.

    Anyone any suggestions?
    Thanks in advance.

    1 Reply Last reply
    0
    • Z
      Z
      Tatjana Dubrovica
      wrote on last edited by
      #2

      For now there is no easy solution for it. I have created bug about it: https://dev.raden.solutions/issues/1253

      One of non trivial solutions can be:
      Create script DCI that will return 1 if threshold should be generated and 0 if deactivation event should be generated. And count everything by yourselves(it should be working but "dirty" solution).

      Something like this(have not tested this):
      value = GetDCIValue($node, FindDCIByName($node, "Agent log status"));
      if(value != null)
      {
          attr = GetCustomAttribute($node, "NormalStateSampleCount");
          count = 5;
          if(attr != null)
          {
              count = int32(attr);
          }
          if(int32(value) > 5) //Activation event should be generated
          {
              SetCustomAttribute($node, "NormalStateSampleCount", "0");
              return 1;
          }
          
          if(int32(value) < 5)
          {
              count++;
              SetCustomAttribute($node, "NormalStateSampleCount", "0");
              if(count == 5) //Deactivation event should be generated
              {
                  return 0;
              }
              return 1;
          }
      }

      SetCustomAttribute($node, "NormalStateSampleCount", "0");
      return 1;

      1 Reply Last reply
      0
      • M
        M
        MarkusO
        wrote on last edited by
        #3

        Thank you for your help.

        Kindest regards.

        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