!!!
The point is to modify the /etc/telegraf/telegraf.conf and to collect all information for all processes and after this to be able to have the metrics in Grafana.
doesn’t return nothing and it’s clear that is a normal behavior of telegraf if a process is not up.
What are your recommendation in order to not have multiple definitions in “/etc/telegraf/telegraf.conf” like below:
[[inputs.procstat]]
exe = "memcached"
prefix = “memcached”
[[inputs.procstat]]
exe = "ntpd"
prefix = “ntpd”
.
.
.
etc
—===—===—
could I use something else like below for all processes:
[[inputs.procstat]]
exe = "telegraf|.*"
prefix = ?
What to do for the processes where “pgrep process” will not reveal nothing like: pgrep kibana, pgrep elasticsearch?
If I’ll try “pgrep -u root, kibana; pgrep -u root, elasticsearch” then will be output there for process.
All apps are installed under root permission…
I’ve never used telegraf|.*, I looks like it would just match everything in which case it seems simpler to just use exe = ".*". If you collect all the processes in one plugin then it won’t be helpful to set a prefix. There is another more important issue with collecting all processes though: in order to avoid conflicts you must use pid_tag = true and due to the number of pids created on a normal system you will end up creating many series which add lot’s of strain on the Database. You might be able to solve this with a short retention policy, but you are better off monitoring a limited number of long running processes with this plugin.
I have a question that for the moment I don’t have a solution.
By default Telegraf will do a $ pgrep kibana, $ pgrep node_exporter but the thing is that if you have the below situation then it will be not relevant.
[root@server ~]# systemctl status kibana
● kibana.service - Kibana
Loaded: loaded (/etc/systemd/system/kibana.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2017-12-12 21:42:42 EET; 11h ago Main PID: 4206 (node)
CGroup: /system.slice/kibana.service
└─4206 /usr/share/kibana/bin/…/node/bin/node --no-warnings /usr/share/kibana/bin/…/src/cli -c /etc/kibana/kibana.yml
[root@server ~]# systemctl status node_exporter
● node_exporter.service - Node Exporter
Loaded: loaded (/etc/systemd/system/node_exporter.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2017-12-07 17:24:17 EET; 5 days ago Main PID: 581 (node_exporter)
CGroup: /system.slice/node_exporter.service
└─581 /root/Prometheus/node_exporter-0.15.0.linux-amd64/node_exporter