Skip to content

cksource/cksource-monitoring

Repository files navigation

CKSource-Monitoring

Note: if this is the first run, see the "first run" section

Quick start

  1. pnpm run docker:start
  2. Go to Dashboards and browse available dashboards.

Create/edit Grafana dashboards in UI

  1. Login to Grafana as Admin (use credentials from .env file).
  2. Choose dashboard from Dashboards or create new one.
  3. Edit Dashboard and save changes by pressing "Save dashboard" button.
  4. Export changes. See the "Exporting changes" section.

Create/edit Grafana alerts in UI

  1. Login to Grafana as Admin (use credentials from .env file).
  2. Modify/add some of below resources:
    1. Alert rules - verify results of tests
    2. Contact points - define where alert notifications can be sent
    3. Notification policies - define which alerts should be sent to which contact points
  3. Make sure you saved changes in Grafana UI by pressing "Save" button for each modified resource.
  4. Save changes made in Grafana UI permanently. See the "Exporting changes" section.

Note: Already created alert resources cannot be modified through UI. You can still adjust them by modifying files in infrastructure/grafana/alerting/.

Export changes made in Grafana UI

Run exporting scripts in the root directory of this repo:

node scripts/export-grafana-resources.mjs

This will update the files in infrastructure folder. Commit this files to master branch to rebuild the Grafana image and update the service.

First run

Requirements

  • Node min version: 18.12.1
  • PNPM version: >=8.14.0. Run npm install pnpm@8 -g

Project setup

  1. Clone repository.
  2. Go to cksource-monitoring main directory and run pnpm install.
  3. Duplicate .env.template file and save it as .env. Fill out missing env variables.

After project setup, the project can be started. See the Quick start section.