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. DetailsIn 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
39fdf24 to
c657fac
Compare
| - 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.
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
2ee9199 to
64920d9
Compare
|
/hold |
everettraven
left a comment
There was a problem hiding this comment.
Just a few nits, other than that looks good to me! Thanks @assafad for working on this!
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.
@everettraven, @varshaprasad96 I think sanity fails because this URL is not accessible. How can we handle that?
There was a problem hiding this comment.
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). |
|
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 DetailsIn 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. |
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