srvstatus
srvstatus copied to clipboard
problem when getting status of user service
Hi, I really like this project. However, when I run telegraf in local as:
$ sudo systemctl start telegraf
Then telegraf was started by user "telegraf". As a result, telegraf was not able to get services started by other by this line in service.py
out = subprocess.Popen(["systemctl", "--user", "status", service], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) # NOQA
Do you have any idea about this problem? Thanks advance
Hi @hsnuhayato, I'll try to reproduce this tomorrow, and will see. I guess the problem is in privileges user telegraf may not have rights to access some files, but will check this.