Skip to content

Commit

Permalink
Merge pull request #11 from severalnines/4-severalnines/observability…
Browse files Browse the repository at this point in the history
…-main

Run 4 Merge observability into Main branch
  • Loading branch information
ram-vibhul authored May 22, 2024
2 parents ce07111 + 4cb637a commit 8543699
Show file tree
Hide file tree
Showing 36 changed files with 55,374 additions and 0 deletions.
26 changes: 26 additions & 0 deletions charts/observability/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
.github/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
#json
*.json
47 changes: 47 additions & 0 deletions charts/observability/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
apiVersion: v2
name: ccx-monitoring
description: An Umbrella Chart for observability components in CCX

type: application

## version
version: 0.5.0
appVersion: "0.5.0"

dependencies:
- name: victoria-metrics-single
repository: https://victoriametrics.github.io/helm-charts/
version: 0.9.14
condition: victoria-metrics-single.enabled
- name: victoria-metrics-alert
repository: https://victoriametrics.github.io/helm-charts/
version: 0.8.6
condition: victoria-metrics-alert.enabled
- name: victoria-metrics-agent
repository: https://victoriametrics.github.io/helm-charts/
version: 0.9.15
condition: victoria-metrics-agent.enabled
- name: kube-state-metrics
repository: https://prometheus-community.github.io/helm-charts
version: 5.16.0
condition: kube-state-metrics.enabled
- name: alertmanager
repository: https://prometheus-community.github.io/helm-charts
version: 1.7.0
condition: alertmanager.enabled
- name: grafana
repository: https://grafana.github.io/helm-charts
version: 7.0.1
condition: grafana.enabled
- name: loki
repository: https://grafana.github.io/helm-charts
version: 6.5.2
condition: loki.enabled
- name: prometheus-node-exporter
repository: https://prometheus-community.github.io/helm-charts
version: 4.23.2
condition: node-exporter.enabled
- name: prometheus-blackbox-exporter
repository: https://prometheus-community.github.io/helm-charts
version: 8.4.0
condition: prometheus-blackbox-exporter.enabled
85 changes: 85 additions & 0 deletions charts/observability/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# CCX Victoria metrics stack
Monitoring stack for CCX cluster


## Overview

This stack uses:
* Victoria metrics - Prometheus compatibile monitoring for metrics and alerting (vmsingle/vmalert) - https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html
* Alertmanager - https://prometheus.io/docs/alerting/latest/alertmanager/
* Grafana - https://grafana.com/docs/
* kube-state-metrics - https://github.com/kubernetes/kube-state-metrics

## Deployment
In order to deploy this chart along with dependencies and apply dashboards, one needs to pull first.

### Requirements
* kubernetes cluster
* helm - https://helm.sh/docs/intro/install/

### values.yaml
`values.yaml` is a defaults file. Please *DO NOT* edit it.
If you want to override values, please edit `s9s.yaml` or create another values file.

It is very important to edit `s9s.yaml` file and set variables like cluster name, ingress host, etc.

### Namespace
It's preferred to have a dedicated namespace for this stack.

Set your active namespace

`kubectl config set-context --current --namespace=victoriametrics`

### Add chart repo

`helm repo add s9s https://severalnines.github.io/helm-charts/`

`helm repo update`

### Pull the chart

`helm pull s9s/ccx-monitoring --untar`

### Helm dependencies
Update your helm dependencies by running

`helm dependency update ccx-monitoring`

### Installation & Upgrade
`helm upgrade --install ccx-monitoring ccx-monitoring --atomic --namespace victoriametrics --values YOUR_VALUES.yaml --debug `

Please note that this guide as some other documents and urls assumes that you use `ccx-monitoring` release name.

Verify installation by running - check the `status` field.
`helm ls -a --namespace victoriametrics`

#### Grafana dashboards
Grafana dashboards and datasources are kept as a code in the repo.

`kubectl --namespace victoriametrics delete -k ccx-monitoring/dashboards`
`kubectl --namespace victoriametrics create -k ccx-monitoring/dashboards`

Additional dashboards can be placed as `.json` files in folders inside `dashboards` directory.

#### Grafana datasources
Grafana dashboards and datasources are kept as a code in the repo.

Navigate to `datasources` directory, edit `grafana_datasource.yaml` and apply via

`kubectl --namespace victoriametrics apply -k ccx-monitoring/datasources`


#### To get grafana admin password run

`kubectl get secret ccx-monitoring-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo`

### Removal
*WARNING*

`helm uninstall ccx-monitoring`

or

This will delete all monitoring related resources and objects!

`kubectl delete namespace victoriametrics`
Binary file not shown.
Binary file added charts/observability/charts/grafana-7.0.1.tgz
Binary file not shown.
Binary file not shown.
Binary file added charts/observability/charts/loki-6.5.2.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 8543699

Please sign in to comment.