Update permission docs on postfix input (#7255)

This commit is contained in:
Daniel Nelson 2020-04-03 10:09:24 -07:00 committed by GitHub
parent 6445e775cf
commit fb0fee0fbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 9 deletions

View File

@ -2,7 +2,10 @@
The postfix plugin reports metrics on the postfix queues. The postfix plugin reports metrics on the postfix queues.
For each of the active, hold, incoming, maildrop, and deferred queues (http://www.postfix.org/QSHAPE_README.html#queues), it will report the queue length (number of items), size (bytes used by items), and age (age of oldest item in seconds). For each of the active, hold, incoming, maildrop, and deferred queues
(http://www.postfix.org/QSHAPE_README.html#queues), it will report the queue
length (number of items), size (bytes used by items), and age (age of oldest
item in seconds).
### Configuration ### Configuration
@ -13,12 +16,15 @@ For each of the active, hold, incoming, maildrop, and deferred queues (http://ww
# queue_directory = "/var/spool/postfix" # queue_directory = "/var/spool/postfix"
``` ```
#### Permissions: #### Permissions
Telegraf will need read access to the files in the queue directory. You may Telegraf will need read access to the files in the queue directory. You may
need to alter the permissions of these directories to provide access to the need to alter the permissions of these directories to provide access to the
telegraf user. telegraf user.
This can be setup either using standard unix permissions or with Posix ACLs,
you will only need to use one method:
Unix permissions: Unix permissions:
```sh ```sh
$ sudo chgrp -R telegraf /var/spool/postfix/{active,hold,incoming,deferred} $ sudo chgrp -R telegraf /var/spool/postfix/{active,hold,incoming,deferred}
@ -29,21 +35,20 @@ $ sudo chmod g+r /var/spool/postfix/maildrop
Posix ACL: Posix ACL:
```sh ```sh
$ sudo setfacl -m g:telegraf:rX /var/spool/postfix/{,active,hold,incoming,deferred,maildrop} $ sudo setfacl -Rm g:telegraf:rX /var/spool/postfix/
$ sudo setfacl -Rdm g:telegraf:rX /var/spool/postfix/{,active,hold,incoming,deferred,maildrop} $ sudo setfacl -dm g:telegraf:rX /var/spool/postfix/
``` ```
### Measurements & Fields: ### Metrics
- postfix_queue - postfix_queue
- tags:
- queue
- fields:
- length (integer) - length (integer)
- size (integer, bytes) - size (integer, bytes)
- age (integer, seconds) - age (integer, seconds)
### Tags:
- postfix_queue
- queue
### Example Output ### Example Output