# configuration of the HTTP server http: ## address: 127.0.0.1 # bind address for this service. Can be left unspecified to bind on all interfaces port: 12345 # port used by this service alerts-path-prefix: /alerts # URL path for the webhook receiver called by an Alertmanager. Defaults to /alerts metrics-path: /metrics # URL path to collect metrics. Defaults to /metrics metrics-enabled: true # Whether to enable metrics or not. Defaults to false # basic-username: alertmanager # Username for basic authentication. Defaults to alertmanager # basic-password: secret # If set, the alerts endpoint expects basic-auth credentials with the configured username and password # configuration for the Matrix connection matrix: homeserver-url: "{{ env "GF_MATRIX_HOMESERVER_URL" }}" user-id: "{{ env "GF_MATRIX_USER_ID" }}" access-token: "{{ secret "matrix_access_token" }}" room-mapping: matrixroom: "{{ env "GF_MATRIX_ROOM_ID" }}" templating: # mapping of ExternalURL values external-url-mapping: # key is the original value taken from the Alertmanager payload # value is the mapped value which will be available as '.ExternalURL' in templates "http://alertmanager:9093": https://alertmanager.example.com # mapping of GeneratorURL values generator-url-mapping: # key is the original value taken from the Alertmanager payload # value is the mapped value which will be available as '.GeneratorURL' in templates "http://prometheus:8080": https://prometheus.example.com # computation of arbitrary values based on matching alert annotations, labels, or status # values will be evaluated top to bottom, last entry wins computed-values: - values: # always set 'color' to 'yellow' color: yellow - values: # set 'color' to 'orange' when alert label 'severity' is 'warning' color: orange when-matching-labels: severity: warning - values: # set 'color' to 'red' when alert label 'severity' is 'critical' color: red when-matching-labels: severity: critical - values: # set 'color' to 'green' when alert status is 'resolved' color: green when-matching-status: resolved # template for alerts in status 'firing' firing-template: '{{`
{{ .Alert.Status | ToUpper }} {{ if .Alert.Labels.name }} {{ .Alert.Labels.name }} {{ else if .Alert.Labels.alertname }} {{ .Alert.Labels.alertname }} {{ end }} >> {{ if .Alert.Labels.severity }} {{ .Alert.Labels.severity | ToUpper }}: {{ end }} {{ if .Alert.Annotations.description }} {{ .Alert.Annotations.description }} {{ else if .Alert.Annotations.summary }} {{ .Alert.Annotations.summary }} {{ end }} >> {{ if .Alert.Annotations.runbook }} Runbook | {{ end }} {{ if .Alert.Annotations.dashboard }} Dashboard | {{ end }} Silence
`}}'