|
1 | 1 | # Prometheus Folder size Exporter
|
2 | 2 |
|
3 |
| -[](LICENSE) [](https://img.shields.io/badge/stability-alpha-yellow.svg) |
| 3 | +[](LICENSE) |
| 4 | + |
4 | 5 |
|
5 | 6 | [](https://crates.io/crates/prometheus_folder_size_exporter) [](https://crates.io/crates/prometheus_folder_size_exporter) [](https://crates.io/crates/prometheus_folder_size_exporter)
|
6 | 7 |
|
7 |
| -[](https://github.com/MindFlavor/prometheus_folder_size_exporter/tree/0.1.1) |
8 |
| -[](https://github.com/MindFlavor/prometheus_folder_size_exporter/tree/0.1.1) |
9 |
| -[](https://img.shields.io/github/commits-since/mindflavor/prometheus_folder_size_exporter/0.1.1.svg) |
| 8 | +[](https://github.com/MindFlavor/prometheus_folder_size_exporter/releases/tag/0.3.0) |
| 9 | +[](https://img.shields.io/github/commits-since/mindflavor/prometheus_folder_size_exporter/0.3.0.svg) |
10 | 10 |
|
11 | 11 | ## Intro
|
12 | 12 |
|
@@ -46,7 +46,14 @@ Once started, the tool will listen on the specified port (or the default one, 99
|
46 | 46 |
|
47 | 47 | ### JSON configuration file
|
48 | 48 |
|
49 |
| -The json is very simple, it's just an array of obejcts with two mandatory fields: `path` and `recursive` and one optional `user`. `path` can be any valid path while `recursive` can be either `true` or `false`. If you specify `true`, the exporter will scan the folder contents recursively effectively giving you the folder tree size. `user` is an optional arbitrary label that will be passed to the output. For an example please refer to [example.json](example.json). |
| 49 | +Name | Valid values | Description |
| 50 | +-- | -- | -- |
| 51 | +`path` | Any valid path | The starting analysis path. |
| 52 | +`explode_depth` | Any positive number or -1 | This setting controls how deep the folder explosion will go. -1 means no limit. 0 means no explosion. |
| 53 | +`sum_remaining_subfolders` | `true` or `false` | This setting specifies if the last exploded folder size should include the subfolders. |
| 54 | + |
| 55 | +So, for example, to monitor a single folder set `explode_depth = 0` and pick `sum_remaining_subfolders` based on is you want the total folder + subfolder size or not. |
| 56 | +To monitor a folder and its first level subfolders you specify `explode_depth = 1`. |
50 | 57 |
|
51 | 58 | ### Systemd service file
|
52 | 59 |
|
|
0 commit comments