Monitoring services in cluster setup- Linux servers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
pratikmehta003
Posts: 105
Joined: Thu Apr 09, 2020 7:35 am

Monitoring services in cluster setup- Linux servers

Post 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?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Monitoring services in cluster setup- Linux servers

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
pratikmehta003
Posts: 105
Joined: Thu Apr 09, 2020 7:35 am

Re: Monitoring services in cluster setup- Linux servers

Post by pratikmehta003 »

Thanks for this information....let me review this...
pratikmehta003
Posts: 105
Joined: Thu Apr 09, 2020 7:35 am

Re: Monitoring services in cluster setup- Linux servers

Post 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)
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitoring services in cluster setup- Linux servers

Post 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
pratikmehta003
Posts: 105
Joined: Thu Apr 09, 2020 7:35 am

Re: Monitoring services in cluster setup- Linux servers

Post by pratikmehta003 »

Give me sometime to review this...
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitoring services in cluster setup- Linux servers

Post by ssax »

Ok, let us know if you have any questions/issues.
pratikmehta003
Posts: 105
Joined: Thu Apr 09, 2020 7:35 am

Re: Monitoring services in cluster setup- Linux servers

Post by pratikmehta003 »

Give me sometime...
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Monitoring services in cluster setup- Linux servers

Post by benjaminsmith »

Give me sometime...
Just replying to remove this from our queue. No need to reply until you are ready.

Best Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
pratikmehta003
Posts: 105
Joined: Thu Apr 09, 2020 7:35 am

Re: Monitoring services in cluster setup- Linux servers

Post 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
You do not have the required permissions to view the files attached to this post.
Locked