node_exporter/collector/fixtures/textfile
Pranshu Srivastava ebddab47e1
collector/textfile: Avoid inconsistent help-texts (#2962)
Avoid metrics with inconsistent help-texts. The earlier behaviour has
been preserved in the sense that the first encountered instance is still
used to generate metrics, whereas the subsequent inconsistent ones are
ignored along with a few peripheral changes.

```
 # HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.
 #TYPE node_scrape_collector_duration_seconds gauge
 node_scrape_collector_duration_seconds{collector="textfile"} 0.0004005
 # HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.
 # TYPE node_scrape_collector_success gauge
 node_scrape_collector_success{collector="textfile"} 1
 # HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.
 # TYPE node_textfile_mtime_seconds gauge
 node_textfile_mtime_seconds{file="/Users/rexagod/repositories/misc/node_exporter/ne-bar.prom"} 1.710812009e+09
 node_textfile_mtime_seconds{file="/Users/rexagod/repositories/misc/node_exporter/ne-foo.prom"} 1.710811982e+09
 # 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
 # HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.
 # TYPE promhttp_metric_handler_errors_total counter
 promhttp_metric_handler_errors_total{cause="encoding"} 0
 promhttp_metric_handler_errors_total{cause="gathering"} 0
 # HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
 # TYPE promhttp_metric_handler_requests_in_flight gauge
 promhttp_metric_handler_requests_in_flight 1
 # HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
 # TYPE promhttp_metric_handler_requests_total counter
 promhttp_metric_handler_requests_total{code="200"} 0
 promhttp_metric_handler_requests_total{code="500"} 0
 promhttp_metric_handler_requests_total{code="503"} 0
 # HELP tau_infrastructure_performing_maintenance_task At what timestamp a given task started or stopped, the last time it was run.
 # TYPE tau_infrastructure_performing_maintenance_task gauge
 tau_infrastructure_performing_maintenance_task{main_task="nightly",start_or_stop="start",sub_task="main"} 1.64728080198446e+09
```

Fixes: #2317

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2024-03-24 06:43:03 +01:00
..
client_side_timestamp Treat custom textfile metric timestamps as errors (#769) 2018-02-27 19:43:38 +01:00
different_metric_types Filter out testfile metrics correctly when using collect[] filters (#763) 2017-12-23 20:21:58 +01:00
histogram Filter out testfile metrics correctly when using collect[] filters (#763) 2017-12-23 20:21:58 +01:00
histogram_extra_dimension Filter out testfile metrics correctly when using collect[] filters (#763) 2017-12-23 20:21:58 +01:00
inconsistent_metrics Filter out testfile metrics correctly when using collect[] filters (#763) 2017-12-23 20:21:58 +01:00
metrics_merge_different_help Merge metrics descriptions in textfile collector (#2475) 2022-09-20 12:49:21 +02:00
metrics_merge_empty_help Merge metrics descriptions in textfile collector (#2475) 2022-09-20 12:49:21 +02:00
metrics_merge_no_help Merge metrics descriptions in textfile collector (#2475) 2022-09-20 12:49:21 +02:00
metrics_merge_same_help Merge metrics descriptions in textfile collector (#2475) 2022-09-20 12:49:21 +02:00
no_metric_files Fix mtime reporting in textfile collector, add tests. 2015-09-04 15:42:44 +02:00
summary Filter out testfile metrics correctly when using collect[] filters (#763) 2017-12-23 20:21:58 +01:00
summary_extra_dimension Filter out testfile metrics correctly when using collect[] filters (#763) 2017-12-23 20:21:58 +01:00
two_metric_files Treat custom textfile metric timestamps as errors (#769) 2018-02-27 19:43:38 +01:00
client_side_timestamp.out Treat custom textfile metric timestamps as errors (#769) 2018-02-27 19:43:38 +01:00
different_metric_types.out collector: Unwrap glob textfile directories (#1985) 2021-10-18 14:05:21 +02:00
glob_extra_dimension.out collector: Unwrap glob textfile directories (#1985) 2021-10-18 14:05:21 +02:00
histogram.out collector: Unwrap glob textfile directories (#1985) 2021-10-18 14:05:21 +02:00
histogram_extra_dimension.out collector: Unwrap glob textfile directories (#1985) 2021-10-18 14:05:21 +02:00
inconsistent_metrics.out collector: Unwrap glob textfile directories (#1985) 2021-10-18 14:05:21 +02:00
metrics_merge_different_help.out collector/textfile: Avoid inconsistent help-texts (#2962) 2024-03-24 06:43:03 +01:00
metrics_merge_empty_help.out Merge metrics descriptions in textfile collector (#2475) 2022-09-20 12:49:21 +02:00
metrics_merge_no_help.out Merge metrics descriptions in textfile collector (#2475) 2022-09-20 12:49:21 +02:00
metrics_merge_same_help.out Merge metrics descriptions in textfile collector (#2475) 2022-09-20 12:49:21 +02:00
no_metric_files.out Filter out testfile metrics correctly when using collect[] filters (#763) 2017-12-23 20:21:58 +01:00
nonexistent_path.out Filter out testfile metrics correctly when using collect[] filters (#763) 2017-12-23 20:21:58 +01:00
summary.out collector: Unwrap glob textfile directories (#1985) 2021-10-18 14:05:21 +02:00
summary_extra_dimension.out collector: Unwrap glob textfile directories (#1985) 2021-10-18 14:05:21 +02:00
two_metric_files.out collector: Unwrap glob textfile directories (#1985) 2021-10-18 14:05:21 +02:00