Skip to content

Message should be made a required field in the app #55

@chipzzz

Description

@chipzzz

Describe the bug

You can create a slack action, with leaving the Message field empty. The result is a created alert that shows it's firing to slack but does not actually send anything to slack. The error message for this is reports errors events in separate events than the mentioned alert name so it's hard to debug and correlate the error to a particular event. (tried using the id),Especially when you have many alerts.

 Invoking modular alert action=slack for search="<some_alert_name>" sid="<some_alert_sid>" in app="search" owner="user" type="saved"
FATAL sendmodalert [12322 AlertNotifierWorker-0] - action=slack STDERR -  Validation error: Parameter `message` is missing or empty

<textarea name="action.slack.param.message" id="slack_message" style="height: 140px;"></textarea>

A validation needs to be added
https://github.com/splunk/slack-alerts/blob/main/src/app/default/restmap.conf

To Reproduce
Steps to reproduce the behavior:
Create alert without Message, notice it won't be sent to Slack.

Expected behavior
Alert is sent to slack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions