From 63955ff354f7b18ef14fc803f0d1fdfc23961df8 Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Wed, 12 Feb 2020 13:27:18 -0700 Subject: [PATCH] Fix inaccuracies in monitoring sections --- .../monitoring/viewing-metrics/_index.md | 15 ++++++------ .../project-admin/tools/monitoring/_index.md | 24 +++++++++++++++---- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/content/rancher/v2.x/en/cluster-admin/tools/monitoring/viewing-metrics/_index.md b/content/rancher/v2.x/en/cluster-admin/tools/monitoring/viewing-metrics/_index.md index 343968af833..39ea0372cce 100644 --- a/content/rancher/v2.x/en/cluster-admin/tools/monitoring/viewing-metrics/_index.md +++ b/content/rancher/v2.x/en/cluster-admin/tools/monitoring/viewing-metrics/_index.md @@ -41,18 +41,19 @@ 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 be able to log in to the Grafana instance if you have access to view the same metrics in Rancher. So for example, if your Rancher permissions are scoped to the project level, you won't be able to see cluster-level metrics in Grafana. -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. 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. Click the first `/index.html` link, and you will be redirected to a new webpage for Grafana, which shows metrics for the cluster. 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. diff --git a/content/rancher/v2.x/en/project-admin/tools/monitoring/_index.md b/content/rancher/v2.x/en/project-admin/tools/monitoring/_index.md index 76afbdf2cb6..3a324bdc47c 100644 --- a/content/rancher/v2.x/en/project-admin/tools/monitoring/_index.md +++ b/content/rancher/v2.x/en/project-admin/tools/monitoring/_index.md @@ -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,7 +33,7 @@ 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. @@ -55,9 +55,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 Advanced Options -> Custom Metrics 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. Click the first `/index.html` link, and you will be redirected to a new webpage for Grafana, which shows metrics for the project. + +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. + +**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.