It's all about how to send POST request and process the result in telegraf
Created
January 14, 2022 02:02
-
-
Save longtian/88e5985e51059e1ed1b2c270a8908735 to your computer and use it in GitHub Desktop.
Use telegraf http plugin to monitor dovecot by requesting doveadm api
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[inputs.http]] | |
urls = ["http://dovecot:8085/doveadm/v1"] | |
name_override = "doveadm" | |
method = "POST" | |
username = "doveadm" | |
password = "********" | |
json_query = "0.1.0" | |
body = ''' | |
[ | |
["statsDump",{"type":"global"},"tag1"] | |
] | |
''' | |
data_format = "json" | |
json_string_fields = ["*"] | |
[[processors.converter]] | |
namepass = ["doveadm"] | |
[processors.converter.fields] | |
float = ["*"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment