Prometheus inner metrics can't be remote write

44 views
Skip to first unread message

Yawhua Wong

unread,
Apr 18, 2022, 4:56:35 AM4/18/22
to Prometheus Users
UP metrics is inner metrics.
But why can't it be rewrite?
Is there any mistake?
微信图片_20220418164419.png

Brian Candler

unread,
Apr 18, 2022, 6:58:45 AM4/18/22
to Prometheus Users
(Please don't post screenshot images - they are hard to read, and impossible to copy-paste from)

What are you trying to do? Your rewriting config says:

1. If the label name is "up", then keep the metric.
2. Otherwise, keep the metric. (This is the default if you reach the end of the ruleset)

Hence it does nothing: it keeps all metrics.

Yawhua Wong

unread,
Apr 18, 2022, 7:59:32 AM4/18/22
to Prometheus Users
Sorry for the  'screenshot images' and  thanks for your reply.

There are some inner metrics in Prometheus to expose targets status. Refer to this https://github.com/prometheus/prometheus/blob/ec3d02019e84d9d793d2e137891dd7ea6d19ea60/scrape/scrape.go#L1662

I can query on Prometheus, but no data on remote storage according to the above configuration.

I want to write these inner metrics to our remote storage.

Brian Candler

unread,
Apr 18, 2022, 8:19:12 AM4/18/22
to Prometheus Users
By "inner metrics" I guess you mean "internal metrics".  These *are* written to the remote storage.  For example: I use VictoriaMetrics for remote storage, and the "up" metrics *do* propagate there.

So I think your problem must be at the receiving side.  You haven't specified what system it is that you're writing to.

Yawhua Wong

unread,
Apr 19, 2022, 3:49:19 AM4/19/22
to Brian Candler, Prometheus Users
Thanks a lot. 
my mistake.

--
You received this message because you are subscribed to a topic in the Google Groups "Prometheus Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/prometheus-users/FNsSbhtG-xc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/00832702-408c-4a4e-8d1b-50a94482e3c6n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages