-
Notifications
You must be signed in to change notification settings - Fork 4
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
Allow issuing a metric having as value the timestamp of the last update of the metric #3
Comments
Sounds like a plan :) Maybe a single configuration option would suffice? E.g. when setting Or the other way round: If we come up with a useful default, it may be enough to allow Supporting it on the path level also sounds useful. All in all, I don't feeld too strongly, but I'd like to keep it simple. |
I agree with your comments
I prefer this approach, it's simpler for the end user and I don't see the use case of configurable metric name for this one (it should be the other way around, promql offers that flexibility)
Indeed! Push doesn't make sense at all, I didn't even think about it :)
Another possible downside (compared to having a predefined name): Imagine we have a bunch of scripts monitored this way, where for each one we issue this timestamp. Having a single name would allow having a single query ( By having different names one would need to add each log individually, seems harder to manage (and labels allow us to identify each metric even when having the same metric name). Another question: Does it make sense for the timestamp metric (if we keep a common name for this metric) to have every label of the original metric, plus an additional one |
Because of the nature of
multilog_exporter
(parsing logs and issuing metrics on their contents), themetrics
endpoint will issue the same value until the logs triggers again the condition (if this log is generated by a cron job, then it might be its next execution).But there are scenarios where this value might not change:
In such scenarios, {{multilog_endpoint}} doesn´t give enough visibility, as if we are in the second scenario we probably will want to investigate the root cause.
As discussed in #1 (comment) , a possible workaround is to have a sidecar metric added to the configuration that reports the timestamp when the metric is pushed. But given that this seems a useful thing to have, it makes sense to have it built-in, so that we can just tell {{multilog_exporter}} that we want to have that metric issued.
As a reference, pushgateway presents this behaviour through:
(
push_failure_time
doesn´t make much sense in this scenario)There are several approaches (speaking of user facing side) to expose this.
I was thinking of something like
Where:
timestamp
: Enables of disables such metric. Defaults to false for backwards compatibilitytimestamp_metric
: Sets the name for the metric. Defaults topush_time_seconds
for consistency with pushgatewaytimestamp_metric
I can work on this issue, let´s just agree on the description.
The text was updated successfully, but these errors were encountered: