influxdata/telegraf

Feature request: custom arguments to pgrep for procstat

Open

#2.505 geöffnet am 7. März 2017

Auf GitHub ansehen
 (4 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)Go (4.161 Forks)batch import
area/procstathelp wantedsize/m

Repository-Metriken

Stars
 (9.892 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 2T 12h) (136 gemergte PRs in 30 T)

Beschreibung

Proposal:

For advanced use cases, it would be nice to be able to provide custom arguments to the pgrep command used by the procstat input plugin.

Current behavior:

No such option

Desired behavior:

[[inputs.procstat]]
  pgrep = ["-w","-x","foo"]

Use case: [Why is this important (helps with prioritizing requests)]

In my specific use case, and in the example I gave above, we want -w so that we can monitor threads. We also need -x so that pgrep doesn't erroneously match the wrong process. The -x is just a nicety though, and we can match other ways. The important bit which we have no workaround for is the -w. But a generic way to provide custom arguments makes it more flexible so users can do whatever they want.

Ref: #1828 #1723 #932

Contributor Guide