Page 1 of 2

Monitoring services in cluster setup- Linux servers

Posted: Thu Nov 26, 2020 10:51 am
by pratikmehta003
Hi there,

We have a bunch of Linux Hana boxes where in couple of services are in cluster mode. This means at any 1 time it will be running only on 1 server. So is there any way to send alert only if the service is stopped on both servers?

Re: Monitoring services in cluster setup- Linux servers

Posted: Mon Nov 30, 2020 4:41 pm
by benjaminsmith
Hi @pratikmehta003,

I would recommend setting up services checks on both nodes and then using the BPI (Busines Intelligence) Component to create a grouping for this cluster along with the desired thresholds for, ok and non-ok.

Once that is setup, run the BPI Config Wizard to set up the notifications. We have step-by-step instructions for this in the following guide.

Using BPI In Nagios XI

Regards,
Benjamin

Re: Monitoring services in cluster setup- Linux servers

Posted: Tue Dec 01, 2020 12:13 am
by pratikmehta003
Thanks for this information....let me review this...

Re: Monitoring services in cluster setup- Linux servers

Posted: Wed Dec 02, 2020 8:44 am
by pratikmehta003
Does this create extra host when this is implemented?

We only have 50 Node pack license and requirement of cluster service is for 10 services for 4 clusters(each clsuter having 2 nodes)

Re: Monitoring services in cluster setup- Linux servers

Posted: Wed Dec 02, 2020 11:16 am
by ssax
Each new host will impact the license count.

You have multiple options:

1. Instead of monitoring each individual server, use the cluster virtual IP (VIP) to monitor them, this would then always point to the active node.

2. Setup each individual host and monitor them and use BPI or check_cluster.

3. You could also just add multiple services to a host that check different servers (say a dummy host like BPI uses or your VIP host).

Here's an example of check_cluster:

1. Make sure that you are monitoring the services (PING in this example) on all servers (you can disable notifications for them, this is important so you don't notifications when they are down), these service checks are what will be used by the check_cluster plugin and need to exist.

2. Create a new command:
- Command Name: check_service_cluster
- Command Line: $USER1$/check_cluster --service -l $ARG1$ -w $ARG2$ -c $ARG3$ -d '$ARG4$'
- Command Type: check command

3. Create the service cluster check:
- Description: PING_Cluster
- Check command: check_service_cluster
- $ARG1$: PING_Cluster
- $ARG2$: 4 <- Set this to one MORE than your total number of services (3 services + 1 = 4) - We don't care about warnings in this example
- $ARG3$: 2 <- Set this to one LESS than your total number of services (3 services - 1 = 2)
- $ARG4$: $SERVICESTATEID:yourhost1:PING$,$SERVICESTATEID:yourhost2:PING$,$SERVICESTATEID:yourhost3:PING$

NOTE: The hostname and the service description in $ARG4$ need to be exact (case sensitive).

The way this would work is that whenever that service is not running on ANY of the nodes it would generate a CRITICAL. So the check_cluster uses the statuses of all of each individual service checks to determine if there is an issue and since you disabled the notifications on the individual services you won't get those notifications, this is the service that will do the notifying.

Please read here for more information:

https://assets.nagios.com/downloads/nag ... sters.html

Re: Monitoring services in cluster setup- Linux servers

Posted: Mon Dec 07, 2020 11:13 am
by pratikmehta003
Give me sometime to review this...

Re: Monitoring services in cluster setup- Linux servers

Posted: Tue Dec 08, 2020 12:10 pm
by ssax
Ok, let us know if you have any questions/issues.

Re: Monitoring services in cluster setup- Linux servers

Posted: Fri Jan 08, 2021 5:31 am
by pratikmehta003
Give me sometime...

Re: Monitoring services in cluster setup- Linux servers

Posted: Fri Jan 08, 2021 2:58 pm
by benjaminsmith
Give me sometime...
Just replying to remove this from our queue. No need to reply until you are ready.

Best Regards,
Benjamin

Re: Monitoring services in cluster setup- Linux servers

Posted: Sun Jan 24, 2021 4:23 am
by pratikmehta003
Hi Benjamin,

I went thru all details and now trying to setup in Nagios.. I need some help.. See below snip.. i have 4 services which are common for 2 Linux servers...
clsuter service screenshot.PNG
Now these are my queries:
1. Description refers to the exact service name that appears on the server?
2. Config name should be for only 1 server right if there are 2 servers in cluster?
3. Like i mentioned, there are 4 services then what i need to mention in Arg2 and Arg3 ? I would like to alert only when service is down on both servers.
4. Arg4 should be like below?
exact hostname: exact service name? And if there are 2 servers in clsuter having 4 services to be monitored then i need to mention the hostname:servicename format for all correct?
$SERVICESTATEID:ucprpodbprd01:sapstart_Cluster,$SERVICESTATEID:yourhost2:ucprpocsprd01,sapstart_Cluster

OR should below format be used
"sapstart_Cluster"!0!1!$SERVICESTATEID:sapstart_Cluster,$SERVICESTATEID:yourhost2:ucprpocsprd01,sapstart_Cluster