Skip to content

Commit

Permalink
Remove superfluous and costly JobsInJobQueueInfo query
Browse files Browse the repository at this point in the history
  • Loading branch information
KSerrania committed Jul 19, 2021
1 parent 3b77a3a commit 9462fe5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
1 change: 0 additions & 1 deletion ibm_i/datadog_checks/ibm_i/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def set_up_query_manager(self):
queries.ActiveJobStatus,
queries.JobMemoryUsage,
queries.MemoryInfo,
queries.JobsInJobQueueInfo,
queries.JobQueueInfo,
queries.get_message_queue_info(self.config.severity_threshold),
]
Expand Down
19 changes: 0 additions & 19 deletions ibm_i/datadog_checks/ibm_i/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,25 +151,6 @@
],
}

JobsInJobQueueInfo = {
'name': 'jobs_in_job_queue',
'query': (
"SELECT SUBSTR(JOB_NAME,1,POSSTR(JOB_NAME,'/')-1) AS JOB_ID, "
"SUBSTR(JOB_NAME,POSSTR(JOB_NAME,'/')+1,POSSTR(SUBSTR(JOB_NAME,POSSTR(JOB_NAME,'/')+1),'/')-1) AS JOB_USER, "
"SUBSTR(SUBSTR(JOB_NAME,POSSTR(JOB_NAME,'/')+1),POSSTR(SUBSTR(JOB_NAME,POSSTR(JOB_NAME,'/')+1),'/')+1) AS JOB_NAME, " # noqa:E501
"JOB_QUEUE_NAME, JOB_QUEUE_STATUS, 1 "
"FROM TABLE(QSYS2.JOB_INFO('*JOBQ', '*ALL', '*ALL', '*ALL', '*ALL'))"
),
'columns': [
{'name': 'job_id', 'type': 'tag'},
{'name': 'job_user', 'type': 'tag'},
{'name': 'job_name', 'type': 'tag'},
{'name': 'job_queue_name', 'type': 'tag'},
{'name': 'job_queue_status', 'type': 'tag'},
{'name': 'ibm_i.job.in_jobq', 'type': 'gauge'},
],
}

JobQueueInfo = {
'name': 'job_queue',
'query': (
Expand Down

0 comments on commit 9462fe5

Please sign in to comment.