Commit 95011f86 authored by Jérome Perrin's avatar Jérome Perrin

software/grafana: include a telegraf plugin to get slapos process metrics

For now this still have to be enabled with a config like this in a .conf
file in srv/telegraf/extra-config/  :

    [[inputs.execd]]
      name_override = "slapos"
      # this needs sudo when using can not access supervisor socket, like when being installed in root slapos
      command = ["/usr/bin/sudo", "$SOFTWARE_DIR/go.work/bin/telegraf-input-slapos", "-config", "/path/to/slapos.conf"]

/path/to/slapos.conf would contain something like this:

    [[inputs.slapos]]
      ## Folder where partitions are located
      instance_root = "/srv/slapgrid/"

      ## filepath.Glob pattern to look for recursive instances
      recursive_instance_glob_pattern = "*/srv/runner/inst*/"

      ## Path of supervisor socket, relative to instance root
      socket_name = "sv.sock"
parent a0056c95
......@@ -48,6 +48,11 @@ go.importpath = github.com/influxdata/telegraf
repository = https://github.com/influxdata/telegraf
revision = v1.20.2-0-gf721f53d
[go_github.com_perrinjerome_slapos_telegraf_input]
<= go-git-package
go.importpath = github.com/perrinjerome/telegraf-input-slapos
repository = https://github.com/perrinjerome/telegraf-input-slapos
revision = v0.0.1-0-gf8981f3
[gowork]
install =
......@@ -56,6 +61,7 @@ install =
${go_github.com_grafana_loki:location}:./cmd/logcli
${go_github.com_influxdata_telegraf:location}:./cmd/...
${go_github.com_influxdata_influxdb:location}:./cmd/...
${go_github.com_perrinjerome_slapos_telegraf_input:location}:./...
# disable cgo, to prevent loki/promtail from using go-systemd
environment =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment