Modify

Opened 8 months ago

Closed 4 months ago

#183 closed enhancement (fixed)

Additional Prometheus metrics in BKG NtripCaster

Reported by: anonymous Owned by: stoecker
Priority: normal Component: Professional Caster
Version: Keywords: caster, prometheus, metrics, grafana
Cc: jrocamora@…, neumaier, wiese

Description

Hi BKG team,

There is a nice feature that you added in V2.0.42, that is the provision of Prometheus metrics, that we are using a lot for monitoring our BKG NtripCasters with Grafana, and we think that it would be super helpful having additional metrics to complement the current ones, in this case per mountpoint, for having a complete monitoring of the casters in real-time, like:

  • Received bytes per mountpoint.
  • Sent bytes per mountpoint.
  • Number of clients per mountpoint
  • Number of sources per mountpoint (this would be always 1 or 0 but it would help to know the current active mountpoints)
  • Last time traffic was received per mountpoint.
  • Last time traffic was sent per mountpoint.
  • Received bytes per relay.
  • Last time traffic was received per relay.
  • Errors per relay and last time there was an error per relay?

Thank you in advance!
Jorge

Attachments (0)

Change History (11)

comment:1 by stoecker, 8 months ago

Cc: neumaier added

comment:2 by wiese, 8 months ago

Cc: wiese added

comment:3 by stoecker, 8 months ago

In 10501/ntrip:

see #183, first stream statistics

comment:4 by stoecker, 8 months ago

In 10502/ntrip:

see #183, small cleanup

comment:5 by stoecker, 8 months ago

In 10504/ntrip:

see #183, move load, increase version

comment:6 by wiese, 8 months ago

added:

# HELP sources_received_bytes_total The number of bytes received for the mountpoint.
# TYPE sources_received_bytes_total counter
sources_received_bytes_total{mp="FFMJ"} 3586048

# HELP sources_sent_bytes_total The number of bytes sent for the mountpoint.
# TYPE sources_sent_bytes_total counter
sources_sent_bytes_total{mp="FFMJ"} 27648

# HELP sources_clients_num The number of clients connected to the mountpoint.
# TYPE sources_clients_num gauge
sources_clients_num{mp="FFMJ"} 1

# HELP sources_connections_total The number of connections of the mountpoint.
# TYPE sources_connections_total counter
sources_connections_total{mp="FFMJ"} 1

# HELP sources_clients_connections_total The number of client connections to the mountpoint.
# TYPE sources_clients_connections_total counter
sources_clients_connections_total{mp="FFMJ"} 1

# HELP sources_duration_seconds The activity time of the mountpoint.
# TYPE sources_duration_seconds gauge
sources_duration_seconds{mp="FFMJ"} 4858

Last edited 8 months ago by wiese (previous) (diff)

comment:7 by jrocamora@…, 8 months ago

Hi!

Thank you very much for the rapid implementation of this enhancement.

It looks very nice!!

Just a few minor comments:

  • I would find useful a metric "sources_connections_num" similar to "sources_clients_num" but with the number of active connections per mountpoint.
  • Regarding the "sources_clients_connections_total" metric, would it be computed per mountpoint and client or what is the different between this metric and the "source_connections_total" one?
  • Would it be possible having a metric formatted as UNIX timestamp like "sources_last_received_timestamp_seconds" and, optionally, "sources_last_sent_timestamp_seconds"? So that, one is able to monitor the last time a certain mountpoint was receiving/transmitting data. Nevertheless, I don't know if the computation of this metrics would be expensive in terms of CPU as it would be computed very frequently.
  • Would the "source_duration_seconds" metric be reset to zero after the connection of a NtripServer is lost or what is the expected behaviour?

Again thank you very much, as it will help integrating and monitoring the BKG NtripCaster in cloud-like environments.

Best regards,
Jorge

in reply to:  7 ; comment:8 by wiese, 8 months ago

Replying to jrocamora@…:

Hi!

Thank you very much for the rapid implementation of this enhancement.

It looks very nice!!

Just a few minor comments:

  • I would find useful a metric "sources_connections_num" similar to "sources_clients_num" but with the number of active connections per mountpoint.

    This is sources_clients_num{mp="FFMJ"} 1

  • Regarding the "sources_clients_connections_total" metric, would it be computed per mountpoint and client or what is the different between this metric and the "source_connections_total" one?

    see examples above

  • Would it be possible having a metric formatted as UNIX timestamp like "sources_last_received_timestamp_seconds" and, optionally, "sources_last_sent_timestamp_seconds"? So that, one is able to monitor the last time a certain mountpoint was receiving/transmitting data. Nevertheless, I don't know if the computation of this metrics would be expensive in terms of CPU as it would be computed very frequently.

    This is analog to "Connected for" in admin>sources view.

  • Would the "source_duration_seconds" metric be reset to zero after the connection of a NtripServer is lost or what is the expected behaviour?

    yes it is reset when connection is broken, per mountpoint. See example above

Again thank you very much, as it will help integrating and monitoring the BKG NtripCaster in cloud-like environments.

Best regards,
Jorge

in reply to:  8 ; comment:9 by anonymous, 8 months ago

Thank you for the replies! I finally reply to the first questionwiese:

Replying to jrocamora@…:

Hi!

Thank you very much for the rapid implementation of this enhancement.

It looks very nice!!

Just a few minor comments:

  • I would find useful a metric "sources_connections_num" similar to "sources_clients_num" but with the number of active connections per mountpoint.

    This is sources_clients_num{mp="FFMJ"} 1

    So I understand it is not possible having also a gauge with current connections per mountpoint like "sources_connection_num".

  • Regarding the "sources_clients_connections_total" metric, would it be computed per mountpoint and client or what is the different between this metric and the "source_connections_total" one?

    see examples above

  • Would it be possible having a metric formatted as UNIX timestamp like "sources_last_received_timestamp_seconds" and, optionally, "sources_last_sent_timestamp_seconds"? So that, one is able to monitor the last time a certain mountpoint was receiving/transmitting data. Nevertheless, I don't know if the computation of this metrics would be expensive in terms of CPU as it would be computed very frequently.

    This is analog to "Connected for" in admin>sources view.

  • Would the "source_duration_seconds" metric be reset to zero after the connection of a NtripServer is lost or what is the expected behaviour?

    yes it is reset when connection is broken, per mountpoint. See example above

Again thank you very much, as it will help integrating and monitoring the BKG NtripCaster in cloud-like environments.

Best regards,
Jorge

in reply to:  9 comment:10 by wiese, 8 months ago

Replying to anonymous:

Thank you for the replies! I finally reply to the first questionwiese:

Replying to jrocamora@…:

Hi!

Thank you very much for the rapid implementation of this enhancement.

It looks very nice!!

Just a few minor comments:

  • I would find useful a metric "sources_connections_num" similar to "sources_clients_num" but with the number of active connections per mountpoint.

    This is sources_clients_num{mp="FFMJ"} 1

    So I understand it is not possible having also a gauge with current connections per mountpoint like "sources_connection_num".

    sources_clients_num is gauge. Please try it out.

  • Regarding the "sources_clients_connections_total" metric, would it be computed per mountpoint and client or what is the different between this metric and the "source_connections_total" one?

    see examples above

  • Would it be possible having a metric formatted as UNIX timestamp like "sources_last_received_timestamp_seconds" and, optionally, "sources_last_sent_timestamp_seconds"? So that, one is able to monitor the last time a certain mountpoint was receiving/transmitting data. Nevertheless, I don't know if the computation of this metrics would be expensive in terms of CPU as it would be computed very frequently.

    This is analog to "Connected for" in admin>sources view.

  • Would the "source_duration_seconds" metric be reset to zero after the connection of a NtripServer is lost or what is the expected behaviour?

    yes it is reset when connection is broken, per mountpoint. See example above

Again thank you very much, as it will help integrating and monitoring the BKG NtripCaster in cloud-like environments.

Best regards,
Jorge

comment:11 by wiese, 4 months ago

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Action
as closed The owner will remain stoecker.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.