forked from RemoteSync/grafana-meta-monitoring-chart
Compare commits
25 Commits
v0.0.1
...
more_docs_
Author | SHA1 | Date | |
---|---|---|---|
|
1f980f393e | ||
|
47d9190eda | ||
|
5ff9bd16c9 | ||
|
2d711f7168 | ||
|
c666bf69c9 | ||
|
41619b99b1 | ||
|
5923139796 | ||
|
329d5822ea | ||
|
5498b27ad6 | ||
|
da687315e7 | ||
|
8f20e45c77 | ||
|
e81b1246f5 | ||
|
b103fb3434 | ||
|
9349d2d906 | ||
|
31536103c8 | ||
|
13c28aa50a | ||
|
385d0dd543 | ||
|
458451922d | ||
|
4b0d457af0 | ||
|
e60b2aecdc | ||
|
6244de677e | ||
|
d14e933e84 | ||
|
0210fba39d | ||
|
a97fa64880 | ||
|
0938193982 |
18
.github/workflows/helm-release.yml
vendored
18
.github/workflows/helm-release.yml
vendored
@@ -8,9 +8,6 @@ env:
|
|||||||
CR_PACKAGE_PATH: "${{ github.workspace }}/.cr-release-packages"
|
CR_PACKAGE_PATH: "${{ github.workspace }}/.cr-release-packages"
|
||||||
CR_TOOL_PATH: "${{ github.workspace }}/.cr-tool"
|
CR_TOOL_PATH: "${{ github.workspace }}/.cr-tool"
|
||||||
CR_VERSION: "1.5.0"
|
CR_VERSION: "1.5.0"
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -65,12 +62,23 @@ jobs:
|
|||||||
needs: [setup]
|
needs: [setup]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: needs.setup.outputs.changed == 'true'
|
if: needs.setup.outputs.changed == 'true'
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
|
- id: get-secrets
|
||||||
|
uses: grafana/shared-workflows/actions/get-vault-secrets@main
|
||||||
|
with:
|
||||||
|
# Secrets placed in the ci/repo/grafana/<repo>/<path> path in Vault
|
||||||
|
repo_secrets: |
|
||||||
|
APP_ID=github-app:app-id
|
||||||
|
PRIVATE_KEY=github-app:private-key
|
||||||
- uses: actions/create-github-app-token@v1
|
- uses: actions/create-github-app-token@v1
|
||||||
id: app-token
|
id: app-token
|
||||||
with:
|
with:
|
||||||
app-id: ${{ secrets.app-id }}
|
app-id: ${{ env.APP_ID }}
|
||||||
private-key: ${{ secrets.private-key }}
|
private-key: ${{ env.PRIVATE_KEY }}
|
||||||
|
owner: ${{ github.repository_owner }}
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
20
README.md
20
README.md
@@ -1,20 +1,9 @@
|
|||||||
# meta-monitoring-chart
|
# meta-monitoring-chart
|
||||||
|
|
||||||
This is a meta-monitoring chart for GEL, GEM and GET. It should be installed in a
|
This is a meta-monitoring chart for Loki.
|
||||||
separate namespace next to GEM, GEL or GET installations.
|
|
||||||
|
|
||||||
Note that this is pre-production software at the moment.
|
Note that this is pre-production software at the moment.
|
||||||
|
|
||||||
## Preparation
|
|
||||||
|
|
||||||
Create a values.yaml file based on the [default one](../charts/meta-monitoring/values.yaml).
|
|
||||||
|
|
||||||
1. Add or remove the namespaces to monitor in the `namespacesToMonitor` setting
|
|
||||||
|
|
||||||
1. Set the cluster name in the `clusterName` setting. This will be added as a label to all logs, metrics and traces.
|
|
||||||
|
|
||||||
1. Create a `meta` namespace.
|
|
||||||
|
|
||||||
## Local and cloud modes
|
## Local and cloud modes
|
||||||
|
|
||||||
The chart has 2 modes: local and cloud. In the local mode logs, metrics and/or traces are sent
|
The chart has 2 modes: local and cloud. In the local mode logs, metrics and/or traces are sent
|
||||||
@@ -34,12 +23,6 @@ Both modes can be enabled at the same time.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```
|
|
||||||
helm install -n meta --skip-crds -f values.yaml meta ./charts/meta-monitoring
|
|
||||||
```
|
|
||||||
|
|
||||||
If the platform supports CRDs the `--skip-crds` option can be removed. However the CRDs are not used by this chart.
|
|
||||||
|
|
||||||
For more instructions including how to update the chart go to the [installation](docs/installation.md) page.
|
For more instructions including how to update the chart go to the [installation](docs/installation.md) page.
|
||||||
|
|
||||||
## Supported features
|
## Supported features
|
||||||
@@ -59,7 +42,6 @@ Most of these features are enabled by default. See the values.yaml file for how
|
|||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
- The [loki.source.kubernetes](https://grafana.com/docs/agent/latest/flow/reference/components/loki.source.kubernetes/) component of the Grafana Agent is used to scrape Kubernetes log files. This component is marked experimental at the moment.
|
|
||||||
- This has not been tested on Openshift yet.
|
- This has not been tested on Openshift yet.
|
||||||
- The underlying Loki, Mimir and Tempo are at the default size installed by the Helm chart. This might need changing when monitoring bigger Loki, Mimir or Tempo installations.
|
- The underlying Loki, Mimir and Tempo are at the default size installed by the Helm chart. This might need changing when monitoring bigger Loki, Mimir or Tempo installations.
|
||||||
- MinIO is used as storage at the moment with a limited retention. At the moment this chart cannot be used for monitoring over longer periods.
|
- MinIO is used as storage at the moment with a limited retention. At the moment this chart cannot be used for monitoring over longer periods.
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: loki
|
- name: loki
|
||||||
repository: https://grafana.github.io/helm-charts
|
repository: https://grafana.github.io/helm-charts
|
||||||
version: 6.2.0
|
version: 6.3.4
|
||||||
- name: alloy
|
- name: alloy
|
||||||
repository: https://grafana.github.io/helm-charts
|
repository: https://grafana.github.io/helm-charts
|
||||||
version: 0.1.1
|
version: 0.1.1
|
||||||
@@ -10,9 +10,9 @@ dependencies:
|
|||||||
version: 5.3.0
|
version: 5.3.0
|
||||||
- name: tempo-distributed
|
- name: tempo-distributed
|
||||||
repository: https://grafana.github.io/helm-charts
|
repository: https://grafana.github.io/helm-charts
|
||||||
version: 1.9.2
|
version: 1.9.3
|
||||||
- name: minio
|
- name: minio
|
||||||
repository: https://charts.min.io
|
repository: https://charts.min.io
|
||||||
version: 5.1.0
|
version: 5.1.0
|
||||||
digest: sha256:f9a79bfc30df65ba2ff94a097844f6b3aa41970318d5fb1708b3aeecebbe68d1
|
digest: sha256:3a47359025acb478698760e2f27b1608fab95174508e32f86e31a06d7856fe32
|
||||||
generated: "2024-04-16T08:10:03.998180905Z"
|
generated: "2024-04-23T07:02:48.466787696Z"
|
||||||
|
@@ -22,7 +22,7 @@ appVersion: "0.0.1"
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: loki
|
- name: loki
|
||||||
repository: https://grafana.github.io/helm-charts
|
repository: https://grafana.github.io/helm-charts
|
||||||
version: 6.2.0
|
version: 6.3.4
|
||||||
condition: local.logs.enabled
|
condition: local.logs.enabled
|
||||||
- name: alloy
|
- name: alloy
|
||||||
repository: https://grafana.github.io/helm-charts
|
repository: https://grafana.github.io/helm-charts
|
||||||
@@ -33,7 +33,7 @@ dependencies:
|
|||||||
condition: local.metrics.enabled
|
condition: local.metrics.enabled
|
||||||
- name: tempo-distributed
|
- name: tempo-distributed
|
||||||
repository: https://grafana.github.io/helm-charts
|
repository: https://grafana.github.io/helm-charts
|
||||||
version: 1.9.2
|
version: 1.9.3
|
||||||
condition: local.traces.enabled
|
condition: local.traces.enabled
|
||||||
- name: minio
|
- name: minio
|
||||||
repository: https://charts.min.io
|
repository: https://charts.min.io
|
||||||
|
Binary file not shown.
BIN
charts/meta-monitoring/charts/loki-6.3.4.tgz
Normal file
BIN
charts/meta-monitoring/charts/loki-6.3.4.tgz
Normal file
Binary file not shown.
Binary file not shown.
BIN
charts/meta-monitoring/charts/tempo-distributed-1.9.3.tgz
Normal file
BIN
charts/meta-monitoring/charts/tempo-distributed-1.9.3.tgz
Normal file
Binary file not shown.
@@ -1,12 +1,11 @@
|
|||||||
# Specify the namespaces to monitor here
|
# Specify the namespaces to monitor here
|
||||||
namespacesToMonitor:
|
namespacesToMonitor:
|
||||||
- loki
|
- loki
|
||||||
- mimir
|
|
||||||
- tempo
|
|
||||||
# The name of the cluster where this will be installed
|
# The name of the cluster where this will be installed
|
||||||
clusterLabelValue: "meta-monitoring"
|
clusterLabelValue: "meta-monitoring"
|
||||||
|
|
||||||
# Set to true to write logs, metrics or traces to Grafana Cloud
|
# Set to true to write logs, metrics or traces to Grafana Cloud
|
||||||
|
# The secrets have to be created first
|
||||||
cloud:
|
cloud:
|
||||||
logs:
|
logs:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
10
docs/create_new_release.md
Normal file
10
docs/create_new_release.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Create a new release
|
||||||
|
|
||||||
|
1. Update the version field in charts/meta-monitoring/Chart.yaml in a new PR. Merge this PR if approved.
|
||||||
|
|
||||||
|
2. On the [Actions tab](https://github.com/grafana/meta-monitoring-chart/actions):
|
||||||
|
- Select `Release Helm chart` in the workflows on the left
|
||||||
|
- Click the `Run workflow` button
|
||||||
|
- Leave the `main` branch as is
|
||||||
|
- Click the green `Run workflow` button
|
||||||
|
|
@@ -1,5 +1,19 @@
|
|||||||
# Install this chart
|
# Install this chart
|
||||||
|
|
||||||
|
## Preparation for Cloud mode (preferred)
|
||||||
|
|
||||||
|
1. Use an existing Grafana Cloud account or setup a new one. Then create an access token:
|
||||||
|
|
||||||
|
1. In Grafana go to Administration -> Users and Access -> Cloud access policies.
|
||||||
|
|
||||||
|
1. Click `Create access policy`.
|
||||||
|
|
||||||
|
1. Fill in the `Display name` field and check the `Write` check box for metrics, logs and traces. Then click `Create`.
|
||||||
|
|
||||||
|
1. On the newly created access policy click `Add token`.
|
||||||
|
|
||||||
|
1. Fill in the `Token name` field and click `Create`. Make a copy of the token as it will be used later on.
|
||||||
|
|
||||||
1. Create the meta namespace
|
1. Create the meta namespace
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -11,36 +25,142 @@
|
|||||||
```
|
```
|
||||||
kubectl create secret generic logs -n meta \
|
kubectl create secret generic logs -n meta \
|
||||||
--from-literal=username=<logs username> \
|
--from-literal=username=<logs username> \
|
||||||
--from-literal=password=<logs password>
|
--from-literal=password=<token>
|
||||||
--from-literal=endpoint='https://logs-prod-us-central1.grafana.net/loki/api/v1/push'
|
--from-literal=endpoint='https://logs-prod-us-central1.grafana.net/loki/api/v1/push'
|
||||||
|
|
||||||
kubectl create secret generic metrics -n meta \
|
kubectl create secret generic metrics -n meta \
|
||||||
--from-literal=username=<metrics username> \
|
--from-literal=username=<metrics username> \
|
||||||
--from-literal=password=<metrics password>
|
--from-literal=password=<token>
|
||||||
--from-literal=endpoint='https://prometheus-us-central1.grafana.net/api/prom/push'
|
--from-literal=endpoint='https://prometheus-us-central1.grafana.net/api/prom/push'
|
||||||
|
|
||||||
kubectl create secret generic traces -n meta \
|
kubectl create secret generic traces -n meta \
|
||||||
--from-literal=username=<traces username> \
|
--from-literal=username=<traces username> \
|
||||||
--from-literal=password=<traces password>
|
--from-literal=password=<token>
|
||||||
--from-literal=endpoint='https://tempo-us-central1.grafana.net/tempo'
|
--from-literal=endpoint='https://tempo-us-central1.grafana.net/tempo'
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Create a values.yaml file based on the [default one](../charts/meta-monitoring/values.yaml). Fill in the names of the secrets created above as needed.
|
The logs, metrics and traces usernames are the `User / Username / Instance IDs` of the Loki, Prometheus/Mimir and Tempo instances in Grafana Cloud. From `Home` in Grafana click on `Stacks`. Then go to the `Details` pages of Loki, Prometheus/Mimir and Tempo.
|
||||||
|
|
||||||
|
1. Create a values.yaml file based on the [default one](../charts/meta-monitoring/values.yaml). Fill in the names of the secrets created above as needed. An example minimal values.yaml looks like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
namespacesToMonitor:
|
||||||
|
- loki
|
||||||
|
|
||||||
|
cloud:
|
||||||
|
logs:
|
||||||
|
enabled: true
|
||||||
|
secret: "logs"
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
secret: "metrics"
|
||||||
|
traces:
|
||||||
|
enabled: true
|
||||||
|
secret: "traces"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Preparation for Local mode
|
||||||
|
|
||||||
|
1. Create the meta namespace
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl create namespace meta
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Create a values.yaml file based on the [default one](../charts/meta-monitoring/values.yaml). An example minimal values.yaml looks like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
namespacesToMonitor:
|
||||||
|
- loki
|
||||||
|
|
||||||
|
cloud:
|
||||||
|
logs:
|
||||||
|
enabled: false
|
||||||
|
metrics:
|
||||||
|
enabled: false
|
||||||
|
traces:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
local:
|
||||||
|
grafana:
|
||||||
|
enabled:true
|
||||||
|
logs:
|
||||||
|
enabled: true
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
traces:
|
||||||
|
enabled: true
|
||||||
|
minio:
|
||||||
|
enabled: true
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installing the chart
|
||||||
|
|
||||||
|
1. Add the repo
|
||||||
|
|
||||||
|
```
|
||||||
|
helm repo add grafana https://grafana.github.io/helm-charts
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Fetch the latest charts from the grafana repo
|
||||||
|
|
||||||
|
```
|
||||||
|
helm repo update grafana
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
1. Install this helm chart
|
1. Install this helm chart
|
||||||
|
|
||||||
```
|
```
|
||||||
helm install -n meta -f values.yaml meta ./charts/meta-monitoring
|
helm install -n meta -f values.yaml meta grafana/meta-monitoring
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Upgrade
|
1. Upgrade
|
||||||
|
|
||||||
```
|
```
|
||||||
helm upgrade --install -f values.yaml -n meta meta ./charts/meta-monitoring
|
helm upgrade --install -f values.yaml -n meta meta grafana/meta-monitoring
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Delete this chart:
|
1. Delete this chart:
|
||||||
|
|
||||||
```
|
```
|
||||||
helm delete -n meta meta
|
helm delete -n meta meta
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Installing the dashboards and rules on Grafana Cloud
|
||||||
|
|
||||||
|
## Installing the dashboards on Grafana Cloud
|
||||||
|
|
||||||
|
Only the files for the application monitored have to be copied. When monitoring Loki import dashboard files starting with 'loki-'.
|
||||||
|
|
||||||
|
For each of the dashboard files in charts/meta-monitoring/src/dashboards folder do the following:
|
||||||
|
|
||||||
|
1. Click on 'Dashboards' in Grafana
|
||||||
|
|
||||||
|
1. Click on the 'New` button and select 'Import'
|
||||||
|
|
||||||
|
1. Drop the dashboard file to the 'Upload dashboard JSON file' drop area
|
||||||
|
|
||||||
|
1. Click 'Import'
|
||||||
|
|
||||||
|
## Installing the rules on Grafana Cloud
|
||||||
|
|
||||||
|
1. Select the rules files in charts/meta-monitoring/src/rules for the application to monitor. When monitoring Loki use loki-rules.yaml.
|
||||||
|
|
||||||
|
1. Install mimirtool as per the [instructions](https://grafana.com/docs/mimir/latest/manage/tools/mimirtool/)
|
||||||
|
|
||||||
|
1. Create an access policy with Read and Write permission for Rules. Also create a token and record the token.
|
||||||
|
|
||||||
|
1. Get your cloud Prometheus endpoint and Instance ID from the `Prometheus` page in `Stacks`.
|
||||||
|
|
||||||
|
1. Use them to load the rules using mimirtool as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
mimirtool rules load --address=<your_cloud_prometheus_endpoint> --id=<your_instance_id> --key=<your_cloud_access_policy_token> *.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
1. To check the rules you have uploaded run:
|
||||||
|
|
||||||
|
```
|
||||||
|
mimirtool rules print --address=<your_cloud_prometheus_endpoint> --id=<your_instance_id> --key=<your_cloud_access_policy_token>
|
||||||
|
```
|
Reference in New Issue
Block a user