CtrlK
BlogDocsLog inGet started
Tessl Logo

monitoring-background-jobs

Monitors CockroachDB background job health by identifying failed, paused, and long-running jobs using SHOW JOBS and SHOW AUTOMATIC JOBS. Surfaces schema changes, backups/restores, automatic statistics collection, and SQL stats compaction jobs without DB Console access. Use when investigating schema change delays, failed backups, or automatic job issues.

86

1.95x
Quality

81%

Does it follow best practices?

Impact

94%

1.95x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

Evaluation results

95%

45%

Weekly Job Health Check Script

Core job monitoring query patterns

Criteria
Without context
With context

CTE pattern for SHOW JOBS

0%

100%

LIMIT clause present

0%

100%

Time filter on SHOW JOBS queries

50%

60%

SHOW AUTOMATIC JOBS used

0%

100%

Automatic job type filter

100%

100%

24-hour window for automatic jobs

100%

100%

COALESCE for duration of running jobs

0%

87%

now() - created elapsed pattern

62%

100%

Error column in failed jobs query

100%

100%

running_status column for long-running jobs

100%

100%

88%

31%

Schema Change Investigation Runbook

MVCC GC wait investigation

Criteria
Without context
With context

MVCC GC running_status filter

0%

25%

gc.ttlseconds check query

30%

100%

2x gc.ttlseconds investigate threshold

0%

100%

Normal wait explanation

100%

100%

Background jobs vs statement monitoring

83%

100%

SHOW JOBS used for diagnostics

75%

100%

SCHEMA CHANGE GC job type filter

100%

100%

Prefer PAUSE over CANCEL

50%

100%

LIMIT clause in queries

87%

62%

now() - created for elapsed duration

100%

100%

100%

63%

Database Job Access Control Setup

Privilege setup syntax correctness

Criteria
Without context
With context

GRANT SYSTEM VIEWJOB syntax

100%

100%

ALTER ROLE for CONTROLJOB

0%

100%

No GRANT SYSTEM CONTROLJOB

0%

100%

SHOW GRANTS ON ROLE for VIEWJOB verification

53%

100%

SHOW USERS for CONTROLJOB verification

0%

100%

VIEWJOB for read-only tier

100%

100%

CONTROLJOB for control tier

30%

100%

Distinct verification per privilege type

20%

100%

Repository
cockroachlabs/cockroachdb-skills
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.