Skip to content

Add regex in the alert config rules  #305

@nitisht

Description

@nitisht

We can add a new operator called regex that allows regex patterns in the value field. If the pattern matches, Parseable can send alerts to the relevant target. Sample alert config below:

{
    "alerts": [
        {
            "name": "Status Alert",
            "message": "server side error occurred",
            "rule": {
                "type": "column",
                "config": {
                    "column": "message",
                    "operator": "regex",
                    "repeats": 2,
                    "value": "^foo"
                }
            },
            "targets": [
                {
                    "type": "webhook",
                    "config": {
                        "url": "https://webhook.site/6b184e08-82c4-46dc-b344-5b85414c2a71"
                    },
                    "repeat": "30s"
                }
            ]
        }
    ]
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions