-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic scripts running more than 1 sec fail with "Monitor script returned critical: 85, rebooting system ..." #48
Comments
What version of watchdogd are you using, and how does your config file look? |
Hello, we are running watchdogd 4.0 this is the config we are running:
The watchdogscript is basically a shell script that calls curl to check the state of a specific endpoint. Whenever the curl takes more than a second, watchdog reboots the device with the above output. We can of course workaround this by setting a timeout within curl but that may not be an option for some other use cases where the timeout really needs to be longer than a second. |
OK. I'll see when I have some time over to debug this. But it's not high on my priority list right now since I'm not using this feature myself (or any of my customers). Of you want to speed things along I suggest getting outside help. |
It seems like it comes as a return from the
script_exit_status(g->pid);
check at the time when the script is still running. This is being called fromstatic void generic_cb(uev_t *w, void *arg, int events)
Setting the critical threshold to more than 85 indeed makes the check pass but that is not a viable workaround because the actual real return code will then not be checked anymore making scripts running longer than 1 sec seemingly always pass.
Maybe we just need to initialise the exit code variable to -1 when creating the data structure?
The text was updated successfully, but these errors were encountered: