Skip to content

Commit

Permalink
Merge pull request #199 from vinted/feature/exporter-metrics-namespac…
Browse files Browse the repository at this point in the history
…e-doc

Add documentation for exporter_metrics_namespace flag
  • Loading branch information
ernestas-vinted authored Oct 31, 2023
2 parents 26a5a7e + e864958 commit 4133e98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ $ docker run --network=host -it vinted/elasticsearch_exporter --elasticsearch_ur
- Configurable global polling interval (flag `exporter_poll_default_interval`)
- Configurable per metric polling interval (flag `exporter_poll_intervals`)
- Configurable metrics collection (flag `exporter_metrics_enabled`)
- Configurable metrics namespace (flag `exporter_metrics_namespace`): metrics will be prefixed with custom namespace instead of `elasticsearch`
- Configurable metadata collection (flag `exporter_metadata_refresh_interval`)


Expand Down Expand Up @@ -176,6 +177,7 @@ exporter_metrics_enabled:
- cat_indices: true
- nodes_info: true
- nodes_stats: true
exporter_metrics_namespace: elasticsearch
exporter_metadata_refresh_interval: 180s
exporter_metrics_lifetime_default_interval: 15s
exporter_metrics_lifetime_interval:
Expand Down
6 changes: 6 additions & 0 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,12 @@ impl fmt::Display for ExporterOptions {
&self.exporter_metrics_enabled,
);

output.push('\n');
output.push_str(&format!(
"exporter_metrics_namespace: {}",
self.exporter_metrics_namespace
));

output.push('\n');
output.push_str(&format!(
"exporter_metadata_refresh_interval: {:?}",
Expand Down

0 comments on commit 4133e98

Please sign in to comment.