From 2cf6785630a5bca71c5834ef99b33a5379af739c Mon Sep 17 00:00:00 2001 From: roypaulin Date: Wed, 10 Jan 2024 16:52:45 +0100 Subject: [PATCH] Update doc --- .github/workflows/makefile.yml | 4 ++++ README.md | 34 +++++++++++++++++++++++++++++++- docker-prometheus/prometheus.yml | 14 ++++++++++++- etc/VerticaPyLab.conf.default | 2 +- 4 files changed, 51 insertions(+), 3 deletions(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index dce6df7d..313bcfa7 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -41,3 +41,7 @@ jobs: run: make grafana-uninstall - name: uninstall verticapylab run: make verticapylab-uninstall + - name: Create and run a prometheus container + run: make prom-start + - name: uninstall grafana + run: make prom-uninstall diff --git a/README.md b/README.md index 9f41228b..9b05c94a 100644 --- a/README.md +++ b/README.md @@ -145,11 +145,43 @@ Each example is annotated and walks you through step-by-step through various Spa ## Grafana -Grafana is an open-source observability platform for visualizing metrics, logs, and traces collected from your applications. When Verticalab is installed, a grafana container is created and connected to the single node database. Two extensions are available on the jupyterlab launcher to make use of it: +Grafana is an open-source observability platform for visualizing metrics, logs, and traces collected from your applications. When VerticaPyLab is installed, a grafana container is created and connected to the single node database. Two extensions are available on the jupyterlab launcher to make use of it: - Grafana: Opens a new tab containing a Grafana Explorer for running sql queries. - Performance: Opens a new tab containing a performance dashboard to visualize CPU usage, Memory usage, SQL statements, etc.. +You can also install Grafana standalone without also installing Vertica and VerticaPyLab: + +- Start Grafana container: + `make grafana-start` and open `http://localhost:3000` +- Stop Grafana: + `make grafana-stop` +- Remove the grafana container and its associated images: + `make grafana-uninstall` + +## Prometheus + +Prometheus a monitoring and alerting system that is very popular with cloud native deployments. It collects time series events for different machines, called targets. +In version 23.3.0, Vertica introduced in-database metrics. Vertica is already very rich in metrics with the various system and DC tables that it offers, but now you can get them cheaply with Prometheus in-database metrics. + +We provide a few commands that can help you set up Prometheus to fetch metrics from your remote cluster nodes or from the CE vertica container installed with VerticaPyLab: +- Configure Prometheus. if you do not have your own db, Prometheus is configured to use the single node CE database: + + Edit prometheus.yml and add your own section to tell Prometheus how to access your nodes. +- Start Prometheus container: + + `make prom-start` and open `http://localhost:9090` + +- Stop Prometheus container: + + `make prom-stop` +- Delete the prometheus container and its associated images: + + `make prom-uninstall` + +Once installed, Prometheus can be used as a DataSource by [Grafana](#grafana) + + ## Contributing For a short guide on contribution standards, see [CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/docker-prometheus/prometheus.yml b/docker-prometheus/prometheus.yml index fed71e9b..4e639021 100644 --- a/docker-prometheus/prometheus.yml +++ b/docker-prometheus/prometheus.yml @@ -15,4 +15,16 @@ scrape_configs: metrics_path: '/v1/metrics' scrape_interval: 5s static_configs: - - targets: ['verticadb:8443'] \ No newline at end of file + - targets: ['verticadb:8443'] +# Add more jobs to fetch your remote nodes +# - job_name: 'myvertica' +# scheme: https +# basic_auth: +# username: 'yourusername' +# password: 'yourpasswd' +# tls_config: +# insecure_skip_verify: true +# metrics_path: '/v1/metrics' +# scrape_interval: 5s +# static_configs: +# - targets: ['node1:8443', 'node1:8443', 'nodeN:8443'] diff --git a/etc/VerticaPyLab.conf.default b/etc/VerticaPyLab.conf.default index 5db6b76d..18a5b1df 100644 --- a/etc/VerticaPyLab.conf.default +++ b/etc/VerticaPyLab.conf.default @@ -21,7 +21,7 @@ VERTICA_CONTAINER_NAME=verticadb VERTICA_HOST_NAME=$VERTICA_CONTAINER_NAME VERTICA_DB_NAME=$VERTICA_CONTAINER_NAME DB_NAME=demo -VERTICA_DOCKER_IMAGE=vertica/vertica-k8s:latest # see https://hub.docker.com/r/vertica/vertica-k8s +VERTICA_DOCKER_IMAGE=vertica/vertica-k8s:23.4.0-0-minimal # see https://hub.docker.com/r/vertica/vertica-k8s VSQL_USER=dbadmin #VERTICA_RUNARGS+=( ) # add more args to the docker run command