bpi monitor 1 process between 2 servers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kendallchenoweth
Posts: 195
Joined: Fri Sep 13, 2013 10:43 am

bpi monitor 1 process between 2 servers

Post by kendallchenoweth »

I'd like to use BPI to setup monitoring of a process between a cluster of two servers. Between server A and server B, I'd like to report OK if only one instance of crond is running on one of the servers. I can setup BPI to alert if no instances of crond are running on a client. How can I setup BPI to alert if both server A and server B have the process running?

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

Re: bpi monitor 1 process between 2 servers

Post by ssax »

That functionality doesn't currently exits, great idea though, I've created a feature request for this:

Code: Select all

NEW TASK ID 6863 created - Nagios XI Feature Request: BPI Wizard - Add functionality to alert if service is running on multiple hosts
You may be able to use the check_cluster plugin and the negate plugin to achieve the functionality you are looking for, I'll lab it up and see if it'll work.


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

Re: bpi monitor 1 process between 2 servers

Post by ssax »

Ok, here is how I was able to make this work:

1. Make sure that you are monitoring the service (SSH in this example) on both servers (you can disable notifications for them), these service checks are what will be used by the check_cluster plugin.

2. Create a new command:
- Command Name: negate_check_service_cluster
- Command Line: $USER1$/negate -w OK -o CRITICAL -s '$USER1$/check_cluster --service -l $ARG1$ -w $ARG2$ -c $ARG3$ -d $ARG4$'
- Command Type: check command

3. Create the service:
- Description: SSH_Cluster
- Check command: negate_check_service_cluster
- $ARG1$: SSH_Cluster
- $ARG2$: 0
- $ARG3$: 1
- $ARG4$: $SERVICESTATEID:host1:SSH$,$SERVICESTATEID:host2:SSH$


Let me know if you have any questions
Locked