diff options
| -rw-r--r-- | README.md | 69 | ||||
| -rw-r--r-- | prometheus_borgmatic_exporter/__init__.py | 6 |
2 files changed, 41 insertions, 34 deletions
@@ -37,18 +37,25 @@ Usage: prometheus-borgmatic-exporter [OPTIONS] Options: --borgmatic-bin PATH Path to the borgmatic executable. [default: /usr/bin/borgmatic] - --borgmatic-config PATH Path to the borgmatic configuration file. - [default: /etc/borgmatic/config.yaml] - --textfile-collector-dir PATH Directory where the .prom file will be - written. + --borgmatic-config PATH Configuration file or directory. Can be + specified multiple times. If not + specified, borgmatic's default + configuration discovery is used. + --textfile-collector-dir PATH Directory where the Prometheus collector + textfile file will be written. [default: /var/lib/prometheus/node-exporter] - --all-archives Collect metrics for all archives, not just - the latest. Significantly slower for large - repositories. + --all-archives Collect metrics for all archives instead + of only the latest archive. This can + significantly increase runtime and + Prometheus storage usage. -q, --quiet Suppress all non-error output. -v, --verbose Enable verbose output. - --color / --no-color Force or disable colored output. --version Show version information and exit. + --color [auto|always|never] Colorize the output. A bare --color is + the same as --color=always. + [default: auto] + --no-color Disable colorization (alias of + --color=never). -h, --help, -? Show this message and exit. ``` @@ -58,39 +65,39 @@ All metrics carry the labels `repository_id`, `repository_label`, and `location` ### Repository metrics -| Metric | Description | -|--------|-------------| -| `borg_total_chunks` | Total number of chunks across all archives | -| `borg_total_compressed_size_bytes` | Total compressed size of all chunks | -| `borg_total_original_size_bytes` | Total original size of all chunks | -| `borg_total_unique_chunks` | Number of unique chunks (deduplicated) | -| `borg_total_deduplicated_compressed_size_bytes` | Compressed size of unique chunks | -| `borg_total_deduplicated_size_bytes` | Original size of unique chunks | -| `borg_last_modified_timestamp_seconds` | Unix timestamp of last repository modification | -| `borg_archives` | Total number of archives in the repository | -| `borg_repository_encryption_info` | Encryption mode as an info metric | +| Metric | Description | +| ----------------------------------------------- | ---------------------------------------------- | +| `borg_total_chunks` | Total number of chunks across all archives | +| `borg_total_compressed_size_bytes` | Total compressed size of all chunks | +| `borg_total_original_size_bytes` | Total original size of all chunks | +| `borg_total_unique_chunks` | Number of unique chunks (deduplicated) | +| `borg_total_deduplicated_compressed_size_bytes` | Compressed size of unique chunks | +| `borg_total_deduplicated_size_bytes` | Original size of unique chunks | +| `borg_last_modified_timestamp_seconds` | Unix timestamp of last repository modification | +| `borg_archives` | Total number of archives in the repository | +| `borg_repository_encryption_info` | Encryption mode as an info metric | ### Latest archive metrics -| Metric | Description | -|--------|-------------| -| `borg_latest_archive_compressed_size_bytes` | Compressed size of the latest archive | +| Metric | Description | +| --------------------------------------------- | --------------------------------------- | +| `borg_latest_archive_compressed_size_bytes` | Compressed size of the latest archive | | `borg_latest_archive_deduplicated_size_bytes` | Deduplicated size of the latest archive | -| `borg_latest_archive_files_total` | Number of files in the latest archive | -| `borg_latest_archive_original_size_bytes` | Original size of the latest archive | -| `borg_latest_archive_duration_seconds` | Duration of the latest archive creation | +| `borg_latest_archive_files_total` | Number of files in the latest archive | +| `borg_latest_archive_original_size_bytes` | Original size of the latest archive | +| `borg_latest_archive_duration_seconds` | Duration of the latest archive creation | ### Per-archive metrics (--all-archives only) These metrics additionally carry `archive_id` and `archive_name` labels. -| Metric | Description | -|--------|-------------| -| `borg_archive_compressed_size_bytes` | Compressed size of the archive | +| Metric | Description | +| -------------------------------------- | -------------------------------- | +| `borg_archive_compressed_size_bytes` | Compressed size of the archive | | `borg_archive_deduplicated_size_bytes` | Deduplicated size of the archive | -| `borg_archive_files_total` | Number of files in the archive | -| `borg_archive_original_size_bytes` | Original size of the archive | -| `borg_archive_duration_seconds` | Duration of the archive creation | +| `borg_archive_files_total` | Number of files in the archive | +| `borg_archive_original_size_bytes` | Original size of the archive | +| `borg_archive_duration_seconds` | Duration of the archive creation | ## License diff --git a/prometheus_borgmatic_exporter/__init__.py b/prometheus_borgmatic_exporter/__init__.py index 373d8ca..2cfcce5 100644 --- a/prometheus_borgmatic_exporter/__init__.py +++ b/prometheus_borgmatic_exporter/__init__.py @@ -354,7 +354,7 @@ def collect_archive_metrics( path_type=Path, ), default="/var/lib/prometheus/node-exporter", - help="Directory where the Prometheus textfile collector file is written.", + help="Directory where the Prometheus collector textfile will be written.", ) @click.option( "--all-archives", @@ -372,7 +372,7 @@ def collect_archive_metrics( "quiet_flag", is_flag=True, default=False, - help="Suppress normal output.", + help="Suppress all non-error output.", ) @click.option( "-v", @@ -389,7 +389,7 @@ def collect_archive_metrics( callback=print_version, default=False, expose_value=False, - help="Show the version and exit.", + help="Show version information and exit.", is_eager=True, is_flag=True, ) |
