-
Notifications
You must be signed in to change notification settings - Fork 133
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
NRPE not showing real output of check_apt #261
Comments
Hi @basd82, thanks for reaching out. I don't think NRPE does any caching of check results. If you're skeptical, you can look over the source code yourself. It's a fairly small program. The most likely cause for this issue is that you're running the plugin on two different machines and don't realize it - there are a few different situations where multiple machines (especially VMs) can think that they have the same IP address. If you haven't already, try using SSH from the check_nrpe machine into 172.31.1.250 and manually run check_apt from that terminal. If that still gets a different result from check_nrpe, troubleshooting gets a lot harder - maybe check the command configuration in nrpe.cfg? After that I'd probably be using gdb to attach to the running nrpe daemon, but that's pretty involved. |
I have exactly the same issue:
|
Here is the NRPE log:
|
Good to know i'm not The only one
Outlook voor Android<https://aka.ms/AAb9ysg> downloaden
…________________________________
From: Kevin Wincott ***@***.***>
Sent: Friday, June 24, 2022 5:59:26 PM
To: NagiosEnterprises/nrpe ***@***.***>
Cc: Bas van den Dikkenberg ***@***.***>; Mention ***@***.***>
Subject: Re: [NagiosEnterprises/nrpe] NRPE not showing real output of check_apt (Issue #261)
Here is the NRPE log:
[1656085752] CONN_CHECK_PEER: checking if host is allowed: 178.79.156.121 port 3275
[1656085752] Connection from 178.79.156.121 port 3275
[1656085752] is_an_allowed_host (AF_INET): is host >178.79.156.121< an allowed host >178.79.156.121<
[1656085752] is_an_allowed_host (AF_INET): host is in allowed host list!
[1656085752] Host address is in allowed_hosts
[1656085752] Host 178.79.156.121 is asking for command 'check_apt' to be run...
[1656085752] Running command: /usr/lib/nagios/plugins/check_apt -t 60
[1656085752] WARNING: my_system() seteuid(0): Operation not permitted
[1656085753] Command completed with return code 1 and output: APT WARNING: 7 packages available for upgrade (0 critical updates). |available_upgrades=7;;;0 critical_updates=0;;;0
[1656085753] Return Code: 1, Output: APT WARNING: 7 packages available for upgrade (0 critical updates). |available_upgrades=7;;;0 critical_updates=0;;;0
[1656085753] Connection from 178.79.156.121 closed.
—
Reply to this email directly, view it on GitHub<#261 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAJJY6OSVQ5XIPCJNDLOBMLVQXLN5ANCNFSM5W34KZCA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Issue is also with other check command's for example simple script that checks if a reboot is needed:
Strange sting is thats only with ubuntu 22.04 servers at my end |
Hi ! Did you find a workaround for this problem ? |
When i run the check_apt plug localy on a ubuntu 22.04 server i get:
/usr/lib/nagios/plugins/check_apt
APT OK: 0 packages available for upgrade (0 critical updates). |available_upgrades=0;;;0 critical_updates=0;;;0
when i run the the command with nrpe
/usr/local/nagios/libexec/check_nrpe -H 172.31.1.250 -c check_apt
APT WARNING: 2 packages available for upgrade (0 critical updates). |available_upgrades=2;;;0 critical_updates=0;;;0
it look liks nrpe does some caching ???
It works great on 20.04 but on 22.04 i have this.
After 1 or 2 days it reports correctly
version info
Server: nrpe Version: 4.0.3
client Version: 4.0.3
The text was updated successfully, but these errors were encountered: