NagiosEnterprises / nrpe

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

nrpe 4.1: configuration line length issue? #274

Closed swiedernix closed 1 year ago

swiedernix commented 1 year ago

Hello,

I've successfully compiled nrpe-4.1.0 from source code on RHEL9.1

We're using an allow_hosts statement containing ALL our monitoring nodes, approx. 6107 characters. this works fine with nrpe 3.x

but with nrpe 4.x I get an error after nrpe start: add_ipv4_to_acl: Error, ip-address >10.25.30< bad state

I couldn't find any malformed character/tabs/newlines ... so I simply deleted all content after this IP address, which reduces the line length to 2037 characters - and voila: problem is solved!

now if I add two more IP addresses - I get the same error again.

anybody facing the same issue?

thanks , Stefan

tatref commented 1 year ago

Could you group servers into networks?

Probable cause is that MAX_INPUT_BUFFER is set to 2048:

https://github.com/NagiosEnterprises/nrpe/blob/65ebf94e3cf46ac39d0fc96439a3831b98b4a506/include/common.h.in#L62

Used here in the parsing loop:

https://github.com/NagiosEnterprises/nrpe/blob/65ebf94e3cf46ac39d0fc96439a3831b98b4a506/src/nrpe.c#L879

swiedernix commented 1 year ago

Thanks @tatref , I will group our systems into multiple allowed_hosts statements to fix this issue.