Filter out testfile metrics correctly when using `collect[]` filters (#763)
* remove injection hook for textfile metrics, convert them to prometheus format * add support for summaries * add support for histograms * add logic for handling inconsistent labels within a metric family for counter, gauge, untyped * change logic for parsing the metrics textfile * fix logic to adding missing labels * Export time and error metrics for textfiles * Add tests for new textfile collector, fix found bugs * refactor Update() to split into smaller functions * remove parseTextFiles(), fix import issue * add mtime metric directly to channel, fix handling of mtime during testing * rename variables related to labels * refactor: add default case, remove if guard for metrics, remove extra loop and slice * refactor: remove extra loop iterating over metric families * test: add test case for different metric type, fix found bug * test: add test for metrics with inconsistent labels * test: add test for histogram * test: add test for histogram with extra dimension * test: add test for summary * test: add test for summary with extra dimension * remove unnecessary creation of protobuf * nit: remove extra blank linepull/768/head
parent
cd2a17176a
commit
1f2458f42c
@ -0,0 +1,32 @@ |
||||
# HELP event_duration_seconds_total Query timings |
||||
# TYPE event_duration_seconds_total summary |
||||
event_duration_seconds_total{baz="inner_eval",quantile="0.5"} 1.073e-06 |
||||
event_duration_seconds_total{baz="inner_eval",quantile="0.9"} 1.928e-06 |
||||
event_duration_seconds_total{baz="inner_eval",quantile="0.99"} 4.35e-06 |
||||
event_duration_seconds_total_sum{baz="inner_eval"} 1.8652166505091474e+06 |
||||
event_duration_seconds_total_count{baz="inner_eval"} 1.492355615e+09 |
||||
event_duration_seconds_total{baz="prepare_time",quantile="0.5"} 4.283e-06 |
||||
event_duration_seconds_total{baz="prepare_time",quantile="0.9"} 7.796e-06 |
||||
event_duration_seconds_total{baz="prepare_time",quantile="0.99"} 2.2083e-05 |
||||
event_duration_seconds_total_sum{baz="prepare_time"} 840923.7919437207 |
||||
event_duration_seconds_total_count{baz="prepare_time"} 1.492355814e+09 |
||||
event_duration_seconds_total{baz="result_append",quantile="0.5"} 1.566e-06 |
||||
event_duration_seconds_total{baz="result_append",quantile="0.9"} 3.223e-06 |
||||
event_duration_seconds_total{baz="result_append",quantile="0.99"} 6.53e-06 |
||||
event_duration_seconds_total_sum{baz="result_append"} 4.404109951000078 |
||||
event_duration_seconds_total_count{baz="result_append"} 1.427647e+06 |
||||
event_duration_seconds_total{baz="result_sort",quantile="0.5"} 1.847e-06 |
||||
event_duration_seconds_total{baz="result_sort",quantile="0.9"} 2.975e-06 |
||||
event_duration_seconds_total{baz="result_sort",quantile="0.99"} 4.08e-06 |
||||
event_duration_seconds_total_sum{baz="result_sort"} 3.4123187829998307 |
||||
event_duration_seconds_total_count{baz="result_sort"} 1.427647e+06 |
||||
# HELP events_total this is a test metric |
||||
# TYPE events_total counter |
||||
events_total{foo="bar"} 10 |
||||
events_total{foo="baz"} 20 |
||||
# HELP node_textfile_mtime Unixtime mtime of textfiles successfully read. |
||||
# TYPE node_textfile_mtime gauge |
||||
node_textfile_mtime{file="metrics.prom"} 1 |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 0 |
||||
@ -0,0 +1,28 @@ |
||||
# HELP events_total this is a test metric |
||||
# TYPE events_total counter |
||||
events_total{foo="bar"} 10 |
||||
events_total{foo="baz"} 20 |
||||
|
||||
# HELP event_duration_seconds_total Query timings |
||||
# TYPE event_duration_seconds_total summary |
||||
event_duration_seconds_total{baz="inner_eval",quantile="0.5"} 1.073e-06 |
||||
event_duration_seconds_total{baz="inner_eval",quantile="0.9"} 1.928e-06 |
||||
event_duration_seconds_total{baz="inner_eval",quantile="0.99"} 4.35e-06 |
||||
event_duration_seconds_total_sum{baz="inner_eval"} 1.8652166505091474e+06 |
||||
event_duration_seconds_total_count{baz="inner_eval"} 1.492355615e+09 |
||||
event_duration_seconds_total{baz="prepare_time",quantile="0.5"} 4.283e-06 |
||||
event_duration_seconds_total{baz="prepare_time",quantile="0.9"} 7.796e-06 |
||||
event_duration_seconds_total{baz="prepare_time",quantile="0.99"} 2.2083e-05 |
||||
event_duration_seconds_total_sum{baz="prepare_time"} 840923.7919437207 |
||||
event_duration_seconds_total_count{baz="prepare_time"} 1.492355814e+09 |
||||
event_duration_seconds_total{baz="result_append",quantile="0.5"} 1.566e-06 |
||||
event_duration_seconds_total{baz="result_append",quantile="0.9"} 3.223e-06 |
||||
event_duration_seconds_total{baz="result_append",quantile="0.99"} 6.53e-06 |
||||
event_duration_seconds_total_sum{baz="result_append"} 4.404109951000078 |
||||
event_duration_seconds_total_count{baz="result_append"} 1.427647e+06 |
||||
event_duration_seconds_total{baz="result_sort",quantile="0.5"} 1.847e-06 |
||||
event_duration_seconds_total{baz="result_sort",quantile="0.9"} 2.975e-06 |
||||
event_duration_seconds_total{baz="result_sort",quantile="0.99"} 4.08e-06 |
||||
event_duration_seconds_total_sum{baz="result_sort"} 3.4123187829998307 |
||||
event_duration_seconds_total_count{baz="result_sort"} 1.427647e+06 |
||||
|
||||
@ -0,0 +1,21 @@ |
||||
# HELP node_textfile_mtime Unixtime mtime of textfiles successfully read. |
||||
# TYPE node_textfile_mtime gauge |
||||
node_textfile_mtime{file="metrics.prom"} 1 |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 0 |
||||
# HELP prometheus_tsdb_compaction_chunk_range Final time range of chunks on their first compaction |
||||
# TYPE prometheus_tsdb_compaction_chunk_range histogram |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="100"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="400"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="1600"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="6400"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="25600"} 7 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="102400"} 7 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="409600"} 1.412839e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="1.6384e+06"} 1.69185e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="6.5536e+06"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="2.62144e+07"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="+Inf"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_sum 6.71393432189e+11 |
||||
prometheus_tsdb_compaction_chunk_range_count 1.691853e+06 |
||||
@ -0,0 +1,15 @@ |
||||
# HELP prometheus_tsdb_compaction_chunk_range Final time range of chunks on their first compaction |
||||
# TYPE prometheus_tsdb_compaction_chunk_range histogram |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="100"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="400"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="1600"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="6400"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="25600"} 7 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="102400"} 7 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="409600"} 1.412839e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="1.6384e+06"} 1.69185e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="6.5536e+06"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="2.62144e+07"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{le="+Inf"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_sum 6.71393432189e+11 |
||||
prometheus_tsdb_compaction_chunk_range_count 1.691853e+06 |
||||
@ -0,0 +1,34 @@ |
||||
# HELP node_textfile_mtime Unixtime mtime of textfiles successfully read. |
||||
# TYPE node_textfile_mtime gauge |
||||
node_textfile_mtime{file="metrics.prom"} 1 |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 0 |
||||
# HELP prometheus_tsdb_compaction_chunk_range Final time range of chunks on their first compaction |
||||
# TYPE prometheus_tsdb_compaction_chunk_range histogram |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="100"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="400"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="1600"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="6400"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="25600"} 7 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="102400"} 7 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="409600"} 1.412839e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="1.6384e+06"} 1.69185e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="6.5536e+06"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="2.62144e+07"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="+Inf"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_sum{foo="bar"} 6.71393432189e+11 |
||||
prometheus_tsdb_compaction_chunk_range_count{foo="bar"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="100"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="400"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="1600"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="6400"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="25600"} 7 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="102400"} 7 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="409600"} 1.412839e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="1.6384e+06"} 1.69185e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="6.5536e+06"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="2.62144e+07"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="+Inf"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_sum{foo="baz"} 6.71393432189e+11 |
||||
prometheus_tsdb_compaction_chunk_range_count{foo="baz"} 1.691853e+06 |
||||
@ -0,0 +1,28 @@ |
||||
# HELP prometheus_tsdb_compaction_chunk_range Final time range of chunks on their first compaction |
||||
# TYPE prometheus_tsdb_compaction_chunk_range histogram |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="100"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="400"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="1600"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="6400"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="25600"} 7 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="102400"} 7 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="409600"} 1.412839e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="1.6384e+06"} 1.69185e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="6.5536e+06"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="2.62144e+07"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="bar",le="+Inf"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_sum{foo="bar"} 6.71393432189e+11 |
||||
prometheus_tsdb_compaction_chunk_range_count{foo="bar"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="100"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="400"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="1600"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="6400"} 0 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="25600"} 7 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="102400"} 7 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="409600"} 1.412839e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="1.6384e+06"} 1.69185e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="6.5536e+06"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="2.62144e+07"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_bucket{foo="baz",le="+Inf"} 1.691853e+06 |
||||
prometheus_tsdb_compaction_chunk_range_sum{foo="baz"} 6.71393432189e+11 |
||||
prometheus_tsdb_compaction_chunk_range_count{foo="baz"} 1.691853e+06 |
||||
@ -0,0 +1,29 @@ |
||||
# HELP go_goroutines Number of goroutines that currently exist. |
||||
# TYPE go_goroutines gauge |
||||
go_goroutines{foo=""} 20 |
||||
go_goroutines{foo="bar"} 229 |
||||
# HELP http_requests_total Total number of HTTP requests made. |
||||
# TYPE http_requests_total counter |
||||
http_requests_total{baz="",code="200",foo="",handler="",method="get"} 11 |
||||
http_requests_total{baz="",code="200",foo="",handler="alerts",method="get"} 35 |
||||
http_requests_total{baz="",code="200",foo="",handler="config",method="get"} 8 |
||||
http_requests_total{baz="",code="200",foo="",handler="flags",method="get"} 18 |
||||
http_requests_total{baz="",code="200",foo="",handler="graph",method="get"} 89 |
||||
http_requests_total{baz="",code="200",foo="",handler="prometheus",method="get"} 17051 |
||||
http_requests_total{baz="",code="200",foo="",handler="query",method="get"} 401 |
||||
http_requests_total{baz="",code="200",foo="",handler="query_range",method="get"} 15663 |
||||
http_requests_total{baz="",code="200",foo="",handler="rules",method="get"} 7 |
||||
http_requests_total{baz="",code="200",foo="",handler="series",method="get"} 221 |
||||
http_requests_total{baz="",code="200",foo="",handler="static",method="get"} 1647 |
||||
http_requests_total{baz="",code="200",foo="",handler="status",method="get"} 12 |
||||
http_requests_total{baz="",code="200",foo="bar",handler="",method="get"} 325 |
||||
http_requests_total{baz="",code="206",foo="",handler="static",method="get"} 2 |
||||
http_requests_total{baz="",code="400",foo="",handler="query_range",method="get"} 40 |
||||
http_requests_total{baz="",code="503",foo="",handler="query_range",method="get"} 3 |
||||
http_requests_total{baz="bar",code="200",foo="",handler="",method="get"} 93 |
||||
# HELP node_textfile_mtime Unixtime mtime of textfiles successfully read. |
||||
# TYPE node_textfile_mtime gauge |
||||
node_textfile_mtime{file="metrics.prom"} 1 |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 0 |
||||
@ -0,0 +1,24 @@ |
||||
# HELP http_requests_total Total number of HTTP requests made. |
||||
# TYPE http_requests_total counter |
||||
http_requests_total{code="200",handler="alerts",method="get"} 35 |
||||
http_requests_total{code="200",handler="config",method="get"} 8 |
||||
http_requests_total{code="200",method="get", foo="bar"} 325 |
||||
http_requests_total{code="200",handler="flags",method="get"} 18 |
||||
http_requests_total{code="200",handler="graph",method="get"} 89 |
||||
http_requests_total{code="200",method="get", baz="bar"} 93 |
||||
http_requests_total{code="200",handler="prometheus",method="get"} 17051 |
||||
http_requests_total{code="200",handler="query",method="get"} 401 |
||||
http_requests_total{code="200",handler="query_range",method="get"} 15663 |
||||
http_requests_total{code="200",handler="rules",method="get"} 7 |
||||
http_requests_total{code="200",handler="series",method="get"} 221 |
||||
http_requests_total{code="200",handler="static",method="get"} 1647 |
||||
http_requests_total{code="200",handler="status",method="get"} 12 |
||||
http_requests_total{code="200",method="get"} 11 |
||||
http_requests_total{code="206",handler="static",method="get"} 2 |
||||
http_requests_total{code="400",handler="query_range",method="get"} 40 |
||||
http_requests_total{code="503",handler="query_range",method="get"} 3 |
||||
|
||||
# HELP go_goroutines Number of goroutines that currently exist. |
||||
# TYPE go_goroutines gauge |
||||
go_goroutines{foo="bar"} 229 |
||||
go_goroutines 20 |
||||
@ -1,8 +1,3 @@ |
||||
name: "node_textfile_scrape_error" |
||||
help: "1 if there was an error opening or reading a file, 0 otherwise" |
||||
type: GAUGE |
||||
metric: < |
||||
gauge: < |
||||
value: 0 |
||||
> |
||||
> |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 0 |
||||
|
||||
@ -1,8 +1,3 @@ |
||||
name: "node_textfile_scrape_error" |
||||
help: "1 if there was an error opening or reading a file, 0 otherwise" |
||||
type: GAUGE |
||||
metric: < |
||||
gauge: < |
||||
value: 1 |
||||
> |
||||
> |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 1 |
||||
|
||||
@ -0,0 +1,28 @@ |
||||
# HELP event_duration_seconds_total Query timings |
||||
# TYPE event_duration_seconds_total summary |
||||
event_duration_seconds_total{baz="inner_eval",quantile="0.5"} 1.073e-06 |
||||
event_duration_seconds_total{baz="inner_eval",quantile="0.9"} 1.928e-06 |
||||
event_duration_seconds_total{baz="inner_eval",quantile="0.99"} 4.35e-06 |
||||
event_duration_seconds_total_sum{baz="inner_eval"} 1.8652166505091474e+06 |
||||
event_duration_seconds_total_count{baz="inner_eval"} 1.492355615e+09 |
||||
event_duration_seconds_total{baz="prepare_time",quantile="0.5"} 4.283e-06 |
||||
event_duration_seconds_total{baz="prepare_time",quantile="0.9"} 7.796e-06 |
||||
event_duration_seconds_total{baz="prepare_time",quantile="0.99"} 2.2083e-05 |
||||
event_duration_seconds_total_sum{baz="prepare_time"} 840923.7919437207 |
||||
event_duration_seconds_total_count{baz="prepare_time"} 1.492355814e+09 |
||||
event_duration_seconds_total{baz="result_append",quantile="0.5"} 1.566e-06 |
||||
event_duration_seconds_total{baz="result_append",quantile="0.9"} 3.223e-06 |
||||
event_duration_seconds_total{baz="result_append",quantile="0.99"} 6.53e-06 |
||||
event_duration_seconds_total_sum{baz="result_append"} 4.404109951000078 |
||||
event_duration_seconds_total_count{baz="result_append"} 1.427647e+06 |
||||
event_duration_seconds_total{baz="result_sort",quantile="0.5"} 1.847e-06 |
||||
event_duration_seconds_total{baz="result_sort",quantile="0.9"} 2.975e-06 |
||||
event_duration_seconds_total{baz="result_sort",quantile="0.99"} 4.08e-06 |
||||
event_duration_seconds_total_sum{baz="result_sort"} 3.4123187829998307 |
||||
event_duration_seconds_total_count{baz="result_sort"} 1.427647e+06 |
||||
# HELP node_textfile_mtime Unixtime mtime of textfiles successfully read. |
||||
# TYPE node_textfile_mtime gauge |
||||
node_textfile_mtime{file="metrics.prom"} 1 |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 0 |
||||
@ -0,0 +1,22 @@ |
||||
# HELP event_duration_seconds_total Query timings |
||||
# TYPE event_duration_seconds_total summary |
||||
event_duration_seconds_total{baz="inner_eval",quantile="0.5"} 1.073e-06 |
||||
event_duration_seconds_total{baz="inner_eval",quantile="0.9"} 1.928e-06 |
||||
event_duration_seconds_total{baz="inner_eval",quantile="0.99"} 4.35e-06 |
||||
event_duration_seconds_total_sum{baz="inner_eval"} 1.8652166505091474e+06 |
||||
event_duration_seconds_total_count{baz="inner_eval"} 1.492355615e+09 |
||||
event_duration_seconds_total{baz="prepare_time",quantile="0.5"} 4.283e-06 |
||||
event_duration_seconds_total{baz="prepare_time",quantile="0.9"} 7.796e-06 |
||||
event_duration_seconds_total{baz="prepare_time",quantile="0.99"} 2.2083e-05 |
||||
event_duration_seconds_total_sum{baz="prepare_time"} 840923.7919437207 |
||||
event_duration_seconds_total_count{baz="prepare_time"} 1.492355814e+09 |
||||
event_duration_seconds_total{baz="result_append",quantile="0.5"} 1.566e-06 |
||||
event_duration_seconds_total{baz="result_append",quantile="0.9"} 3.223e-06 |
||||
event_duration_seconds_total{baz="result_append",quantile="0.99"} 6.53e-06 |
||||
event_duration_seconds_total_sum{baz="result_append"} 4.404109951000078 |
||||
event_duration_seconds_total_count{baz="result_append"} 1.427647e+06 |
||||
event_duration_seconds_total{baz="result_sort",quantile="0.5"} 1.847e-06 |
||||
event_duration_seconds_total{baz="result_sort",quantile="0.9"} 2.975e-06 |
||||
event_duration_seconds_total{baz="result_sort",quantile="0.99"} 4.08e-06 |
||||
event_duration_seconds_total_sum{baz="result_sort"} 3.4123187829998307 |
||||
event_duration_seconds_total_count{baz="result_sort"} 1.427647e+06 |
||||
@ -0,0 +1,20 @@ |
||||
# HELP node_textfile_mtime Unixtime mtime of textfiles successfully read. |
||||
# TYPE node_textfile_mtime gauge |
||||
node_textfile_mtime{file="metrics.prom"} 1 |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 0 |
||||
# HELP prometheus_rule_evaluation_duration_seconds The duration for a rule to execute. |
||||
# TYPE prometheus_rule_evaluation_duration_seconds summary |
||||
prometheus_rule_evaluation_duration_seconds{handler="",rule_type="alerting",quantile="0.9"} 0.001765451 |
||||
prometheus_rule_evaluation_duration_seconds{handler="",rule_type="alerting",quantile="0.99"} 0.018672076 |
||||
prometheus_rule_evaluation_duration_seconds_sum{handler="",rule_type="alerting"} 214.85081044700146 |
||||
prometheus_rule_evaluation_duration_seconds_count{handler="",rule_type="alerting"} 185209 |
||||
prometheus_rule_evaluation_duration_seconds{handler="",rule_type="recording",quantile="0.5"} 4.3132e-05 |
||||
prometheus_rule_evaluation_duration_seconds{handler="",rule_type="recording",quantile="0.9"} 8.9295e-05 |
||||
prometheus_rule_evaluation_duration_seconds{handler="",rule_type="recording",quantile="0.99"} 0.000193657 |
||||
prometheus_rule_evaluation_duration_seconds_sum{handler="",rule_type="recording"} 185091.01317759082 |
||||
prometheus_rule_evaluation_duration_seconds_count{handler="",rule_type="recording"} 1.0020195e+08 |
||||
prometheus_rule_evaluation_duration_seconds{handler="foo",rule_type="alerting",quantile="0.5"} 0.000571464 |
||||
prometheus_rule_evaluation_duration_seconds_sum{handler="foo",rule_type="alerting"} 0 |
||||
prometheus_rule_evaluation_duration_seconds_count{handler="foo",rule_type="alerting"} 0 |
||||
@ -0,0 +1,12 @@ |
||||
# HELP prometheus_rule_evaluation_duration_seconds The duration for a rule to execute. |
||||
# TYPE prometheus_rule_evaluation_duration_seconds summary |
||||
prometheus_rule_evaluation_duration_seconds{rule_type="alerting",quantile="0.5", handler="foo"} 0.000571464 |
||||
prometheus_rule_evaluation_duration_seconds{rule_type="alerting",quantile="0.9"} 0.001765451 |
||||
prometheus_rule_evaluation_duration_seconds{rule_type="alerting",quantile="0.99"} 0.018672076 |
||||
prometheus_rule_evaluation_duration_seconds_sum{rule_type="alerting"} 214.85081044700146 |
||||
prometheus_rule_evaluation_duration_seconds_count{rule_type="alerting"} 185209 |
||||
prometheus_rule_evaluation_duration_seconds{rule_type="recording",quantile="0.5"} 4.3132e-05 |
||||
prometheus_rule_evaluation_duration_seconds{rule_type="recording",quantile="0.9"} 8.9295e-05 |
||||
prometheus_rule_evaluation_duration_seconds{rule_type="recording",quantile="0.99"} 0.000193657 |
||||
prometheus_rule_evaluation_duration_seconds_sum{rule_type="recording"} 185091.01317759082 |
||||
prometheus_rule_evaluation_duration_seconds_count{rule_type="recording"} 1.0020195e+08 |
||||
@ -1,79 +1,19 @@ |
||||
name: "node_textfile_mtime" |
||||
help: "Unixtime mtime of textfiles successfully read." |
||||
type: GAUGE |
||||
metric: < |
||||
label: < |
||||
name: "file" |
||||
value: "metrics1.prom" |
||||
> |
||||
gauge: < |
||||
value: 1 |
||||
> |
||||
> |
||||
metric: < |
||||
label: < |
||||
name: "file" |
||||
value: "metrics2.prom" |
||||
> |
||||
gauge: < |
||||
value: 2 |
||||
> |
||||
> |
||||
name: "node_textfile_scrape_error" |
||||
help: "1 if there was an error opening or reading a file, 0 otherwise" |
||||
type: GAUGE |
||||
metric: < |
||||
gauge: < |
||||
value: 0 |
||||
> |
||||
> |
||||
name: "testmetric1_1" |
||||
help: "Metric read from fixtures/textfile/two_metric_files/metrics1.prom" |
||||
type: UNTYPED |
||||
metric: < |
||||
label: < |
||||
name: "foo" |
||||
value: "bar" |
||||
> |
||||
untyped: < |
||||
value: 10 |
||||
> |
||||
> |
||||
name: "testmetric1_2" |
||||
help: "Metric read from fixtures/textfile/two_metric_files/metrics1.prom" |
||||
type: UNTYPED |
||||
metric: < |
||||
label: < |
||||
name: "foo" |
||||
value: "baz" |
||||
> |
||||
untyped: < |
||||
value: 20 |
||||
> |
||||
> |
||||
name: "testmetric2_1" |
||||
help: "Metric read from fixtures/textfile/two_metric_files/metrics2.prom" |
||||
type: UNTYPED |
||||
metric: < |
||||
label: < |
||||
name: "foo" |
||||
value: "bar" |
||||
> |
||||
untyped: < |
||||
value: 30 |
||||
> |
||||
timestamp_ms: 1441205977284 |
||||
> |
||||
name: "testmetric2_2" |
||||
help: "Metric read from fixtures/textfile/two_metric_files/metrics2.prom" |
||||
type: UNTYPED |
||||
metric: < |
||||
label: < |
||||
name: "foo" |
||||
value: "baz" |
||||
> |
||||
untyped: < |
||||
value: 40 |
||||
> |
||||
timestamp_ms: 1441205977284 |
||||
> |
||||
# HELP node_textfile_mtime Unixtime mtime of textfiles successfully read. |
||||
# TYPE node_textfile_mtime gauge |
||||
node_textfile_mtime{file="metrics1.prom"} 1 |
||||
node_textfile_mtime{file="metrics2.prom"} 1 |
||||
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise |
||||
# TYPE node_textfile_scrape_error gauge |
||||
node_textfile_scrape_error 0 |
||||
# HELP testmetric1_1 Metric read from fixtures/textfile/two_metric_files/metrics1.prom |
||||
# TYPE testmetric1_1 untyped |
||||
testmetric1_1{foo="bar"} 10 |
||||
# HELP testmetric1_2 Metric read from fixtures/textfile/two_metric_files/metrics1.prom |
||||
# TYPE testmetric1_2 untyped |
||||
testmetric1_2{foo="baz"} 20 |
||||
# HELP testmetric2_1 Metric read from fixtures/textfile/two_metric_files/metrics2.prom |
||||
# TYPE testmetric2_1 untyped |
||||
testmetric2_1{foo="bar"} 30 |
||||
# HELP testmetric2_2 Metric read from fixtures/textfile/two_metric_files/metrics2.prom |
||||
# TYPE testmetric2_2 untyped |
||||
testmetric2_2{foo="baz"} 40 |
||||
|
||||
Loading…
Reference in new issue