Comments (4)
Ok, inner command stderr goes to runitor stdout and runitor errors go to stderr. I think that works fine for me then. Thanks for explaining.
from runitor.
Are you asking for an addition of a separate command line parameter for suppressing output to the terminal?
I prefer not to introduce additional flags for functionality that can be achieved by often well understood shell constructs.
from runitor.
Well, I'm a bit worried that suppressing the whole output means I'm also suppressing any errors from runitor itself, right? If runitor fails, I'd like to know things have gotten that bad, but I don't see why I would ever want the output of my inner command to leak out of runitor.
from runitor.
[...] suppressing the whole output means I'm also suppressing any errors from runitor itself, right?
If runitor fails to execute passed command, (e.g. file not found, no permission to execute, ran out of PIDs , etc.) it will first fail the health check and add the error to the body of the health check ping. Moreover the same error will be output to stderr (https://github.com/bdd/runitor/blob/main/cmd/runitor/main.go#L188) so you'll also get an email from your cron daemon, which was only forwarding stdout to /dev/null.
Since 0.7.0 runitor combines the stdout and stderr of the command it runs into its own stdout. The reasons for this is explained in the 0.7.0 release notes under "Changes". So in case runitor successfully executes the passed command but that command returns a non-zero exit value, you'll only be able to see the stdout and stderr of the command in the healthchecks.io ping body. But this will not go unnoticed, because non-zero exit value from the command will fail the health check. In case of your passed command outputting things to stderr but still exiting with zero exit code, will indeed go unnoticed by your cron. To best of my knowledge this last case cannot be addressed by a simple addition to runitor, as explained in 0.7.0 release notes.
from runitor.
Related Issues (20)
- Feature request: `-create` flag HOT 2
- Show compiled URL on error HOT 1
- Add GPG signatures or file hashes to released files HOT 8
- HC_API_URL env variable doesn't work as expected HOT 1
- UnicodeDecodeError on success ping with special characters from a Windows host HOT 4
- No ping-status 'OK' when script has no stderr/out? HOT 4
- Feature Request: Custom Header Support HOT 4
- Feature Request: Remove version from binary filenames HOT 1
- Update default value for -ping-body-limit HOT 2
- error: the input device is not a TTY HOT 2
- Feature request: Send command used on start HOT 2
- Feature request: Ignore HOT 1
- `panic: runtime error: invalid memory address or nil pointer dereference` on invalid slugs HOT 2
- Feature request: Upload logs to S3 HOT 7
- Ping body limit? HOT 1
- Feature request: add "log" endpoint HOT 13
- Add handling for HTTP 429 responses HOT 2
- Regression: API URL handling changed with release 1.1.0 HOT 9
- 307/308 redirects aren't handled well HOT 8
- Feature request: Update flag HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from runitor.