Page 2 of 3

Re: Interesting Situation...

Posted: Tue Feb 23, 2016 9:41 am
by lmiltchev
Sounds good, rkymtnhigh! Let us know if you get stuck on something. We will keep this topic open for the time being. Thank you!

Re: Interesting Situation...

Posted: Tue Feb 23, 2016 1:45 pm
by rkymtnhigh
I have managed to get both Nagios installs set up as hosts and reporting via NRPE basic system details.
My custom command seems to fail, so I went back to testing NRPE on each CentOS box.
When I run check_nrpe -H localhost now I'm getting

Code: Select all

Error - Could not complete SSL handshake
Where as before I was getting:

Code: Select all

NRPE v2.14
My checks are still coming back green, so maybe something isn't wrong? But my custom command returns nothing for output.

Code: Select all

COMMAND: check_nrpe -H aws.ourdomain.com -c /usr/bin/perl customperlscript.pl -f /usr/local/nagios/libexec/argument.xml
OUTPUT: 
Any help is greatly appreciated!

Re: Interesting Situation...

Posted: Tue Feb 23, 2016 2:12 pm
by lmiltchev
Testing nrpe locally as such:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H localhost
should work if "127.0.0.1" is present on the "only_from" line... Can you show us the output of the following command?

Code: Select all

cat /etc/xinetd.d/nrpe
Do the commands below work better?

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
or

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <actual server's IP>
Also, you need to define your command in the nrpe.cfg or common.cfg, and call it this way:

Code: Select all

./check_nrpe -H <remote IP> -c <command>
instead of calling the script directly.

Probably, you can set up a command in the "/usr/local/nagios/etc/nrpe/common.cfg" on the remote box like this:

Code: Select all

command[myscript]=/usr/bin/perl /full/path/to/your/custom/script/customperlscript.pl -f /usr/local/nagios/libexec/argument.xml
Restart xinetd, so that changes can take effect:

Code: Select all

service xinetd restart
Next, test it from Nagios XI:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <remote ip> -c myscript

Re: Interesting Situation...

Posted: Tue Feb 23, 2016 2:37 pm
by rkymtnhigh
Thank you so much lmiltchev!

That was incredibly informative and helpful. I got my check up and running from the remote host.

Will dive into BPI and see if I run into any issues.

Thanks again!

Re: Interesting Situation...

Posted: Tue Feb 23, 2016 2:42 pm
by rkennedy
He was a minute faster then me with his response.. Sounds good though! I'll leave this thread open, let us know if you have any further questions.

Re: Interesting Situation...

Posted: Tue Feb 23, 2016 5:32 pm
by rkymtnhigh
You guys both helped tremendously. Thank you.

I've got the checks up and running, and I've created the BPI group with two test services that I can control its availability.

I've tripped both of them to Critical, and set my Warning threshold to 99 and Critical to 49. Yet I cannot make the group go into Warning or Critical!
Both services are showing in the group as critical, yet the group still shines green.

Perhaps I am misunderstanding something about thresholds and BPI.

What am I missing? Almost there!!

RMH

Re: Interesting Situation...

Posted: Tue Feb 23, 2016 6:02 pm
by lmiltchev
I am glad we are getting closer to solving the puzzle. :)

You will need to set up your BPI group with health thresholds like 51% (warning) and 1% (critical). This way, if one of the services is down, you will get an warning. If both are down - critical. Here's an example:
example03.PNG
example01.PNG
example02.PNG

Re: Interesting Situation...

Posted: Tue Feb 23, 2016 9:30 pm
by rkymtnhigh
It's weird. I've got my thresholds set like that, but the groups still says OK! I also don't get any information about the health status of the group like I see in your screenshot.

Re: Interesting Situation...

Posted: Wed Feb 24, 2016 10:22 am
by lmiltchev
This is strange - perhaps you are using an older component. What is the version of Nagios XI and the Nagios BPI component that you are currently using?

Re: Interesting Situation...

Posted: Wed Feb 24, 2016 11:07 am
by rkymtnhigh
Nagios 5.2.2 and BPI 2.4.4

Thanks! This is the last piece of the puzzle!