-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Add documentation to install prometheus and grafana #2912
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2912 +/- ##
==========================================
+ Coverage 47.57% 47.59% +0.01%
==========================================
Files 77 77
Lines 5528 5528
==========================================
+ Hits 2630 2631 +1
+ Misses 2559 2557 -2
- Partials 339 340 +1
Continue to review full report at Codecov.
|
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.
Mostly grammar comments
docs/user-guide/monitoring.md
Outdated
@@ -0,0 +1,161 @@ | |||
# Prometheus and Grafana installation | |||
|
|||
This tutorial will show you how to install [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) for the metric scraping from the NGINX Ingress controller. |
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.
"for scraping the metrics of" sounds better to me
docs/user-guide/monitoring.md
Outdated
|
||
## Before You Begin | ||
|
||
Now, deploy the Ingress controller following the instructions [here](../deploy/index.md). |
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.
Since it's a prerequisite I'd change the imperative form "Now, ..." to "The NGINX Ingress controller should already be deployed according to the deployment instructions. See [Deployment] (...)"
docs/user-guide/monitoring.md
Outdated
|
||
Now, deploy the Ingress controller following the instructions [here](../deploy/index.md). | ||
|
||
Note that the yaml files that are used in this tutorial, stored in [deploy/monitoring](https://github.com/kubernetes/ingress-nginx/tree/master/deploy/monitoring) folder in GitHub repository [kubernetes/ingress-nginx](https://github.com/kubernetes/ingress-nginx). |
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.
", stored ..." -> "are stored in the ... folder of the GitHub repository"
docs/user-guide/monitoring.md
Outdated
Note that the yaml files that are used in this tutorial, stored in [deploy/monitoring](https://github.com/kubernetes/ingress-nginx/tree/master/deploy/monitoring) folder in GitHub repository [kubernetes/ingress-nginx](https://github.com/kubernetes/ingress-nginx). | ||
|
||
## Deploy and configure Prometheus Server | ||
|
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.
"is needed to configure so that it can ..." -> "must be configured so that it can discover the Services endpoints."
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.
"running in the cluster"
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.
"no extra configuration is needed"
docs/user-guide/monitoring.md
Outdated
## Deploy and configure Prometheus Server | ||
|
||
The Prometheus server is needed to configure so that it can discover endpoints of services. If a Prometheus server is already running in cluster and if it is configured in a way that it can discover service endpoints, no extra configuration will be needed. | ||
If there is no existing Prometheus server running, rest of this tutorial will create a Prometheus server with appropriate configuration. |
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.
"the rest of this tutorial will guide you through the step needed to deploy a properly configured Prometheus server."
docs/user-guide/monitoring.md
Outdated
|
||
### Prometheus Dashboard | ||
|
||
Now to open prometheus dashboard on Browser: |
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.
"the Prometheus dashboard in a web browser"
docs/user-guide/monitoring.md
Outdated
10.192.0.2 10.192.0.3 10.192.0.4 | ||
``` | ||
|
||
Now, open your browser and go to the following URL: _http://{node IP address}:{prometheus-svc-nodeport}_ to visit Prometheus Dashboard. |
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.
All instructions steps start with "Now, ". It would sound better to me with if sentences simply started with a verb (eg. "Open this", "Obtain that"), but just a personal note.
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.
"the Prometheus dashboard"
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.
"visit the following URL"
docs/user-guide/monitoring.md
Outdated
emptyDir: {} | ||
``` | ||
|
||
Now, run the following command to deploy prometheus in kubernetes: |
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.
P rometheus
K ubernetes
docs/user-guide/monitoring.md
Outdated
Now obtain the IP address of the nodes in the cluster running: | ||
|
||
```console | ||
$ kubectl get nodes --selector=kubernetes.io/role!=master -o jsonpath={.items[*].status.addresses[?\(@.type==\"InternalIP\"\)].address} |
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.
This is super fancy 👍 But for a documentation page, which is supposed to be as clear as possible to all kind of users, wouldn't get nodes
be sufficient?
docs/user-guide/monitoring.md
Outdated
grafana NodePort 10.98.233.86 <none> 9090:31086/TCP 10m | ||
``` | ||
|
||
Now, open your browser and go to the following URL: _http://{node IP address}:{prometheus-svc-nodeport}_ to visit Prometheus Dashboard. |
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.
"visit the following URL"
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.
"Prometheus" -> "Grafana"
302e437
to
6a3b7dd
Compare
docs/user-guide/monitoring.md
Outdated
|
||
## Deploy and configure Prometheus Server | ||
|
||
The Prometheus server is needed to configure so that it can discover endpoints of services. If a Prometheus server is already running in the cluster and if it is configured in a way that it can find the ingress controller pods, no extra configuration is needed. |
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.
"is needed to configure" -> "must be configured "
docs/user-guide/monitoring.md
Outdated
|
||
The Prometheus server is needed to configure so that it can discover endpoints of services. If a Prometheus server is already running in the cluster and if it is configured in a way that it can find the ingress controller pods, no extra configuration is needed. | ||
|
||
If there is no existing Prometheus server running, the rest of this tutorial will guide you through the step needed to deploy a properly configured Prometheus server. |
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.
step s
(my fault, missed it in my previous review comment)
docs/user-guide/monitoring.md
Outdated
|
||
The NGINX Ingress controller should already be deployed according to the deployment instructions [here](../deploy/index.md). | ||
|
||
Note that the yaml files that are used in this tutorial, are stored in the [deploy/monitoring](https://github.com/kubernetes/ingress-nginx/tree/master/deploy/monitoring) folder of the GitHub repository [kubernetes/ingress-nginx](https://github.com/kubernetes/ingress-nginx). |
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.
(nit pick)
- "that the yaml files that are used" -> "that the yaml files used"
- "
,are" (left over comma?)
docs/user-guide/monitoring.md
Outdated
|
||
The configuration file is provided by a `ConfigMap`. | ||
|
||
```yaml |
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.
If this is a dupe of deploy/monitoring/configuration.yaml
, wouldn't it be better to just link it?
docs/user-guide/monitoring.md
Outdated
|
||
The next yaml snippet is used to deploy Prometheus in Kubernetes: | ||
|
||
```yaml |
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.
If this is a dupe of deploy/monitoring/prometheus.yaml
, wouldn't it be better to just link it?
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
docs/user-guide/monitoring.md
Outdated
10.192.0.2 10.192.0.3 10.192.0.4 | ||
``` | ||
|
||
Open your browser and visit the following URL: _http://{node IP address}:{prometheus-svc-nodeport}_ to visit the Prometheus Dashboard. |
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.
"visit ... to visit" -> "visit ... to load"
docs/user-guide/monitoring.md
Outdated
|
||
This tutorial will show you how to install [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) for scraping the metrics of the NGINX Ingress controller. | ||
|
||
!!! Important: this example uses `emptyDir` volumes for Prometheus and Grafana. This means once the pod dies you will lose all the data. |
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.
"dies" -> "gets terminated" ✝️
docs/user-guide/monitoring.md
Outdated
|
||
Open your browser and visit the following URL: _http://{node IP address}:{prometheus-svc-nodeport}_ to visit the Prometheus Dashboard. | ||
|
||
According to the above example, this URL will be [http://10.192.0.3:32630](http://10.192.0.3:32630). |
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.
(nit) [http://xxx](http://xxx)
is the same as just http://xxx
in markdown.
docs/user-guide/monitoring.md
Outdated
grafana NodePort 10.98.233.86 <none> 9090:31086/TCP 10m | ||
``` | ||
|
||
Open your browser and visit the following URL: _http://{node IP address}:{grafana-svc-nodeport}_ to visit the Grafana Dashboard. |
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.
"visit ... to visit" -> "visit ... to load"
docs/user-guide/monitoring.md
Outdated
``` | ||
|
||
Open your browser and visit the following URL: _http://{node IP address}:{grafana-svc-nodeport}_ to visit the Grafana Dashboard. | ||
According to the above example, this URL will be [http://10.192.0.3:31086](http://10.192.0.3:31086). |
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.
(nit) [http://xxx](http://xxx)
is the same as just http://xxx
in markdown.
4553563
to
d23ce34
Compare
d23ce34
to
322dae6
Compare
@antoineco is this ok to merge? |
Oh, sure. Missed the label removal, sorry! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aledbf, antoineco The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
No description provided.