Setting up one service with multiple checks
Setting up one service with multiple checks
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?
- 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
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.
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.
-
- Posts: 40
- Joined: Wed Sep 25, 2013 7:01 am
Re: Setting up one service with multiple checks
I can't recommend check_multi enough for this sort of situation!
Re: Setting up one service with multiple checks
BPI would be a perfect fit for this as well.
----------------------
Nagios Jedi in training.
Nagios Jedi in training.
Re: Setting up one service with multiple checks
I'm not familiar with "BPI". What is that?
Re: Setting up one service with multiple checks
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.
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.
Nagios Jedi in training.
Re: Setting up one service with multiple checks
Slightly better version of that doc: http://assets.nagios.com/downloads/nagi ... BPI_v2.pdf
Former Nagios employee
Re: Setting up one service with multiple checks
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?
Re: Setting up one service with multiple checks
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.
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.
Nagios Jedi in training.
Re: Setting up one service with multiple checks
Looks to be working perfectly. Thanks all!