You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe it would be very useful to have report sucess / failure of running tasks in swarm-cronjob logs.
Running the example with date, I can see some information in the logs but it's not clear which job failed and which succeeded.
I believe it can be done since swarm cronjobs has access to docker logs and can read information about those failed jobs.
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:38:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:39:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:40:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:41:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:42:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:43:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:44:00 UTC INF Start job service=infra_cronjob_test status= tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:45:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:46:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:47:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:48:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:49:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:50:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:51:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:52:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:53:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:54:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:55:00 UTC INF Start job service=infra_cronjob_test status= tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:56:00 UTC INF Start job service=infra_cronjob_test status= tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:57:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:58:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 08:59:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 09:00:00 UTC INF Start job service=infra_cronjob_test status= tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 09:01:00 UTC INF Start job service=infra_cronjob_test status=paused tasks_active=0
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 09:02:00 UTC INF Start job service=infra_cronjob_test status=
It would be great to have #170 but it looks more complex to implement.
The text was updated successfully, but these errors were encountered:
To illustrate that use case, in the products on which I work, we use swarm-cronjob, we collect the logs with a logging back (ELK or Loki) and we have the capacity to build alerts by checking logs from the stdout of all the container.
So have a line like :
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 09:02:00 UTC INF Start job service=infra_cronjob_test container_id=owsz0yp6z375
infra_swarm_cronjob.1.l217ahvflt64@dev1 | Fri, 03 Jun 2022 09:02:00 UTC INF Stopped job service=infra_cronjob_test container_id=owsz0yp6z375 task_state=Failed
This is not a bug, it's a feature request.
I believe it would be very useful to have report sucess / failure of running tasks in swarm-cronjob logs.
Running the example with date, I can see some information in the logs but it's not clear which job failed and which succeeded.
I believe it can be done since swarm cronjobs has access to docker logs and can read information about those failed jobs.
It would be great to have #170 but it looks more complex to implement.
The text was updated successfully, but these errors were encountered: