Skip to content

Commit dd83d96

Browse files
authored
Merge pull request #3 from dreitier/feature/add-bucket-usage-total-metric
Feature/add bucket usage total metric
2 parents a149484 + e10ffc8 commit dd83d96

File tree

9 files changed

+332
-224
lines changed

9 files changed

+332
-224
lines changed

.gitignore

100644100755
File mode changed.

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
run:
2+
npm start

docs/10-deployment/20-helm-chart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ We provide a [Helm chart for backmon](https://github.com/dreitier/helm-charts/).
55
You can either use that repository and install the helm chart with
66

77
```bash
8-
$ git clone https://github.com/dreitier/helm-charts/`
8+
$ git clone https://github.com/dreitier/helm-charts/
99
$ cd helm-charts/charts/backmon
1010
$ helm install backmon
1111
```

docs/20-reference/10-backmon-configuration/01-overview.md

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ environments:
5555
- "/regular_ex.*ssions_are_supported/"
5656
all_others: exclude
5757
env_2:
58-
access_key_id: my_access_key_id
59-
secret_access_key: my_secret_access_key
60-
auto_discover_disks: true
58+
s3:
59+
access_key_id: my_access_key_id
60+
secret_access_key: my_secret_access_key
61+
auto_discover_disks: true
6162
disks:
6263
include:
6364
- my-bucket-1
@@ -70,31 +71,33 @@ environments:
7071

7172
## Available configuration keys
7273

73-
| Key | Default | Required | Description |
74-
|------------------------------------------|-------------------------------------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
75-
| `port` | `80` (*int*) | No | Default HTTP port to listen for requests. TLS is not supported at the moment. Consider using a proxy if you need encryption. |
76-
| `update_interval` | `1h` (*duration*) | No | Checks each disk in that duration interval. [time.ParseDuration format](https://pkg.go.dev/time#example-ParseDuration) must be used. |
77-
| `log_level` | `<empty>` (*one of `debug`, `info`*) | No | Used log level; will be overwritten if `--debug` is used. |
78-
| `downloads.enabled` | `false` | No | If `true`, the latest artifact of a monitored backup disk can be downloaded. This is disabled by default for security reasons ([#1](https://github.com/dreitier/backmon/issues/1)). |
79-
| `http.basic_auth.username` | `<empty>` (*string*) | No | Username for HTTP Basic Authentication. If this is set, `http.basic_auth.password` must be also set. |
80-
| `http.basic_auth.password` | `<empty>` (*string*) | No | Password for HTTP Basic Authentication. If this is set, `http.basic_auth.username` must be also set. |
81-
| `http.tls.certificate` | `<empty>` (*string*) | No | Path to certificate file. If this is set, `http.tls.key` must be also set. |
82-
| `http.tls.key` | `<empty>` (*string*) | No | Path to private key file. If this is set, `http.tls.certificate` must be also set. |
83-
| `http.tls.strict` | `false` (*bool*) | No | If set to true, a preferred TLS default configuration is used. |
84-
| `environments` | `<empty>` (*list of environment*) | No | Each `environment` to check. |
85-
| `environments[]` | `<empty>` (*string*) | __Yes__ | Name of environment. |
86-
| `environments[$env].definitions` | `backup_definitions.yaml` (*string*) | No | YAML file containing the backup definitions. |
87-
| `environments[$env].path` | `<empty>` (*string*) | No | Local path to check for. If you use the `path` parameter, other parameters specific for S3 are ignored. |
88-
| `environments[$env].region` | `eu-central-1` (*string*) | No | AWS region |
89-
| `environments[$env].force_path_style` | `false` (*bool*) | No | Use path-style for that S3 bucket. This is deprecated by AWS S3 and should be probably `false`. |
90-
| `environments[$env].access_key_id` | `<empty>` (*string*) | __Yes__ | AWS Access Key |
91-
| `environments[$env].secret_access_key` | `<empty>` (*string*) | __Yes__ | AWS Secret Access Key |
92-
| `environments[$env].endpoint` | `<empty>` (*string*) | No | Custom AWS S3 endpoint. This must be used for Minio buckets or if you are using a local S3 instance. |
93-
| `environments[$env].token` | `<empty>` (*string*) | No | AWS STS session token. You can leave that empty. |
94-
| `environments[$env].auto_discover_disks` | `true` (*bool*) | No | Automatically iterate over each S3 bucket. |
95-
| `environments[$env].disks.include` | `<empty>` (*list of strings*) | No | Only include the disks with the given name; case-sensitive; regular expressions are supported. |
96-
| `environments[$env].disks.exclude` | `<empty>` (*list of strings*) | No | Only include the disks with the given name; case-sensitive; regular expressions are supported. |
97-
| `environments[$env].disks.all_others` | `include` (*one of `include`, `exclude`*) | No | Behaviour for disks which are not explicitly included or excluded. |
74+
| Key | Default | Required | Description |
75+
|---------------------------------------------|-------------------------------------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
76+
| `port` | `80` (*int*) | No | Default HTTP port to listen for requests. TLS is not supported at the moment. Consider using a proxy if you need encryption. |
77+
| `update_interval` | `1h` (*duration*) | No | Checks each disk in that duration interval. [time.ParseDuration format](https://pkg.go.dev/time#example-ParseDuration) must be used. |
78+
| `log_level` | `<empty>` (*one of `debug`, `info`*) | No | Used log level; will be overwritten if `--debug` is used. |
79+
| `downloads.enabled` | `false` | No | If `true`, the latest artifact of a monitored backup disk can be downloaded. This is disabled by default for security reasons ([#1](https://github.com/dreitier/backmon/issues/1)). |
80+
| `http.basic_auth.username` | `<empty>` (*string*) | No | Username for HTTP Basic Authentication. If this is set, `http.basic_auth.password` must be also set. |
81+
| `http.basic_auth.password` | `<empty>` (*string*) | No | Password for HTTP Basic Authentication. If this is set, `http.basic_auth.username` must be also set. |
82+
| `http.tls.certificate` | `<empty>` (*string*) | No | Path to certificate file. If this is set, `http.tls.key` must be also set. |
83+
| `http.tls.key` | `<empty>` (*string*) | No | Path to private key file. If this is set, `http.tls.certificate` must be also set. |
84+
| `http.tls.strict` | `false` (*bool*) | No | If set to true, a preferred TLS default configuration is used. |
85+
| `environments` | `<empty>` (*list of environment*) | No | Each `environment` to check. |
86+
| `environments[]` | `<empty>` (*string*) | __Yes__ | Name of environment. |
87+
| `environments[$env].definitions` | `backup_definitions.yaml` (*string*) | No | YAML file containing the backup definitions. |
88+
| `environments[$env].path` | `<empty>` (*string*) | No | Local path to check for. If you use the `path` parameter, other parameters specific for S3 are ignored. |
89+
| `environments[$env].s3.region` | `eu-central-1` (*string*) | No | AWS region |
90+
| `environments[$env].s3.access_key_id` | `<empty>` (*string*) | __Yes__ | AWS Access Key |
91+
| `environments[$env].s3.secret_access_key` | `<empty>` (*string*) | __Yes__ | AWS Secret Access Key |
92+
| `environments[$env].s3.endpoint` | `<empty>` (*string*) | No | Custom AWS S3 endpoint. This must be used for Minio buckets or if you are using a local S3 instance. |
93+
| `environments[$env].s3.force_path_style` | `false` (*bool*) | No | Use path-style for that S3 bucket. This is deprecated by AWS S3 and should be probably `false`. |
94+
| `environments[$env].s3.insecure` | `false` (*bool*) | No | Whether to use HTTP or HTTPS to access the S3 endpoint. This is intended primarily for accessing a local S3 endpoint like MinIO. |
95+
| `environments[$env].s3.tls_skip_verify` | `false` (*bool*) | No | Whether to verify the X.509 certificated presented by the S3 endpoint. This is intended primarily for accessing a local S3 endpoint which uses a self signed certificate |
96+
| `environments[$env].s3.token` | `<empty>` (*string*) | No | AWS STS session token. You can leave that empty. |
97+
| `environments[$env].s3.auto_discover_disks` | `true` (*bool*) | No | Automatically iterate over each S3 bucket. |
98+
| `environments[$env].disks.include` | `<empty>` (*list of strings*) | No | Only include the disks with the given name; case-sensitive; regular expressions are supported. |
99+
| `environments[$env].disks.exclude` | `<empty>` (*list of strings*) | No | Only include the disks with the given name; case-sensitive; regular expressions are supported. |
100+
| `environments[$env].disks.all_others` | `include` (*one of `include`, `exclude`*) | No | Behaviour for disks which are not explicitly included or excluded. |
98101

99102
## `disks`
100103

@@ -121,6 +124,6 @@ disks:
121124
```
122125
123126
:::info
124-
If you have set `environments[$env].auto_discover_disks` to `false`, only the `disks.include` configuration parameter
127+
If you have set `environments[$env].s3.auto_discover_disks` to `false`, only the `disks.include` configuration parameter
125128
makes any sense.
126129
:::

docs/20-reference/10-backmon-configuration/10-storage/20-aws-s3.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ environments:
1010
secret_access_key: my_secret_access_key
1111
```
1212
13+
For a full list of configuration option for the S3 provider see [`the corresponding section`](../01-overview.md#available-configuration-keys)
14+
1315
Your AWS account contains the following S3 buckets:
1416

1517
- `bucket-1`
@@ -158,4 +160,4 @@ backmon:
158160
- key: BACKMON_AWS_SECRET_ACCESS_KEY
159161
# replace ${SECRET_ACCESS_KEY} with the secret access key you noted down previously
160162
value: ${SECRET_ACCESS_KEY}
161-
```
163+
```

0 commit comments

Comments
 (0)