Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

procstat input plugin: notifying if process is dead or not found #3936

Closed
arindamchoudhury opened this issue Mar 26, 2018 · 3 comments
Closed
Labels
area/procstat feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Milestone

Comments

@arindamchoudhury
Copy link

Current behavior:

Error is logged in telegraf log file.

Desired behavior:

A metric field to monitor the error using the output.

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

It will be helpful for monitoring.

@russorat russorat added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin area/procstat labels Mar 26, 2018
@russorat
Copy link
Contributor

@arindamchoudhury thanks for the report. We will look into adding this. If you'd like to take a stab at it and submit a PR, that would be awesome!

@danielnelson
Copy link
Contributor

We have a related pull request #2687, but we aren't sure how we would structure the metrics in all cases, let's make sure we hammer out how the output should look before we write any code.

The obvious solution of adding a new field has some limitations, one issue is that some process search methods, such as pattern = ".*" return a dynamic list of processes. In this case it is probably better for the series to be removed instead of attempting to report an error, because it wouldn't be clear when the process is gone.

Another issue is that when tag_pid = true, the plugin outputs a line like this:

procstat,exe=dnsmasq,pid=44979 cpu_user=0.14,cpu_system=0.07

If the process is not running, there is no pid, and you wouldn't be able to output a point to this series, again this be even more strange if you have multiple processes.

Perhaps a better solution than adding a new field is to have add a new measurement that summarizes the number of processes added, something like these:

procstat_processes,exe=dnsmasq found=1i
procstat_processes,pattern=.* found=7i

@danielnelson danielnelson added this to the 1.8.0 milestone Aug 13, 2018
@danielnelson
Copy link
Contributor

Closed in #4307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/procstat feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

No branches or pull requests

3 participants