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

batch mode output doesn't match nagios or regular output #231

Closed
anarcat opened this issue Jan 26, 2022 · 0 comments · Fixed by #232
Closed

batch mode output doesn't match nagios or regular output #231

anarcat opened this issue Jan 26, 2022 · 0 comments · Fixed by #232

Comments

@anarcat
Copy link
Contributor

anarcat commented Jan 26, 2022

here's an example:

root@meronense:~# needrestart 
Scanning processes...                                                                                                                                                                          
Scanning candidates...                                                                                                                                                                         
Scanning linux images...                                                                                                                                                                       

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

User sessions running outdated binaries:
 metabase @ user manager service: systemd[729]
 root @ session #28017: start-web.sh[17485]

... so there's some stuff to restart here. Nagios confirms it:

root@meronense:~# needrestart -p
CRIT - Kernel: 4.19.0-18-amd64, Services: none, Containers: none, Sessions: 2 (!!)|Kernel=0;0;;0;2 Services=0;;0;0 Containers=0;;0;0 Sessions=2;0;;0
Sessions:
- metabase @ user manager service
- root @ session #28017

... yet batch mode is merrily unaware of this, what gives?

root@meronense:~# needrestart -b
NEEDRESTART-VER: 3.4
NEEDRESTART-KCUR: 4.19.0-18-amd64
NEEDRESTART-KEXP: 4.19.0-18-amd64
NEEDRESTART-KSTA: 1

maybe tied to #230, but i couldn't figure out extra options that would make the user sessions show up in batch mode, so i don't believe it's a documentation problem. feels more like a bug.

anarcat added a commit to anarcat/needrestart that referenced this issue Jan 26, 2022
The user sessions present in the normal and nagios output is
mysteriously missing from the batch output. This remedies that
limitation by reusing the user-readable output from the Nagios output.

We also update the README.batch documentation, but that's still
lacking a little, see liske#230.

Closes: liske#231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant