Page 1 of 1
bpi monitor 1 process between 2 servers
Posted: Mon Nov 02, 2015 2:42 pm
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!
Re: bpi monitor 1 process between 2 servers
Posted: Tue Nov 03, 2015 10:42 am
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
Re: bpi monitor 1 process between 2 servers
Posted: Tue Nov 03, 2015 11:32 am
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