Alerta Publisher

New in version 0.9.0.

Publish napalm-logs events to an Alerta endpoint.

Note

The address must have contain the http:// or https:// schema. The address can however be specified more explicitly under the publisher configuration options, using the address field.

Also, note that you need to provide the URL to the Alerta API, typically ending in /api, but that may differ depending on your installation.

Alerta Screenshot

Configuration examples:

  • From the command line
$ napalm-logs --publisher alerta --address https://alerta.example.com/api
  • Basic YAML configuration
publisher: alerta
  • YAML configuration with more options
publisher:
  - alerta:
      address: https://alerta.example.com/api
      environment: Production
      key: HUGcQvd1_C-TKDrHVoZiNqaKS4jCcFYsGKuT0_W8
      max_clients: 20

Available options

The options are generally inherited from the HTTP Publisher, with the following notes:

address

Specifies the Alerta API address. The value must contain the http:// or https:// schema.

Example:

publisher:
  - alerta:
      address: 'https://alerta.example.com/api'

headers

The headers to use with the HTTP requests.

Some headers such as Content-type are added by default, while others such as Authorization are added depending on the key or token options.

key

Optional value when executing the HTTP requests using an Alerta API key.

Example:

publisher:
  - alerta:
      address: 'https://alerta.example.com/api'
      key: HUGcQvd1_C-TKDrHVoZiNqaKS4jCcFYsGKuT0_W8

token

Optional value when executing the HTTP requests using a bearer authentication.

Example:

publisher:
  - alerta:
      address: 'https://alerta.example.com/api'
      token: AbCdEf123456