Sometimes, Telegraf emits the error log about the permission denied like once this collects the metrics against Docker container, etc.
This occurrence is due to Telegraf is not get authorization against the monitoring target applications.
Therefore, the routine that add Telegraf user into the root group has to be in after install Telegraf.
Like below,
$ salt \server01-vm01.snetsystems.com group.adduser root telegraf
server01-vm01.snetsystems.com:
True
{
"token": "c7d94d708185dbe550cac551985e060783458b774f6dad0d6fb59057af26d9e5",
"eauth": "pam",
"client": "local",
"tgt": "server01-vm01.snetsystems.com",
"fun": "group.adduser",
"arg": [
"root",
"telegraf"
]
}
# Reponse
{
"return": [
{
"server01-vm01.snetsystems.com": true
}
]
}
# In target minion,
$ lid -g root
root(uid=0)
sync(uid=5)
shutdown(uid=6)
halt(uid=7)
operator(uid=11)
telegraf(uid=997)