Setting up one service with multiple checks

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
akepley
Posts: 138
Joined: Wed Sep 11, 2013 1:09 pm

Setting up one service with multiple checks

Post by akepley »

I need to setup a service to check 3 different MySQL replication services (slave IO, lag, replication) and have it send an email to our help desk to automatically open a ticket when one of the 3 is failing. The reason for all 3 in one service is so Nagios doesn't open 3 separate tickets for the same issue. Is this possible?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Setting up one service with multiple checks

Post by Box293 »

I had a look at the check_mysql_health plugin and it appears that it will only do one check when it runs, so out of the box this is not possible.

However you could write a wrapper script that executes all three checks. The wrapper detects if any one of the three checks fails the parameters you specify. This way you end up with one service and only one ticket generated in your helpdesk system.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Stuart Watts
Posts: 40
Joined: Wed Sep 25, 2013 7:01 am

Re: Setting up one service with multiple checks

Post by Stuart Watts »

I can't recommend check_multi enough for this sort of situation!
technick
Posts: 49
Joined: Tue Feb 04, 2014 10:30 am
Location: Denver, CO

Re: Setting up one service with multiple checks

Post by technick »

BPI would be a perfect fit for this as well.
----------------------
Nagios Jedi in training.
akepley
Posts: 138
Joined: Wed Sep 11, 2013 1:09 pm

Re: Setting up one service with multiple checks

Post by akepley »

I'm not familiar with "BPI". What is that?
technick
Posts: 49
Joined: Tue Feb 04, 2014 10:30 am
Location: Denver, CO

Re: Setting up one service with multiple checks

Post by technick »

Nagios Business Process Intelligence

For this specific use case, I would create three separate checks that does not notify. Then create a BPI group with those three services with a critical notification of anything below 100 percent. After that, you'll create another service check that runs against the BPI group and will notify you when the availability drops below 100%.

http://assets.nagios.com/downloads/nagi ... _Addon.pdf

I will tell you that the documentation is lacking in some areas and I had to "experiment" with it before fully understanding its abilities.
----------------------
Nagios Jedi in training.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Setting up one service with multiple checks

Post by tmcdonald »

Slightly better version of that doc: http://assets.nagios.com/downloads/nagi ... BPI_v2.pdf
Former Nagios employee
akepley
Posts: 138
Joined: Wed Sep 11, 2013 1:09 pm

Re: Setting up one service with multiple checks

Post by akepley »

Set it up and setup some services in a new BPI Group. Then created a service with the BPI Wizard. Now the service is listed as "Unknown BPI Group Index" status. I've looked at the documentation and google with no results. What is the problem with that service?
technick
Posts: 49
Joined: Tue Feb 04, 2014 10:30 am
Location: Denver, CO

Re: Setting up one service with multiple checks

Post by technick »

I probably didn't explain it great enough detail and this is the biggest thing missing from documentation..

Step 1. Create the service checks you want to be a part of this BPI group.

Step 2. Create your BPI Group
- You should be able to see the BPI group and when you expand it, you should see the services you added when you created the group. If you can't see your services in the group, you'll need to edit the bpi config and get them added.

Step 3. Create a new service check that will check the status of the BPI group.

Some recommendations... do not use spaces in the Group ID field, underscores work better. Display name doesn't matter since the check_bpi plugin attaches directly to the Group ID. I've also found that using Wizards can over complicate things and prefer personally to create everything manually and I recommend everybody does the same.
----------------------
Nagios Jedi in training.
akepley
Posts: 138
Joined: Wed Sep 11, 2013 1:09 pm

Re: Setting up one service with multiple checks

Post by akepley »

Looks to be working perfectly. Thanks all!
Locked