We are using check in service stanza, with command, for a Docker-based task at described in https://www.nomadproject.io/docs/job-specification/service
The documents however do not detail where is the output of the script written? It is not in the logs produced by the container (i.e., in the logs UI of the task or command line nomad alloc logs ) or in the journal on the host (i.e., viewed as journalctl --since “1 hour ago” -u nomad --no-pager)
We are running Nomad 0.11.2 with following check stanza
check {
type = "script"
name = "check_test"
command = "/bin/bash"
args = ["/home/myuser/opluso/check-test.sh"]
interval = "30s"
timeout = "30s"
}
I have confirmed that the script check-test.sh does run every 30s (by putting code to send an email inside the script) but if I put echo statement in the script, the output is not visible anywhere
#!/bin/bash
echo "[`date`] Test print from check-test.sh ++++++++++++++++"
Any help on finding these logs will be super helpful for troubleshooting.