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. Sending mail from Event Processing Policy not working

Sending mail from Event Processing Policy not working

Scheduled Pinned Locked Moved Support
16 Posts 2 Posters 28.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.
  • M
    M
    Mystery
    wrote on last edited by
    #3

    In the notification log, there are only rows from testing events.
    In the event log, there is correct event, which should send these emails as event processing policy define that.

    {
      "id": 11134,
      "rootId": 0,
      "code": 100074,
      "name": "Network_Device_not_OK",
      "timestamp": 1747638739,
      "originTimestamp": 1747638739,
      "origin": 0,
      "source": 356,
      "zone": 0,
      "dci": 1137,
      "severity": 4,
      "message": "NetXMS - OFFLINE :-( ",
      "lastAlarmKey": "",
      "lastAlarmMessage": "",
      "tags": null,
      "parameters": [
        {
          "name": "dciName",
          "value": "ICMP.PacketLoss"
        },
        {
          "name": "dciDescription",
          "value": "ICMP ping: packet loss"
        },
        {
          "name": "thresholdValue",
          "value": "99"
        },
        {
          "name": "currentValue",
          "value": "100"
        },
        {
          "name": "dciId",
          "value": "0x00000471"
        },
        {
          "name": "instance",
          "value": ""
        },
        {
          "name": "isRepeatedEvent",
          "value": "1"
        },
        {
          "name": "dciValue",
          "value": "100"
        },
        {
          "name": "operation",
          "value": "4"
        },
        {
          "name": "function",
          "value": "0"
        },
        {
          "name": "pollCount",
          "value": "5"
        },
        {
          "name": "thresholdDefinition",
          "value": "last(5) \u003e 99"
        }
      ]
    }
    
    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #4

      What about EPP rules which are before that one that should send the notification? Could there be some rule with “stop event processiong” checkbox?

      1 Reply Last reply
      0
      • M
        M
        Mystery
        wrote on last edited by
        #5

        I exported all EPPs from old verions of NetXMS and imported to new NetXMS instance. 
        Somehow, the imported ones are not working (sending emails).
        I created new EPP with same definitions and email is sent.

        See rule 60 is not working while rule 79 is working. Strange.
        I also see a new row in the notification log.
        There is no rule with "stop event processiong" checkbox.

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

          Can you share the exported .xml (or at least it's part related to this specific rule).
          Export was performed in v 2.2, right?

          1 Reply Last reply
          0
          • M
            M
            Mystery
            wrote on last edited by
            #7

            Yes, XML (from 2.2 version) of this rule ID is here:
            Do you need some more details?

            <rule id="5">
            			<guid>0cdde918-dc08-4096-9418-0197355b2833</guid>
            			<flags>7936</flags>
            			<alarmMessage>%m</alarmMessage>
            			<alarmKey></alarmKey>
            			<alarmSeverity>5</alarmSeverity>
            			<alarmTimeout>0</alarmTimeout>
            			<alarmTimeoutEvent>43</alarmTimeoutEvent>
            			<script></script>
            			<comments>Network Device is OFFLINE - Send E-mail</comments>
            			<sources>
            			</sources>
            			<events>
            				<event id="100032">
            					<name>Network_Device_not_OK</name>
            				</event>
            			</events>
            			<actions>
            				<action id="16">
            					<guid>9b8807fa-f8d4-4ad7-ac5d-61f85cd27795</guid>
            					<timerDelay>
            0</timerDelay>
            					<timerKey>
            </timerKey>
            				</action>
            			</actions>
            			<timerCancellations>
            			</timerCancellations>
            			<pStorageActions>
            			</pStorageActions>
            		</rule>
            	<event id="100032">
            			<name>Network_Device_not_OK</name>
            			<guid>06cdfff3-bce6-4bbd-8c02-0a444a29e90f</guid>
            			<code>100032</code>
            			<severity>4</severity>
            			<flags>1</flags>
            			<message>NetXMS - Cisco Router/Switch/ASA IS OFFLINE!</message>
            			<description></description>
            		</event>
            
            1 Reply Last reply
            0
            • F
              F
              Filipp Sudanov
              wrote on last edited by
              #8

              Can you also select this from the DB and show the output (IDs are less by 1 then what's visible in the UI):

              select rule_id, flags, comments from event_policy where rule_id in (59, 78);

              1 Reply Last reply
              0
              • M
                M
                Mystery
                wrote on last edited by
                #9

                MariaDB [netxms]> select rule_id, flags, comments from event_policy where rule_id in (59, 78);
                +---------+-------+-----------------------------------------+
                | rule_id | flags | comments                                |
                +---------+-------+-----------------------------------------+
                |      59 |  7936 | Network Device is OFFLINE - Send E-mail |
                |      78 |  7936 | Test new                                |
                +---------+-------+-----------------------------------------+
                2 rows in set (0,001 sec)

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

                  We've fixed a bug in import - when importing from older version of xml state of Action (active or not) was not correctly imported. The fix will be included in next release.

                  In overall it's better to upgrade just with the same database - new server will upgrade it's structure. Installing a new system and migrating config approach is used not so often, while perfectly valid.

                  1 Reply Last reply
                  0
                  • M
                    M
                    Mystery
                    wrote on last edited by
                    #11

                    Ok, thank you for info. 
                    Is there any way how to fix these bad imported EPPs? Like disable and enable etc? Or should I delete them and create again?

                    I couldn't upgrade the server, there were many errors in the upgrading process so I had to make it this way.

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

                      Yes, pls try disabling and reenabling the actions. If this does not help, we will check how to fix them with a database query.

                      1 Reply Last reply
                      0
                      • M
                        M
                        Mystery
                        wrote on last edited by
                        #13

                        I tried disabling (+save) and reenabling (+save) and EP is still not working. If you don't mind, database query would be helpfull.
                        Thank you:)

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

                          This query should list EPP rules that have actions. In the "active" column you should have 1 for active actions and 0 for inactive, but may be you'll get some other values.

                          select p.comments, a.action_id, a.active from POLICY_ACTION_LIST a INNER JOIN event_policy p ON a.rule_id = p.rule_id;
                          

                          A query to activate them all should be just this:

                          update policy_action_list set active = 1;
                          

                          Note that netxms server should be stopped before running any update queries to the DB.

                          1 Reply Last reply
                          0
                          • M
                            M
                            Mystery
                            wrote on last edited by
                            #15

                            Thank you, it helped:)

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

                              Great, thanks for the update

                              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