nagios - nrpe - check_http - works from command prompt but fails on nrpe

3.9k Views Asked by At

I was trying nagios.

following command works well when I execute from the console.

./check_http -I 10.0.0.76 -p 8080  --url="/MYServiceBus/" --post="<My Message xml>" --eregi=.Status_Code.0./Status_Code. -c 7 -w 5 -v

So I went ahead and added in nrpe.cfg

But then it started giving error in /var/log/messages

Unknown option specified in config file '/usr/local/nagios/etc/nrpe.cfg' - Line 246

Interesting part is that the actual command is at line 245. And in fact there is another check_http commands in the same config file which are working fine.

Am I missing anything but obvious.

Thanks in advance.

regards, Mohan

2

There are 2 best solutions below

0
On BEST ANSWER

OK, got the issue. the request lenght was too much for the NRPE, reduced it and it worked after that.

1
On

Looks like your NRPE is not reloading due to a syntax error in the configuration file.

You do not say whether you are running NRPE as a standalone daemon or via (x)inetd; also you have not shown the content of your file here, so it is hard to debug.

My guess would be that you have edited the nrpe.cfg file a Windows-like editor that has added a trailing ^M to line 246, which is causing the error. Or, there is an invalid character in the line which is causing the problem. If these are not the causes, you need to post the relevant block of lines for us to examine.