Skip to content
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

output=silent (crontab mode) #181

Closed
skob opened this issue Mar 27, 2019 · 7 comments · Fixed by #209
Closed

output=silent (crontab mode) #181

skob opened this issue Mar 27, 2019 · 7 comments · Fixed by #209
Labels
good first issue Issues that new contributors can easily work on help wanted Extra attention is needed

Comments

@skob
Copy link

skob commented Mar 27, 2019

Is your feature request related to a problem? Please describe.
when using alerta-cli with crontab, extra-output send annoyed emails. It's possible to suppress output by > /dev/null , but it is not good solution

Describe the solution you'd like
plz add --output=silent for crontab :-)

@skob skob changed the title output=silent output=silent (crontab mode) Mar 27, 2019
@satterly
Copy link
Member

Thanks for raising this issue. Is this something you think you could fix yourself?

@satterly satterly added the good first issue Issues that new contributors can easily work on label Mar 28, 2019
@skob
Copy link
Author

skob commented Mar 31, 2019

Sorry
but not sure I can fix this :(

@v-zhuravlev
Copy link
Contributor

Hi, @skob , why using > /dev/null is not a good solution?

@skob
Copy link
Author

skob commented Mar 31, 2019

Because you can loose output from cronjob and you can’t control this behavior

@satterly satterly added the help wanted Extra attention is needed label Apr 1, 2019
@satterly
Copy link
Member

satterly commented Jun 6, 2019

@skob Which alerta commands are you talking about? And what output are you suggesting should be silenced from those commands?

I've just checked alerta housekeeping and it doesn't seem to generate any output unless there's an error.

@skob
Copy link
Author

skob commented Jun 6, 2019

$ /srv/alerta/bin/alerta version
alerta 7.2.9
alerta client 7.2.2
requests 2.22.0
click 7.0
$ alerta heartbeats --timeout 600 --alert
ORIGIN              STATUS    LATENCY    SINCE    TAGS          TIMEOUT    ID                                    CREATED              CUSTOMER    RECEIVED
...
Alerting 148 heartbeats  [####################################]  100%

@satterly
Copy link
Member

The click progress bar doesn't render in a progress bar unless your tty has stdout ...
""" By default, this progress bar will not be rendered if the file is not a terminal.
I've modified the CLI to output errors to stderr and so the earlier suggested work-around of piping to /dev/null should be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that new contributors can easily work on help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants