We have multiple jobs in a dashboard. Is there a way to create a alarm rule that evaluates each job individually?
Now, the query I set:
topk(10, max by(COMMAND) (max_over_time({job="6116"} |= `root` |= `%` != `Mem` | regexp `\[(?P<time>\d+-\d+-\d+ \d+:\d+:\d+)\]\s+(?P<PID>\d+)\s+(?P<PPID>\d+)\s+(?P<USER>root)\s+(?P<STAT>[A-Z]+)\s*\S*\s*(?P<VSZ>\w+)\s+(?P<percent_VSZ>\d+)%\s+(?P<percent_CPU>\d+)%\s+(?P<COMMAND>[^\r:]+)` | unwrap percent_CPU [10m])))
it can only match job named “6116”,how can I modify it?