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. Development
  3. How to configure action in event process policy rule with java api

How to configure action in event process policy rule with java api

Scheduled Pinned Locked Moved Development
3 Posts 2 Posters 18.3k 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
    moseszero
    wrote on last edited by
    #1

    HI,
    The work I tried to do is when some threshold  reached , an alarm should be recorded.Setting threshold is done with java api(version 1.1.6),and configuring action(simply generate an alarm) in java console is OK,too.But when I try to do add action with java api , I don't know what action id should be used here.
    I wonder if there is some introduction about the original action of netxms?For example , the id for the action of "generate an alarm".

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi!

      Alarm generation and actions are different things. For generating alarm you do not need an action - it's just special attributes in event processing policy rule. To set rule to generate alarm, do the following (assuming you already have rule object called "rule" of type EventProcessingPolicyRule):

      rule.setFlags(rule.getFlags() | EventProcessingPolicyRule.GENERATE_ALARM);
      rule.setAlarmMessage("%m");  // it's an example, you can specify your real alarm message here
      rule.setAlarmSeverity(0);   // specify your severity
      rule.setAlarmKey("");   // specify alarm key
      

      and to set rule to terminate alarm:

      rule.setFlags(rule.getFlags() | EventProcessingPolicyRule.GENERATE_ALARM);
      rule.setAlarmSeverity(Severity.UNMANAGED);   // Severity UNMANAGED indicates alarm termination rule
      rule.setAlarmKey("");   // specify alarm key
      

      Also, you can take a look at property pages in nxmc-epp plugin in management console.

      Best regards,
      Victor

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

        Thank you!

        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