NetKAN-Status-Exporter

command module
v0.0.0-...-fc48f87 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: GPL-3.0 Imports: 20 Imported by: 0

README

NetKAN Status Exporter

A Prometheus exporter for the NetKAN infrastructure status of the KSP-CKAN project.

License: GPLv3

Usage

The exporter listens on :9811 by default, it can be overwritten using the --web.listen-address commandline option, or NETKAN_STATUS_EXPORTER_WEB_LISTEN_ADDRESS environment variable. Add a Prometheus scrape config to scrape it like this:

scrape_configs:
  - job_name: 'netkan-status'
    scrape_interval: 30m
    scrape_timeout:  20s
    static_configs:
      - targets: [ 'exporter.host:9811' ]

The NetKAN inflator basically only runs every 30 minutes, so it makes sense to set the scrape_interval just as low to reduce load on the CKAN infrastructure. However, Prometheus considers metrics not updated for more than 5 minutes stale and won't return any value for them, you can work around this by using max_over_time(netkan_some_metric[30m]). You need a relatively high timeout (e.g. 20s), since downloading and parsing the JSON can take quite a long time.

Docker

There's a Docker image available at registry.gitlab.com/dasskelett/netkan-status-exporter and dasskelett/netkan-status-exporter. It's built using golang:alpine, and the final image is based on alpine:3.13 and thus only a few MiB in size.

Third-party packages

This project uses

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