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

afsocket-source: prometheus metrics inconsistencies #4640

Open
alltilla opened this issue Sep 20, 2023 · 0 comments
Open

afsocket-source: prometheus metrics inconsistencies #4640

alltilla opened this issue Sep 20, 2023 · 0 comments

Comments

@alltilla
Copy link
Collaborator

alltilla commented Sep 20, 2023

Description of the problem

  1. Sometimes the transport label is missing.
  2. Setting the bind address as the address label is misleading.
  3. Why don't we know the peer address in case of UDP?

Related code: https://github.com/syslog-ng/syslog-ng/blob/master/modules/afsocket/afsocket-source.c#L123

  1. syslogng_socket_receive_dropped_packets_total fills the address label with the bind address, which is a bit confusing, we might want to rename it to bind_address or something similar.
  2. transport can get the values udp, tcp, dgram, stream, which is a bit confusing, where sometimes only udp is used, sometimes only dgram, but both of them are meaningful in a way.

Proposed solution

Currently we follow the old stats instance name generation, but we can do better now if add some stats_cluster_label()s.

Example samples:

# syslog-ng-ctl stats -c /tmp/shared/syslog-ng.ctl prometheus|grep input_events_total
syslogng_input_events_total{transport="tcp",address="192.168.129.64",driver="afsocket",id="s_DEFAULT#4"} 4860923
syslogng_input_events_total{address="0.0.0.0",driver="afsocket",id="s_DEFAULT#1"} 0
syslogng_input_events_total{address="0.0.0.0",driver="afsocket",id="s_DEFAULT#2"} 117760
syslogng_input_events_total{transport="tcp",address="192.168.130.11",driver="afsocket",id="s_DEFAULT#4"} 305000
syslogng_input_events_total{address="0.0.0.0",driver="afsocket",id="s_DEFAULT#3"} 0
syslogng_input_events_total{address="0.0.0.0",driver="afsocket",id="s_DEFAULT#5"} 0
syslogng_input_events_total{address="0.0.0.0",driver="afsocket",id="s_DEFAULT#0"} 0
syslogng_input_events_total{transport="tcp",address="127.0.0.1",driver="afsocket",id="s_DEFAULT#4"} 588800
syslogng_input_events_total{transport="tcp",address="192.168.130.9",driver="afsocket",id="s_DEFAULT#4"} 298100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant