Thanks Brian for your help on this. i tested files with different metric
name and it worked.
On Saturday, 29 February 2020 16:13:13 UTC-6, Brian Candler wrote:
>
> I can replicate your problem here, when creating 1.prom and 2.prom
>
> However, if I concatenate the two files into one, it works; I also note
> that the metrics with the same metric name are grouped together under the
> same heading (even though they weren't adjacent in the source).
>
> # HELP kafka_topic_cluster_last_update Metric read from /tmp/prom/all.prom
> # TYPE kafka_topic_cluster_last_update untyped
> kafka_topic_cluster_last_update{cluster="dev",ts="1582844402760"}
> 1.58284440276e+12
> kafka_topic_cluster_last_update{cluster="test",ts="1582844402760"}
> 1.58284440276e+12
> # HELP kafka_topic_details Metric read from /tmp/prom/all.prom
> # TYPE kafka_topic_details untyped
> kafka_topic_details{atopic="APPC-LCM-READ-REGRESSION-1848",bpartition="0",cleader="2",cluster="dev",dreplicas="2,3,1",eisr="1,2,3",ts="1582844402760"}
>
> 3
> kafka_topic_details{atopic="APPC-LCM-READ-REGRESSION-1848",bpartition="0",cleader="2",cluster="test",dreplicas="2,3,1",eisr="1,2,3",ts="1582844402760"}
>
> 3
> # HELP kafka_topic_partitioncount Metric read from /tmp/prom/all.prom
> # TYPE kafka_topic_partitioncount untyped
> kafka_topic_partitioncount{atopic="APPC-LCM-READ-REGRESSION-1848",cluster="dev"}
>
> 8
> kafka_topic_partitioncount{atopic="APPC-LCM-READ-REGRESSION-1848",cluster="test"}
>
> 8
> # HELP kafka_topic_rf Metric read from /tmp/prom/all.prom
> # TYPE kafka_topic_rf untyped
> kafka_topic_rf{atopic="APPC-LCM-READ-REGRESSION-1848",cluster="dev"} 3
> kafka_topic_rf{atopic="APPC-LCM-READ-REGRESSION-1848",cluster="test"} 3
>
> I can only hypothesise that this grouping only works when all the metrics
> with a given metric name are in the same file, and that textfile collector
> doesn't support using the same metric name in two different files. But I
> couldn't find such a limitation documented anywhere.
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/e6b4c1e2-f8fd-4f6e-9eb3-1f6eead9513f%40googlegroups.com.