https://github.com/m-lab/disco
DIScard COllector. Collects metrics from switches, writes them to disk and exports them.
https://github.com/m-lab/disco
Last synced: 12 months ago
JSON representation
DIScard COllector. Collects metrics from switches, writes them to disk and exports them.
- Host: GitHub
- URL: https://github.com/m-lab/disco
- Owner: m-lab
- License: apache-2.0
- Created: 2020-06-15T19:14:31.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-04-07T09:06:37.000Z (over 1 year ago)
- Last Synced: 2025-07-27T06:36:26.780Z (12 months ago)
- Language: Go
- Size: 55.7 KB
- Stars: 1
- Watchers: 12
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://coveralls.io/github/m-lab/disco?branch=master)
# DISCOv2
DISCOv2 is a reimplementation of the DISCO parts of
[collectd-mlab](https://github.com/m-lab/collectd-mlab), written in Go. It
differs a bit from DISCO, but fundamentally they are the same in that they
both probe a switch for various traffic metrics every 10s and then
periodically write the results to a file in JSON format. Pusher will upload
those files to GCS where they will be processed and parsed into BigQuery.
DISCOv2 supports the following flags:
* `--prometheusx.listen-address`: the IP and TCP port to listen to for
Prometheus metricis requests.
* `--metrics-file`: the path to a YAML-formatted file defining which metrics to
scrape. See file metrics.yaml in this repo for an example.
* `--write-interval`: the interval at which collected metrics are converted to
JSON and written to disk.
* `--target`: the name or IP of the switch to collect metrics from.
DISCOv2 requires that an environment variable named `DISCO_COMMUNITY` is set
and contains the SNMP community sting to use when polling the switch.
Unlike DISCO, in addition to collecting switch metrics every 10s and writing
out data files, DISCOv2 includes a Prometheus exporter which will expose the
metrics it has collected. This makes DISCOv2 something like the
[snmp_exporter](https://github.com/prometheus/snmp_exporter), but far less
general purpose.
# Configuration
The file metrics.yaml.sample is, as the name implies, nothing more than a sample
of how the configuration file should be formatted. The [actual configuration
file for
DISCOv2](https://github.com/m-lab/k8s-support/blob/master/config/disco/metrics.yaml)
(as it runs in the M-Lab kubernetes platform cluster) can be found in the
k8s-support repository.