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

nagios plugin: easier to read overview output #227

Open
anarcat opened this issue Nov 24, 2021 · 3 comments
Open

nagios plugin: easier to read overview output #227

anarcat opened this issue Nov 24, 2021 · 3 comments

Comments

@anarcat
Copy link
Contributor

anarcat commented Nov 24, 2021

we have just switched from a home-made solution to needrestart for monitoring restarts, and we're quite happy with the results. one thing we're finding difficult to use, however, is that the overview summary is a little confusing.

for example, say we have:

WARN - Kernel: 4.19.0-18-amd64, Services: 1 (!), Containers: none, Sessions: none

Now I know this means there are two services to restart, but it's not really obvious. I need to "scan" for the (!) symbol to see where the problem is. I think a much easier to read version would simply be:

WARN - Services: 1

... or, even better:

WARN - Services 1 (gitlab-runner.service)

... yes, actually listing the services in there. I understand there are space constraints, but the way we use needrestart, it actually restarts most stuff on its own and it's only a handful of small things that need to be restarted by hand.

I've looked at the source to implement this and it's not super trivial, but should be possible. I figured I would ask here before working on a PR.

Thanks!

@anarcat
Copy link
Contributor Author

anarcat commented Jan 26, 2022

ping? would you be open to a PR for this?

@liske liske added this to the v3.6 milestone Jan 27, 2022
@liske
Copy link
Owner

liske commented Jan 27, 2022

Improving the status line sounds like a good idea (I don't use the nagios plugin at all). Your first proposal looks good. The list of services could be enabled by a cli parameter (something like the max. # of services to be shown, defaulting to 0?).

I would accept such a PR!

@liske
Copy link
Owner

liske commented Jan 27, 2022

Adding an option to print service list would solve #154.

@liske liske removed this from the v3.6 milestone May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants