How to import freebsd statistics into prometheus

There is an application which produces prometheus statistics.
prometheus_sysctl_exporter and
man 8 prometheus_sysctl_exporter

But prometheus exporters normally work with a web-listener.
I should in theory not be that diffucult to make a web-listener out of this.
Give it the parameter " -h Precede the output with a HTTP response header. This flag is required when running this utility through inetd(8)"
But i don't like inetd as it is insecure.
Maybe with a bit of python-code. Anyone ?
 
We seem to have all the exporters mentioned in this tutorial.
sysutils/node_exporter
net-mgmt/blackbox_exporter
sysutils/snmp_exporter
 
I found something,
Code:
./sysctl_exporter -h                                                   0
Usage of ./sysctl_exporter:
  -exclude string
        RegExp for skipping sysctl parameters
  -include string
        RegExp for sysctl parameters (default ".*")
  -listen-address string
        Address to listen on for telemetry (default ":9141")
  -log-level string
        Verbosity of logging (default "info")
  -metrics-prefix string
        Prefix of prometheus metrics (default "sysctl")
HOST:x: /home/x/sysctl_exporter >
 
The sysctl prober is not working for me. No sysctl data,
 

Attachments

  • test.png
    test.png
    114.3 KB · Views: 86
 
A cheap and easy way of doing this might be just making a crontab entry that runs prometheus_sysctl_exporter every X seconds and tosses the output in, say, "sysctls.prom" in /var/tmp/node_exporter . A running node_exporter installation with default settings will pick those metrics right up. Not necessarily glamorous, but it does the trick.
 
Back
Top