After 5.4 update: Check returns different results WebUI/CLI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sohasup
Posts: 5
Joined: Thu Feb 18, 2016 6:14 am

After 5.4 update: Check returns different results WebUI/CLI

Post by sohasup »

Hi,

I'm experiencing an issue after the v5.4 update:
One of my checks is no longer working properly.

So far, only 1 check is affected.
When NagiosXI performs the check, it will always return unknown.
Image

But when I execute the check from CLI or with Run Check Command from the service configuration page, then it works just fine:

Code: Select all

[[email protected] ~]$ /usr/local/nagios/libexec/check_cluster --service -l SQL Server Cluster -c 1 -d $SERVICESTATEID:sh-mgt-db1.shr.local:SQL Server$,$SERVICESTATEID:sh-mgt-db2.shr.local:SQL Server$
CLUSTER OK: SQL: 1 ok, 0 warning, 0 unknown, 0 critical
Before the 5.4 upgrade the check was working just fine.


Does anybody have an idea what could be causing this strange behavior?
Any help would be very apreciated.


Thanks in advance!
Alex
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: After 5.4 update: Check returns different results WebUI/

Post by rkennedy »

Please post the service definition, and also the related command definition for us to look at.
Former Nagios Employee
sohasup
Posts: 5
Joined: Thu Feb 18, 2016 6:14 am

Re: After 5.4 update: Check returns different results WebUI/

Post by sohasup »

Hi rkennedy and thank you for your reply.

Here are the service & command definitions:

Code: Select all

define service {
        host_name                       MSCL: SH-MGT-DBCL
        service_description             SQL Server Cluster
        use                             xiwizard_windowsserver_nsclient_service
        servicegroups                   SH MSSQL Server
        check_command                   check_service_cluster!SQL Server Cluster!1!$SERVICESTATEID:sh-mgt-db1.shr.local:SQL Server$,$SERVICESTATEID:sh-mgt-db2.shr.local:SQL Server$!!!!!
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    xi_timeperiod_24x7
        notification_interval           60
        notification_period             xi_timeperiod_24x7
        contacts                        nagiosadmin
        _xiwizard                       windowsserver
        register                        1
        }

Code: Select all

define command {
       command_name                             check_service_cluster
       command_line                             $USER1$/check_cluster --service -l $ARG1$ -c $ARG2$ -d $ARG3$
}


I also didn't provide information about my Nagios machine, so here it is:
Manual Install
CentOS Linux release 7.3.1611 (Core)
The box is running as VM on a Windows 2012R2 Hypervisor

Code: Select all

Linux sh-mgt-nag1.shr.local 3.10.0-514.2.2.el7.x86_64 #1 SMP Tue Dec 6 23:06:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Thank you in advance for your help!
Alex
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: After 5.4 update: Check returns different results WebUI/

Post by ssax »

Please PM one of us a copy of your profile so that we can review your configuration, you can download it by going to Admin > System Config > System Profile and click the Download Profile button in the top right corner.

Thank you
sohasup
Posts: 5
Joined: Thu Feb 18, 2016 6:14 am

Re: After 5.4 update: Check returns different results WebUI/

Post by sohasup »

Hi ssax,

I PM'ed you my profile.
The issue seems to be that the $SERVICESTATEID$ macro is always returning unknown in the web front end, right?
That's why the check_cluster plugin is returning critical.

Thanks
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: After 5.4 update: Check returns different results WebUI/

Post by ssax »

Received, thank you.

The reason that it is not working is because the hostnames have changed, sh-mgt-db1.shr.local should be SRV: SH-MGT-DB1 and sh-mgt-db2.shr.local should be SRV: SH-MGT-DB2, the hostnames/service descriptions are case sensitive as well.

Also, I'm unable to see a way for it to work with the : in the host name, my recommendation would be for you to remove the colon from the host names:

Code: Select all

SRV SH-MGT-DB1
SRV SH-MGT-DB2
Then edit your MSCL: SH-MGT-DBCL SQL Server Cluster service and change $ARG3$ to:

Code: Select all

$SERVICESTATEID:SRV SH-MGT-DB1:SQL Server$,$SERVICESTATEID:SRV SH-MGT-DB2:SQL Server$
Now Apply Configuration and test, let us know the results.
sohasup
Posts: 5
Joined: Thu Feb 18, 2016 6:14 am

Re: After 5.4 update: Check returns different results WebUI/

Post by sohasup »

Hi ssax,

please accept my apologies for my late reply. I was out of office.

I will make the changes as you suggested and report back asap.
Thanks a lot so far!
sohasup
Posts: 5
Joined: Thu Feb 18, 2016 6:14 am

Re: After 5.4 update: Check returns different results WebUI/

Post by sohasup »

Hi saxx,

well, i was missing the forest for the trees...
Everything is working fine now.
Thank you SO much!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: After 5.4 update: Check returns different results WebUI/

Post by tgriep »

Glad that the issue is resolved now. I will lock and mark this post as solved and if you have any new issues, please feel free to open a new post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked