diff options
author | Ben Kochie <superq@gmail.com> | 2018-02-27 19:46:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 19:46:01 +0100 |
commit | 483f59d1102cd83a1547d59d997cf6571801e196 (patch) | |
tree | 1727ec3ec2d52bf7acaff62eee1d4f642f452731 /text_collector_examples | |
parent | 864a6ee93578f22843d276d008d83a2c82af5f1d (diff) | |
download | prometheus_node_collector-483f59d1102cd83a1547d59d997cf6571801e196.tar.bz2 prometheus_node_collector-483f59d1102cd83a1547d59d997cf6571801e196.tar.xz prometheus_node_collector-483f59d1102cd83a1547d59d997cf6571801e196.zip |
Document use of atomic wrapper (#781)
Document how to use `sponge` to atomic update textfiles.
Diffstat (limited to 'text_collector_examples')
-rw-r--r-- | text_collector_examples/README.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/text_collector_examples/README.md b/text_collector_examples/README.md index 540c3dd..f47b37d 100644 --- a/text_collector_examples/README.md +++ b/text_collector_examples/README.md | |||
@@ -3,5 +3,13 @@ | |||
3 | These scripts are examples to be used with the Node Exporter Textfile | 3 | These scripts are examples to be used with the Node Exporter Textfile |
4 | Collector. | 4 | Collector. |
5 | 5 | ||
6 | To use these scripts, we recommend using a `sponge` to atomically write the output. | ||
7 | |||
8 | <collector_script> | sponge <output_file> | ||
9 | |||
10 | Sponge comes from [moreutils](https://joeyh.name/code/moreutils/) | ||
11 | * [brew install moreutils](http://brewformulas.org/Moreutil) | ||
12 | * [apt install moreutils](https://packages.debian.org/search?keywords=moreutils) | ||
13 | |||
6 | For more information see: | 14 | For more information see: |
7 | https://github.com/prometheus/node_exporter#textfile-collector | 15 | https://github.com/prometheus/node_exporter#textfile-collector |