We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

Exclude one single SQL Job

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Exclude one single SQL Job

Postby Fabian.Walcher » Thu Aug 19, 2021 3:59 am

i have a big problem i'm searching now for a long time and can't find anything.
I Always get the following error in Nagios Core:

[08-19-2021 07:25:01] SERVICE ALERT: XAL164;SQL Jobs;CRITICAL;SOFT;3;CRITICAL - Number of failed jobs: 1 - Failed Jobs: Monitoring_QueryExecutionTime.Subplan_1 last run at 08/19/2021 07:00:00

Thats a "known" issue on the SQL Server but i need to Exclude that one single job from the monitoring.
Is there any way that i can exclude this? Please let me know.

Here is the Check:

define command {
command_name check_sqljobs
command_line $USER1$/check_mssql_job_history.py -H $HOSTADDRESS$ -U nagios -P nagios

And here the Service:

define service{
use local-service ; Name of service template to use
hostgroup_name sql-hosts
service_description SQL Jobs
check_command check_sqljobs

Thanks in advance ;)
Posts: 2
Joined: Wed Dec 16, 2020 9:57 am

Re: Exclude one single SQL Job

Postby mcapra » Mon Aug 23, 2021 11:29 am

Looks like this plugin has an exclude argument baked-in:
https://bitbucket.org/jetole/mssql-job- ... y#lines-67

Code: Select all
parser.add_argument("-x", "--exclude", action="store", help="A comma seperated list of jobs not to check", dest="exclude");

Could try adding -x Monitoring_QueryExecutionTime.Subplan_1 to your command definition's command_line.
Former Nagios employee
User avatar
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Exclude one single SQL Job

Postby Fabian.Walcher » Fri Aug 27, 2021 3:40 am

Thanks a lot :)
That fixed my problem.
Posts: 2
Joined: Wed Dec 16, 2020 9:57 am

Return to Community Support

Who is online

Users browsing this forum: No registered users and 17 guests