robusta
robusta copied to clipboard
UI / Jobs / Ability to show logs and remove jobs
On alert, we often just want to delete a failed job after logs check.
Thanks for reporting it @lictw
By default, we have this playbook, which is doing something similar:
- triggers:
- on_prometheus_alert:
alert_name: KubeJobFailed
- on_prometheus_alert:
alert_name: KubeJobCompletion
actions:
- job_info_enricher: {}
- job_events_enricher: {}
- job_pod_enricher: {}
Basically, when ever the KubeJobFailed
or KubeJobCompletion
alerts are fired, we're running these 3 actions, which will get information about the job, the job events, and logs from the job pod.
These actions can be triggered by any alert that fires on a k8s job.
Can that work for you?
see: https://docs.robusta.dev/master/catalog/actions/event-enrichment.html#job-enrichers https://docs.robusta.dev/master/catalog/triggers/smart.html#job-failure
If you're referring to the UI, we're going to add these capabilities very soon (viewing logs and deleting the job).
Yes, it's about UI, but about pipeline posted by you: does it should send alerts after every job with detailed information, even successful? I don't have such alerts..
By default, it's configured to run only on job alerts. (when a job is failed, or running for a long time) You could however, configure it to run for every job. For example:
- triggers:
- on_job_create: {}
actions:
- job_info_enricher: {}
- job_events_enricher: {}