Page 1 of 1

Unable to change config of service checks

Posted: Thu Mar 14, 2019 4:06 pm
by NMFSTeam
I have Nagios XI 5.5.10 running on CentoS 6.x (x64), custom install. I am attempting to monitor a new host (Linux server) using nrpe, using Configure >> Configuration Wizards >> Linux Server. All is fine, however I have configured nrpe on the host to use SSL, and am now attempting to go back in Nagios XI and configure each service check to use the secure SSL config (i.e. change the config from check_nrpe!check_disk!-a '-w 20% -c 10% -p /' to check_nrpe!check_disk!-f /usr/local/nagios/etc/check_nrpe.config -a '-w 20% -c 10% -p /' ). I have done this in the past, many times, with no issue. However, now when I do it, and then go back in to check on it, I see that the changes I put in are no longer there, it remains at check_nrpe!check_disk!-a '-w 20% -c 10% -p /' . Please help!

Re: Unable to change config of service checks

Posted: Thu Mar 14, 2019 4:42 pm
by npolovenko
@mblower, You're changing the nrpe command in the Core Configurations Manager, right? Are you using this tutorial?
https://support.nagios.com/kb/article.php?id=519

Can you show me the contents of:
/usr/local/nagios/etc/check_nrpe.config
And also the full definition of your check_nrpe command.

Re: Unable to change config of service checks

Posted: Thu Mar 14, 2019 6:40 pm
by NMFSTeam
Yes, we have done this before, and we are following the normal procedure, which is shown in that document you just linked to.
We are changing the command, not in the CCM, but in the main interface of Nagios XI. Pull up the host, click on the icon to show all the services, click on a service, and then click on the Gear icon (Configure), and click Re-configure this service. From there, we modify the command that is being used, to include the "-f /usr/local/nagios/etc/check_nrpe.config"

Attached is the nrpe.cfg file.

As for the check_nrpe command... (from the CCM)

Command name: check_nrpe
Command line: $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
Command type: check command
Active (checked)

Edit: sorry, the contents of the check_nrpe.config file are as follows: -A /usr/local/nagios/etc/ssl/dod_combined.crt -C /usr/local/nagios/etc/ssl/nagios_server.crt -K /usr/local/nagios/etc/ssl/nagios_server.key

Thanks,

Re: Unable to change config of service checks

Posted: Fri Mar 15, 2019 10:08 am
by npolovenko
@mblower, I'd highly recommend changing the check_nrpe command in the Core Configurations Manager instead of changing each service check individually from the home page.
$USER1$/check_nrpe -A /usr/local/nagios/etc/ssl/dod_combined.crt -C /usr/local/nagios/etc/ssl/nagios_server.crt -K /usr/local/nagios/etc/ssl/nagios_server.key -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
If you only want some nrpe services to use SSL then create another command check_nrpe_ssl and use it for these specific services instead.

Re: Unable to change config of service checks

Posted: Sat Mar 16, 2019 9:07 am
by NMFSTeam
A reasonable suggestion, we will certainly take it under advisement. Unfortunately we've already configured many servers to be monitored in this way, so we'd have to switch them all back, and then modify the command (or create a new one) in the CCM.

The initial issue, which was that the changes I put in weren't being retained, has been fixed. We patched and rebooted the server today, and then I also updated Nagios XI itself to the latest version. After all of that, Nagios seems to be working better, and we are now able to monitor this host using NRPE and SSL, so we are good to go.

Thank you.

Re: Unable to change config of service checks

Posted: Mon Mar 18, 2019 11:37 am
by npolovenko
@mblower, Glad this worked for you. I will be closing this thread as resolved but feel free to open a new one if anything else comes up.