mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-25 20:48:11 +00:00
Merge pull request #2281 from catherineluse/metrics
Fix inaccuracies in monitoring sections
This commit is contained in:
@@ -41,19 +41,20 @@ Grafana allows you to query, visualize, alert, and ultimately, understand your c
|
||||
|
||||
Rancher determines which users can access the new Grafana instance, as well as the objects they can view within it, by validating them against the user's [cluster or project roles]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/). In other words, a user's access in Grafana mirrors their access in Rancher.
|
||||
|
||||
### Accessing Grafana from the Grafana Instance
|
||||
When you go to the Grafana instance, you will be logged in with the username `admin` and the password `admin`. If you log out and log in again, you will be prompted to change your password. You will only have access to the URL of the Grafana instance if you have access to view the corresponding metrics in Rancher. So for example, if your Rancher permissions are scoped to the project level, you won't be able to see the Grafana instance for cluster-level metrics.
|
||||
|
||||
1. From the **Global** view, navigate to the cluster that you want to access Grafana.
|
||||
### Accessing the Cluster-level Grafana Instance
|
||||
|
||||
1. From the main navigation bar, choose **Apps**. In versions prior to v2.2.0, choose **Catalog Apps** on the main navigation bar.
|
||||
1. From the **Global** view, navigate to a cluster that has monitoring enabled.
|
||||
|
||||
1. Find the application based on what level of metrics you want to view:
|
||||
1. Go to the **System** project view. This project is where the cluster-level Grafana instance runs.
|
||||
|
||||
- **Cluster Level**: Find the `cluster-monitoring` application.
|
||||
- **Project Level**: Find the `project-monitoring` application.
|
||||
1. Click **Apps.** In versions prior to v2.2.0, choose **Catalog Apps** on the main navigation bar.
|
||||
|
||||
1. Click the `/index.html` link. You will be redirected to a new webpage for Grafana, which shows metrics for either the cluster or project depending on which application you selected.
|
||||
1. Go to the `cluster-monitoring` application.
|
||||
|
||||
1. Sign in to Grafana. The default username is `admin` and the default password is `admin`. For security, Rancher recommends changing the default password after logging in.
|
||||
1. In the `cluster-monitoring` application, there are two `/index.html` links: one that leads to a Grafana instance and one that leads to a Prometheus instance. When you click the Grafana link, it will redirect you to a new webpage for Grafana, which shows metrics for the cluster.
|
||||
|
||||
**Results:** You will be logged into Grafana from the Grafana instance. After logging in, you can view the preset Grafana dashboards, which are imported via the [Grafana provisioning mechanism](http://docs.grafana.org/administration/provisioning/#dashboards), so you cannot modify them directly. For now, if you want to configure your own dashboards, clone the original and modify the new copy.
|
||||
1. You will be signed in to the Grafana instance automatically. The default username is `admin` and the default password is `admin`. For security, we recommend that you log out of Grafana, log back in with the `admin` password, and change your password.
|
||||
|
||||
**Results:** You are logged into Grafana from the Grafana instance. After logging in, you can view the preset Grafana dashboards, which are imported via the [Grafana provisioning mechanism](http://docs.grafana.org/administration/provisioning/#dashboards), so you cannot modify them directly. For now, if you want to configure your own dashboards, clone the original and modify the new copy.
|
||||
|
||||
@@ -13,7 +13,7 @@ This section covers the following topics:
|
||||
|
||||
- [Monitoring scope](#monitoring-scope)
|
||||
- [Permissions to configure project monitoring](#permissions-to-configure-project-monitoring)
|
||||
- [Configuring project monitoring](#configuring-project-monitoring)
|
||||
- [Enabling project monitoring](#enabling-project-monitoring)
|
||||
- [Project-level monitoring resource requirements](#project-level-monitoring-resource-requirements)
|
||||
- [Project metrics](#project-metrics)
|
||||
|
||||
@@ -33,9 +33,11 @@ Using Prometheus, you can monitor Rancher at both the [cluster level]({{< baseur
|
||||
|
||||
Only [administrators]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/global-permissions/), [cluster owners or members]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#cluster-roles), or [project owners]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#project-roles) can configure project level monitoring. Project members can only view monitoring metrics.
|
||||
|
||||
### Configuring Project Monitoring
|
||||
### Enabling Project Monitoring
|
||||
|
||||
1. From the **Global** view, navigate to the project that you want to configure project monitoring.
|
||||
> **Prerequisite:** Cluster monitoring must be [enabled.]({{<baseurl>}}/rancher/v2.x/en/cluster-admin/tools/monitoring/)
|
||||
|
||||
1. Go to the project where monitoring should be enabled. Note: When cluster monitoring is enabled, monitoring is also enabled by default in the **System** project.
|
||||
|
||||
1. Select **Tools > Monitoring** in the navigation bar.
|
||||
|
||||
@@ -55,9 +57,25 @@ Grafana | 100m | 100Mi | 200m | 200Mi | No
|
||||
|
||||
### Project Metrics
|
||||
|
||||
If [cluster monitoring]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/monitoring/) is also enabled for the project, [workload metrics]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/monitoring/cluster-metrics/#workload-metrics) are available for the project.
|
||||
[Workload metrics]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/monitoring/cluster-metrics/#workload-metrics) are available for the project if monitoring is enabled at the [cluster level]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/monitoring/) and at the [project level.](#enabling-project-monitoring)
|
||||
|
||||
You can monitor custom metrics from any [exporters](https://prometheus.io/docs/instrumenting/exporters/) as long as project monitoring is enabled. You can also expose some custom endpoints on deployments without needing to configure Prometheus for your project.
|
||||
You can monitor custom metrics from any [exporters.](https://prometheus.io/docs/instrumenting/exporters/) You can also expose some custom endpoints on deployments without needing to configure Prometheus for your project.
|
||||
|
||||
> **Example:**
|
||||
> A [Redis](https://redis.io/) application is deployed in the namespace `redis-app` in the project `Datacenter`. It is monitored via [Redis exporter](https://github.com/oliver006/redis_exporter). After enabling project monitoring, you can edit the application to configure the <b>Advanced Options -> Custom Metrics</b> section. Enter the `Container Port` and `Path` and select the `Protocol`.
|
||||
|
||||
To access a project-level Grafana instance,
|
||||
|
||||
1. From the **Global** view, navigate to a cluster that has monitoring enabled.
|
||||
|
||||
1. Go to a project that has monitoring enabled.
|
||||
|
||||
1. From the project view, click **Apps.** In versions prior to v2.2.0, choose **Catalog Apps** on the main navigation bar.
|
||||
|
||||
1. Go to the `project-monitoring` application.
|
||||
|
||||
1. In the `project-monitoring` application, there are two `/index.html` links: one that leads to a Grafana instance and one that leads to a Prometheus instance. When you click the Grafana link, it will redirect you to a new webpage for Grafana, which shows metrics for the cluster.
|
||||
|
||||
1. You will be signed in to the Grafana instance automatically. The default username is `admin` and the default password is `admin`. For security, we recommend that you log out of Grafana, log back in with the `admin` password, and change your password.
|
||||
|
||||
**Results:** You will be logged into Grafana from the Grafana instance. After logging in, you can view the preset Grafana dashboards, which are imported via the [Grafana provisioning mechanism](http://docs.grafana.org/administration/provisioning/#dashboards), so you cannot modify them directly. For now, if you want to configure your own dashboards, clone the original and modify the new copy.
|
||||
|
||||
Reference in New Issue
Block a user