Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Prometheus is a monitoring solution. It helps you store the time series data, like metrics of an application. You can view these metrices using Grafana that presents the information to you in graphical dashboard. 

This section guides you on deploying Prometheus and Grafana. It also discusses how you can configure Prometheus to store Adeptia Connect metrices. 

Deploying Prometheus and Grafana

Before you begin to deploy Prometheus and Grafana, make sure that you have met the following prerequisites.

Prerequisites

  • Kubernetes 1.16+
  • Helm 3+

To deploy Prometheus and Grafana, you need to follow the steps as given below.

  1. Run the following command to add the Prometheus and Grafana helm chart from the Prometheus helm repository.

    Code Block
    languagecss
    themeMidnight
    helm repo add prometheus-community https://prometheus-community.github.io/helm-charts


  2. Update the Helm repository by running the following command.

    Code Block
    languagecss
    themeMidnight
    helm repo update


  3. Run the helm install command as shown below to deploy Prometheus and Grafana.

    Code Block
    languagecss
    themeMidnight
    helm install <NAME OF THE RELEASE> prometheus-community/kube-prometheus-stack -n <NAMESPACE>


Anchor
service_monitor
service_monitor
Creating Service Monitor yaml file

After you have deployed the Prometheus, you need to create a service monitor file. You can create the service monitor file by using the following content.

Code Block
languagecss
themeMidnight
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    app: portal
    app.kubernetes.io/instance: portal
    app.kubernetes.io/part-of: portal
  name: portal
  namespace: adeptia-ga
spec:
  endpoints:
  - port: https
    path: /prometheus
    scheme: https
    tlsConfig:
      caFile: "/adeptia-cert/ca_file"
      certFile: "/adeptia-cert/cert_file"
      insecureSkipVerify: true
      keyFile: "/adeptia-cert/key_file"
  namespaceSelector:
    matchNames:
    - adeptia-ga
  selector:
    matchLabels:
      app.kubernetes.io/instance: portal
      app.kubernetes.io/name: portal


Info
If you do not want to validate the SSL keys of Adeptia Connect application, set the value of insecureSkipVerify in the file to true

Run the following command.

Code Block
languagecss
themeMidnight
kubectl apply -f servicemonitor.yaml -n <application namespace> 


Next, you need to configure Grafana to view the application metrices.


Panel
borderStylesolid
titleYou may be interested in...
What is new
Application architecture
Key terms
Install
Usage scenarios