Giter Site home page Giter Site logo

Supress command output about runitor HOT 4 CLOSED

bdd avatar bdd commented on August 29, 2024
Supress command output

from runitor.

Comments (4)

singpolyma avatar singpolyma commented on August 29, 2024 1

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.

bdd avatar bdd commented on August 29, 2024

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.

singpolyma avatar singpolyma commented on August 29, 2024

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.

bdd avatar bdd commented on August 29, 2024

[...] 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.