clickhouse-alertmanager

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

clickhouse-alertmanager

A small service which acts a bit like prometheus alert rules, but for arbitrary clickhouse queries.

Rules are configured with a file similar to normal prometheus config:

groups:
- name: example
  labels:
    team: myteam
  rules:
  - alert: BadNumber
    expr: |
      SELECT
          thing,
          other_thing
      FROM example
      WHERE bad_number > 3
    labels:
      severity: page
    annotations:
      summary: High bad number

If the query matches any rows, the results are sent to configured alertmanagers with selected column values as labels.

Usage:

  --config.file string
    	Config file path (default "config.yaml")
  --log.level string
    	Log level (debug, info, warn, error) (default "info")

Basic config file:

clickhouse:
  addresses:
    - example-host:9440
  tls: true
  database: default
  username: demo
  password: ""

alertmanager:
  scheme: http
  static_config:
    targets:
      - alertmanager-example:9093

rule_files:
  - alerts.yaml

evaluation_interval: 30

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL