Daniel Jaglowski 40b485f08a Update core for v0.90.0 release (#29539) 1 年之前
..
internal f509060a8d feat(alertmanager): Add exporter factory and config (#27836) 1 年之前
testdata f509060a8d feat(alertmanager): Add exporter factory and config (#27836) 1 年之前
Makefile f509060a8d feat(alertmanager): Add exporter factory and config (#27836) 1 年之前
README.md f509060a8d feat(alertmanager): Add exporter factory and config (#27836) 1 年之前
alertmanager_exporter.go f509060a8d feat(alertmanager): Add exporter factory and config (#27836) 1 年之前
config.go f509060a8d feat(alertmanager): Add exporter factory and config (#27836) 1 年之前
config_test.go f509060a8d feat(alertmanager): Add exporter factory and config (#27836) 1 年之前
doc.go f509060a8d feat(alertmanager): Add exporter factory and config (#27836) 1 年之前
factory.go f509060a8d feat(alertmanager): Add exporter factory and config (#27836) 1 年之前
factory_test.go f509060a8d feat(alertmanager): Add exporter factory and config (#27836) 1 年之前
go.mod 40b485f08a Update core for v0.90.0 release (#29539) 1 年之前
go.sum 40b485f08a Update core for v0.90.0 release (#29539) 1 年之前
metadata.yaml f509060a8d feat(alertmanager): Add exporter factory and config (#27836) 1 年之前

README.md

Alertmanager Exporter

Status
Stability development: traces
Distributions contrib
Issues Open issues Closed issues
Code Owners @jpkrohling, @sokoide, @mcube8

Exports OTEL Events (SpanEvent in Tracing added by AddEvent API) as Alerts to Alertmanager back-end to notify Errors or Change events.

Supported pipeline types: traces

Getting Started

The following settings are required:

  • endpoint : Alertmanager endpoint to send events
  • severity (default info): Default severity for Alerts

The following settings are optional:

  • timeout sending_queue and retry_on_failure settings as provided by Exporter Helper
  • HTTP settings
  • TLS and mTLS settings
  • generator_url is the source of the alerts to be used in Alertmanager's payload. The default value is "opentelemetry-collector", and can be set to the URL of the opentelemetry collector.
  • severity_attributeis the spanevent Attribute name which can be used instead of default severity string in Alert payload eg: If severity_attribute is set to "foo" and the SpanEvent has an attribute called foo, foo's attribute value will be used as the severity value for that particular Alert generated from the SpanEvent.

Example config:

exporters:
  alertmanager:
  alertmanager/2:
    endpoint: "https://a.new.alertmanager.target:9093"
    severity: "debug"
    severity_attribute: "foo"
    tls:
      cert_file: /var/lib/mycert.pem
      key_file: /var/lib/key.pem
    timeout: 10s
    sending_queue:
      enabled: true
      num_consumers: 2
      queue_size: 10
    retry_on_failure:
      enabled: true
      initial_interval: 10s
      max_interval: 60s
      max_elapsed_time: 10m
    generator_url: "opentelemetry-collector"