-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add metrics and alerts tutorial to the docs #6341
Add metrics and alerts tutorial to the docs #6341
Conversation
/cc @sradco |
@assafad: GitHub didn't allow me to request PR reviews from the following users: sradco. Note that only operator-framework members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
baeaa34
to
d92454e
Compare
website/content/en/docs/building-operators/golang/advanced-topics.md
Outdated
Show resolved
Hide resolved
website/content/en/docs/building-operators/golang/advanced-topics.md
Outdated
Show resolved
Hide resolved
website/content/en/docs/building-operators/golang/advanced-topics.md
Outdated
Show resolved
Hide resolved
39fdf24
to
c657fac
Compare
website/content/en/docs/building-operators/golang/advanced-topics.md
Outdated
Show resolved
Hide resolved
website/content/en/docs/building-operators/golang/advanced-topics.md
Outdated
Show resolved
Hide resolved
- Create a new `monitoring` directory, which will contain the metrics and alerts implementation. It is recommended to create a dedicated `monitoring` directory, in order to keep the monitoring implementation separated from the core operator's logic. This will allow easier maintenance of both the core operator code and the monitoring code. | ||
- Add the following command to the `dockerfile`: | ||
```dockerfile | ||
COPY monitoring/ monitoring/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this pre-requisite and the one before should be in a separate header like:
#### Add Monitoring to Your Operator
For a quick start, Copy the example `/monitoring` sub folder from the Memcached operator[add link to the example operator] and update it to you needs.
This sub folder will include all the monitoring related code and logic.
**Note:** We created a dedicated `/monitoring` directory, since it is recommended to keep the monitoring code and the core operator code separated.
6cff809
to
099d163
Compare
website/content/en/docs/building-operators/golang/advanced-topics.md
Outdated
Show resolved
Hide resolved
website/content/en/docs/building-operators/golang/advanced-topics.md
Outdated
Show resolved
Hide resolved
2ee9199
to
64920d9
Compare
/hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few nits, other than that looks good to me! Thanks @assafad for working on this!
website/content/en/docs/building-operators/golang/advanced-topics.md
Outdated
Show resolved
Hide resolved
website/content/en/docs/building-operators/golang/advanced-topics.md
Outdated
Show resolved
Hide resolved
website/content/en/docs/building-operators/golang/advanced-topics.md
Outdated
Show resolved
Hide resolved
website/content/en/docs/building-operators/golang/advanced-topics.md
Outdated
Show resolved
Hide resolved
d15160e
to
29981a6
Compare
/unhold |
|
||
|
||
where we assume that the prometheus service is available in the `monitoring` namespace. | ||
Now you can access Prometheus UI using [http://localhost:9090](http://localhost:9090). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@everettraven, @varshaprasad96 I think sanity fails because this URL is not accessible. How can we handle that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@everettraven @varshaprasad96 any idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a temporary workaround, we need not add it as a link:
Now you can access Prometheus UI using [http://localhost:9090](http://localhost:9090). | |
Now you can access Prometheus UI. It is usually available at `http://localhost:9090`. For more details on exposing prometheus metrics, please [refer](https://prometheus.io/docs/prometheus/latest/getting_started/#starting-prometheus). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Hi @sradco, @everettraven, @varshaprasad96, anything else we're missing in order to merge this one? |
29981a6
to
3b40007
Compare
/lgtm |
@sradco: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0889ac0
to
2711ee4
Compare
Signed-off-by: assaf-admi <aadmi@redhat.com>
2711ee4
to
d851f60
Compare
Signed-off-by: assaf-admi <aadmi@redhat.com> Signed-off-by: Catherine Chan-Tse <cchantse@redhat.com>
Description of the change:
Add a monitoring tutorial to the advanced-topics page. This tutorial explains how to expose the first operator's custom metrics and alerts, by demonstrating over the monitoring sample - memcached-operator.
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs