Repository navigation
Add per-input and per-output Prometheus metrics - #676
Merged
jvde-github merged 2 commits intoNov 2, 2026
Merged
Conversation
Add ais_input_* and ais_output_* metrics (counts, bytes, up/connected, connect/reconnect counters, last message time, input errors). Connection series are only emitted for inputs and outputs that hold a connection. Receivers accept a user-supplied description used as the input label.
The main Dockerfile installs the prebuilt upstream release, so it never contains local changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Extends the
/metricsendpoint (enabled withPROME on) with metrics for each input and output. The existing globalais_stat_*metrics are unchanged.Inputs
Labels:
input,type,description.descriptionis the user-supplied value from the config, falling back to a derived name when empty.ais_input_countais_input_bytes_inais_input_upais_input_last_message_timestamp_secondsais_input_errors{error}checksum,undersized,oversizedais_input_connect_ok,ais_input_connect_fail,ais_input_reconnects,ais_input_connectedOutputs
Labels:
output,type,description.ais_output_countais_output_bytes_outais_output_bytes_inais_output_droppedais_output_connect_ok,ais_output_connect_fail,ais_output_reconnects,ais_output_connectedconnectedis the client countSupporting changes
Receiver::descriptionnow keeps the JSON configdescription(it was parsed and discarded).IO::OutputStatsgainsmessages, which is also included in the JSON output.Device::isUp()has no side effects.isStreaming()can read the WAV file and feed the decoder, so it isn't safe to call from the metrics path.Device::getConnectionStats(), overridden by RTLTCP and SpyServer.OutputMessage::hasConnection(), so connectionless outputs skip the connection metrics.DatabaseOutputnow counts messages.Dockerfile.devbuilds from the checkout. The mainDockerfileinstalls the upstream release, so it can't be used to test local changes.