NagiosEnterprises / nrpe

NRPE Agent
GNU General Public License v2.0
263 stars 133 forks source link

"Remote %s accepted a Version %s Packet", please add to debug #72

Closed jobst closed 7 years ago

jobst commented 7 years ago

Hi

When check_nrpe runs it fills the log quickly with "Remote %s accepted a Version %s Packet". There is no way to turn it off other then excluding it in source, then recompiling it. If you have lots of machines, the logs is filled quickly.

It would be nice if this would have a "debug" inclusion instead of printed all the time. It is useful when debugging and finding out which service is Version 2 or 3, but not all the time.

Jobst

jfrickson commented 7 years ago

(Mostly) fixed in branch 'maint' via commit https://github.com/NagiosEnterprises/nrpe/commit/08425ff922b71a108da8bd457a9c63c3a20c04c6.

Please read the commit comment for an explanation of what I did and why. If you don't care for the changes as they are, post a comment here.

cadtobias commented 7 years ago

Issue still persistent. I excluded the part in /src/check_nrpe.c and recompiled. Nevertheless tha issue persists. I even backported the Buster nagios-nrpe-server 3.1.1 package but issue also persists.

Any recommendation?

P.S. I recognize that commenting this ticket wasn't the proper way.

hedenface commented 7 years ago

@cadtobias I can look into this sometime today or tomorrow. I'll keep you posted.

jobst commented 7 years ago

@cadtobias, @hedenface I am the original poster of this bug.

I can confirm it has been fixed.

I placed a syslog message in front of it just to see the data

  syslog(LOG_INFO, "Force Packet is %d and PV is %d", force_v2_packet, packet_ver);

which is displayed every time but the following

 if (result != -1 && force_v2_packet == 0 && packet_ver == NRPE_PACKET_VERSION_2)
      logit(LOG_DEBUG, "Remote %s accepted a Version %d Packet", rem_host, packet_ver);

is not displayed, so for me it works as expected - the log is not clogged with "Remote W.X.Y.X accepted a Version 3 Packet" anymore.

hedenface commented 7 years ago

@cadtobias There must be something else at play here. Several us here attempted to reproduce your bug and were unable to. You aren't by chance running multiple versions of NRPE simultaneously are you? (Silly question I know, but the only thing that pops in my mind right now)

cadtobias commented 7 years ago

@hedenface I can tell that we run an Icinga2 topology with a Master server and about 4 satellites. Each Icinga2 server writes massive log entries like:

Jun 29 15:52:41 srv-satellite1 check_nrpe: Remote xxx.xxx.xxx.xxx accepted a Version 3 Packet Jun 29 15:52:41 srv-satellite1 check_nrpe: Remote xxx.xxx.xxx.xxx accepted a Version 3 Packet Jun 29 15:52:41 srv-satellite1 check_nrpe: Remote xxx.xxx.xxx.xxx accepted a Version 3 Packet Jun 29 15:52:41 srv-satellite1 check_nrpe: Remote xxx.xxx.xxx.xxx accepted a Version 3 Packet Jun 29 15:52:42 srv-satellite1 check_nrpe: Remote xxx.xxx.xxx.xxx accepted a Version 3 Packet Jun 29 15:52:42 srv-satellite1 check_nrpe: Remote xxx.xxx.xxx.xxx accepted a Version 3 Packet Jun 29 15:52:42 srv-satellite1 check_nrpe: Remote xxx.xxx.xxx.xxx does not support Version 3 Packets Jun 29 15:52:42 srv-satellite1 check_nrpe: Remote xxx.xxx.xxx.xxx accepted a Version 3 Packet Jun 29 15:52:42 srv-satellite1 check_nrpe: Remote xxx.xxx.xxx.xxx accepted a Version 2 Packet Jun 29 15:52:43 srv-satellite1 check_nrpe: Remote xxx.xxx.xxx.xxx accepted a Version 3 Packet We run a mixed mode. The Icinga2 servers try to check via Nagios Vers 3 if that fails they try Vers 2.

Anymore else infos I can give you?

cadtobias commented 7 years ago

Thanks at all for the help. I now can confirm it has been fixed. We had a custom directory with the check_nrpe file I didn't know of. Therefore the check_nrpe file had never been replaced with the recompiled one after updateing nagios-nrpe-server / nagios-nrpe-plugin. I exchanged the check_nrpe file manually with the one from buster nagios 3.1.1 backported version and now the logentries are dramatically reduced.

I apologize for the stress.

Cheers.