Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics has different names that with write_prometheus #153

Open
jcarnat opened this issue Jan 14, 2024 · 1 comment
Open

Metrics has different names that with write_prometheus #153

jcarnat opened this issue Jan 14, 2024 · 1 comment

Comments

@jcarnat
Copy link

jcarnat commented Jan 14, 2024

Hello,

I'm starting to use Prometheus and come from collectd/InfluxDB. I'm keeping collectd but get rid of InfluxDB to store data using Prometheus. On systems where this is available, I use the collectd write_prometheus plugin. But on FreeBSD 14, the default collectd package does not provide this plugin ; but they provide the collectd_exporter package.

Using both tools, I noticed differences in metrics' name.
This leads to issues in Grafana/PromQL dashboard/requests.

With collectd_prometheus (on FreeBSD), I get:

  • collectd_interface_if_errors_0_total
  • collectd_interface_if_errors_1_total
  • collectd_interface_if_octets_0_total
  • collectd_interface_if_octets_1_total
  • (...)

With write_prometheus (on Illumos and OpenBSD), those have different names:

  • collectd_interface_if_errors_rx_total
  • collectd_interface_if_errors_tx_total
  • collectd_interface_if_octets_rx_total
  • collectd_interface_if_octets_tx_total
  • (...)

Is this expected / know?
Is there a way to have the same metrics names with both tools?

Thank you.

@Z10N0110
Copy link

Z10N0110 commented Aug 1, 2024

This is because the collectd's network plugin that send data to collectd_exporter via binary protocol, which support multiple values for the same timestamp at once. various plugins will use this feature, like interface, load, disk, etc. In general, when a remote collectd instance receive the binary protocol data, it can understand those values original means by the types.db provided via TypesDB in collectd.conf file, for this exporter here, it requires you specific it through the cmd-flag --collectd.typesdb-file.

You could just save the raw types.db content to file for exporter usage, see types.db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants