This repository was archived by the owner on Jan 7, 2026. It is now read-only.
Post: Monitoring with GitHub actions#14
Open
ds0nt wants to merge 3 commits into
Open
Conversation
anhpngt
reviewed
Apr 18, 2022
|
|
||
| Github actions has a CRON schedule trigger we can use run scripts on a custom schedule. It's pretty cool that Github Actions can run jobs on a CRON schedule, and we can use this ability to cover some of our dev-ops needs. | ||
|
|
||
| For example, we used this to check if any of our domain certificates were close to their expiry. Each day, a github action runs at 10:45, checks if our certificates are dangerously close to expiring, and posts to our `#monitoring` Slack if any of them are. |
Contributor
There was a problem hiding this comment.
Suggested change
| For example, we used this to check if any of our domain certificates were close to their expiry. Each day, a github action runs at 10:45, checks if our certificates are dangerously close to expiring, and posts to our `#monitoring` Slack if any of them are. | |
| For example, we use this to check if any of our domain certificates are close to their expiry. Each day, a github action runs at 10:45, checks if our certificates are dangerously close to expiring, and posts to our `#monitoring` Slack if any of them are. |
probably should use present tense I think
anhpngt
reviewed
Apr 18, 2022
|
|
||
| name: check_weather | ||
| on: | ||
| schedule: # run at 010:45 UTC daily |
Contributor
There was a problem hiding this comment.
Suggested change
| schedule: # run at 010:45 UTC daily | |
| schedule: # run at 10:45 UTC daily |
anhpngt
reviewed
Apr 18, 2022
|
|
||
| This is a simple monitoring flow really; Run Check -> Alert if Problem. | ||
|
|
||
| To do this, were going to use three Github actions. |
Contributor
There was a problem hiding this comment.
Suggested change
| To do this, were going to use three Github actions. | |
| To do this, we are going to use a Github action with 3 sequential jobs. |
anhpngt
reviewed
Apr 18, 2022
| ```yaml | ||
| # github/workflows/check_weather.yml` | ||
|
|
||
| name: check_weather |
Contributor
There was a problem hiding this comment.
The previous section was talking about certificate expiry, but this section is checking weather instead. This flow is a bit awkward and confusing to me.
Maybe we can add this paragraph:
For simplification and to focus on Github Action, the following example checks and
reports bad weather instead of our server's certificate. In practice, we can use the
example to check anything necessary.
anhpngt
reviewed
Apr 18, 2022
| shell: bash | ||
| run: ./check-weather.sh | ||
|
|
||
| # post results |
Contributor
There was a problem hiding this comment.
Suggested change
| # post results | |
| # post results | |
| # note that this step only runs when the previous step fails |
anhpngt
reviewed
Apr 18, 2022
| ``` | ||
| Once your ready to run your workflow, make sure it's merged into your main github branch, for us it's `develop`. | ||
|
|
||
| Then it will run on it's CRON schedule, and you can also dispatch it manually from the actions page to run the check immediately. |
Contributor
There was a problem hiding this comment.
Suggested change
| Then it will run on it's CRON schedule, and you can also dispatch it manually from the actions page to run the check immediately. | |
| Then it will run on its CRON schedule, and you can also trigger it manually from the actions page to run the check immediately. |
Contributor
|
I finished with my comments. Not much really 😂 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.