cloudcanal-exporter

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

README

cloudcanal-exporter

可以获取Cloudcanal许可证过期时间,进行监控。 这只是简单的metrics,如果需要关注别的指标可以自定义二次开发即可。

如有帮助给个Star⭐鼓励一下~️

构建

CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o cloudcanal_exporter

运行

cloudcanal_exporter --help # help
cloudcanal_exporter -listen-address :9119 -url http://localhost:8111 -username test@clougence.com -password clougence2021
curl http://localhost:9119/metrics # test curl

样例

grafana

告警配置

groups:
  - name: 'cloudcanal_monitor'
    rules:
      - alert: CloudcanalLicenseExpire
        expr: 'lm_cloudcanal_license_expiry-time() < 86400 * 10'
        for: 10m
        labels:
          severity: critical
          threshold: 10
          for_time: "10m"
        annotations:
          summary: "Cloudcanal license expire(instance {{ $labels.instance }})"
          description: "请注意, Cloudcanal 许可证将要过期, 还有({{ $value }})s < 10天"

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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