mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-26 07:25:51 +03:00
[GH-ISSUE #754] Reverse fail signal bit #533
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#533
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @c0nfus3d on GitHub (Dec 17, 2022).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/754
I have a webserver that runs the webmin control panel. This server does a weekly backup.
In the backup settings, I can specify a "Command to run after backup"
It gives me variable options, such as the status of the backup.
So I could set this command as
curl --retry 3 https://hc-ping.com/{GUID}/BACKUP_STATUSto update my healthcheck.However, this variable's value is the opposite of what Healthchecks.io is looking for-- "Healthchecks.io will interpret exit status 0 as success and all non-zero values as failures"
Is there a way that I can set this check to look for the reverse value, so it would interpret the 1 as a success instead of a fail and then interpret a 0 as a fail instead of success?
@cuu508 commented on GitHub (Dec 18, 2022):
The
/{status}endpoint is for reporting the exit status of a process. On POSIX systems 0 is success and 1-255 is failure.You can write a wrapper script which reverses the BACKUP_STATUS and calls curl. And specify the wrapper script as the command to run after backup.
@c0nfus3d commented on GitHub (Dec 18, 2022):
I like the idea @cuu508! Thanks! Closing this issue.