This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.

⚠️ We've moved!

Hi there!

To reduce project dependency on 3rd party paid services the StackStorm TSC has decided to move the Q/A from this forum to Github Discussions. This will make user experience better integrated with the native Github flow, as well as the questions closer to the community where they can provide answers.

Use 🔗 Github Discussions to ask your questions.

Rule not working with error {rule.trigger "core.st2.webhook" and trigger.ref "core.59362943-d192-4502-bc0a-9c7c8ecc69d1" do not match.}

Hi Team,

I created a rule:

    name: "pdalert_remediation_rule"
    pack: "default"
    description: "PD alert remediation rule"
    enabled: true

        type: "core.st2.webhook"
            url: "sample"

            pattern: "incident.trigger"
            type: "equals"

        ref: "default.pdalert_remediation"
            hostname: "{{trigger.body.messages[0].log_entries[0]}}"
            event_id: "{{trigger.body.messages[0].log_entries[0]}}"
            email_id: "[email protected]"

While executing the rule trigger is getting processed but no execution ID is getting created.

While looking into it further and testing the rule i see.

[05:28:36] [email protected]:/opt/stackstorm/packs/default/rules# st2-rule-tester --trigger-instance-id=60e6467244c92e3371291b06 --rule=pdalert_remediation_rule.yaml --debug
2021-07-08 05:28:44,218 INFO [-] Connecting to database "st2" @ "" as user "stackstorm".
2021-07-08 05:28:44,279 INFO [-] Successfully connected to database "st2" @ "" as user "stackstorm".
2021-07-08 05:28:44,279 DEBUG [-] Ensuring database indexes...
2021-07-08 05:28:45,333 DEBUG [-] Skipping index cleanup for blacklisted model "PermissionGrantDB"...
2021-07-08 05:28:45,721 DEBUG [-] Indexes are ensured for models: ActionAliasDB, ActionAliasDB, ActionDB, ActionExecutionDB, ActionExecutionDB, ActionExecutionOutputDB, ActionExecutionSchedulingQueueItemDB, ActionExecutionStateDB, ActionExecutionStateDB, ApiKeyDB, ConfigDB, ConfigSchemaDB, GroupToRoleMappingDB, KeyValuePairDB, LiveActionDB, LiveActionDB, PackDB, PermissionGrantDB, PolicyDB, PolicyTypeDB, RoleDB, RuleDB, RuleEnforcementDB, RunnerTypeDB, RunnerTypeDB, SensorTypeDB, TaskExecutionDB, TokenDB, TraceDB, TriggerDB, TriggerInstanceDB, TriggerTypeDB, UserDB, UserRoleAssignmentDB, WorkflowExecutionDB
2021-07-08 05:28:45,804 INFO [-] rule.trigger "core.st2.webhook" and trigger.ref "core.59362943-d192-4502-bc0a-9c7c8ecc69d1" do not match.
2021-07-08 05:28:45,821 INFO [-] === RULE DOES NOT MATCH ===

Can someone look into it? I so want to move forward from the below error.

2021-07-08 05:28:45,804 INFO [-] rule.trigger "core.st2.webhook" and trigger.ref "core.59362943-d192-4502-bc0a-9c7c8ecc69d1" do not match.


Impossible to tell why it is not matching without the original trigger data that is being received by ST2 in the webhook, but it appears that the criteria you have set in the rule in not matching what is being received.

            pattern: "incident.trigger"
            type: "equals"

You should be able to test this by sending in some mock data to your “sample” URL to see if you can get it to match.
If you can post the trigger data or the original HTML body data sent to the webhook that may help identify the matching failure.