Email Parser Configuration Object

Defines the schema for the configuration of email parser settings.

Parameters

The Parser Configuration object schema includes the following attributes:

ParameterDescriptionType
email_formatThe format of the email content.

Options are:
Plain Text or HTML
String
allow_listAn array of allowed sender emails.

Use a wildcard to allow for a range of email addresses.

If no address is provided, the parser will accept emails from any source and may lead to false alarms or issues.
Array
statusLookup rule to set the alert status.

Attributes:
default_to - the value to populate if no matches are found. Critical is default setting.
source - is the value in the body or subject?
status_map - defines values that map to assigned statuses, in exact string or regex. Values will be matched in order, stopping at the first match:
-critical
-warning
-ok
-acknowledged
Object
primary_propertyMapping rule for the primary property.

Attributes:
name - title of property. Default is alert_title
source - is the value in the body or subject? Default is subject
extraction - regex rule to extract value
default_to - value if nothing is extracted
Object
secondary_propertyMapping rule for the secondary property.

Attributes:
name - title of property
source - is the value in the body or subject
extraction - regex rule to extract value
default_to - value if nothing is extracted
Object
additional_attributesArray of payload field objects to set mapping rules for additional tags. Each object must be defined:

Custom Tag Attributes:
name - title of property
source - is the value in the body or subject?
extraction - regex rule to extract value
default_to - value if nothing is extracted
Object

📘

Regex Supported

A regular expression (regex) can be used to extract status strings.011

Sample Object:

{
    "config":
    {
      "email_format": "plain_text",
      "allow_list": [
        "string"
      ],
      "status": {
        "default_to": "warning",
        "source": "subject",
        "status_map": {
          "critical": [
            "major",
            "very bad"
          ],
          "warning": [
            "warning"
          ],
          "ok": [
            "ok",
            "clear"
          ],
          "acknowledged": [
            "ack"
          ]
        }
      },
      "primary_property": {
        "name": "host",
        "source": "body",
        "extraction": "host is (.*)",
        "default_to": "general issue"
      },
      "secondary_property": {
        "name": "region",
        "source": "body",
        "extraction": "region (.*)",
        "default_to": "us-west-1"
      },
      "additional_attributes": [
      {
        "name": "region",
        "source": "body",
        "extraction": "region: (.*)",
        "default_to": "us-west-2"
      }
    ]
  }
},
"sample_payload": {
        "alerts": [
          {
            "generatorURL": "https://some-url.io",
            "fingerprint": "123456789",
            "annotations": {
              "description": "This alert is used to check the CPU utilization of this non-existent server",
              "runbook_url": "https://runbook.io/cpu-check"
            },
            "startsAt": "2022-07-05T19:59:25.661Z",
            "endsAt": "0001-01-01T00:00:00Z",
            "status": "firing",
            "labels": {
              "severity": "page",
              "instance": "bigpanda-server",
              "alertname": "BigPanda Test",
              "team": "metrics",
              "env": "test",
              "job": "CPU Check",
              "locale": "ca",
              "timestamp": "1.657051103137505e+09"
            }
          }
        ],
        "commonLabels": {
          "instance": "bigpanda-server",
          "alertname": "BigPanda Test",
          "team": "metrics",
          "env": "test",
          "job": "CPU Check",
          "locale": "ca",
          "timestamp": "1.657051103137505e+09"
        },
        "externalURL": "https://external-url.io",
        "groupLabels": {
          "instance": "bigpanda-server",
          "alertname": "BigPanda Test",
          "team": "metrics",
          "env": "test",
          "job": "CPU Check",
          "locale": "ca",
          "timestamp": "1.657051103137505e+09"
        },
        "receiver": "bigpanda",
        "version": "4",
        "commonAnnotations": {
          "description": "This alert is used to check the CPU utilization of this non-existent server",
          "runbook_url": "https://runbook.io/cpu-check"
        },
        "status": "firing"
      }
    }