Skip to content

Commit

Permalink
Update metrics documentation and scripts (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaepstein authored Jun 6, 2023
1 parent e56affb commit 8e103cb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
17 changes: 16 additions & 1 deletion docs/kar-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,22 @@ application itself is deployed. See
for details on the reefer application.


## Accessing raw KAR sidecar metrics
## Viewing metrics with Grafana

Grafana dashboards are viewed by first exposing the Grafana web server on the cluster, attaching a browser to the web server, logging into Grafana, and finally selecting the dashboard of interest.

1. kubectl port-forward -n prometheus svc/prometheus-grafana 3000:80"
2. Point your browser to localhost:3000"
3. Login with default user/password: admin/prom-operator"
4. Click on "Dashboards" in the Grafana menu at top left, and select "General" to see available dashboards.

By default KAR metrics monitor only generic Kubernetes, Kafka and Redis data.
To view application specific data requires a custom Grafana configuration.
The Reefer Metrics configuration referenced above can easily be modified to
support other applications.


## Accessing raw KAR sidecar metrics for a single KAR application server

A KAR sidecar accumulates metrics for all actor and service methods called
in the application container it is managing. Raw metrics are accessed via
Expand Down
21 changes: 9 additions & 12 deletions scripts/metrics/prom-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,11 @@ prometheusOperator:
patch:
enabled: true
image:
repository: k8s.gcr.io/ingress-nginx/kube-webhook-certgen
tag: v1.0
sha: "f3b6b39a6062328c095337b4cadcefd1612348fdd5190b1dcbcb9b9e90bd8068"
registry: registry.k8s.io
repository: ingress-nginx/kube-webhook-certgen
tag: v20221220-controller-v1.5.1-58-g787ea74b6
sha: ""

pullPolicy: IfNotPresent
resources: {}
## Provide a priority class name to the webhook patching job
Expand Down Expand Up @@ -606,8 +608,10 @@ prometheusOperator:
## Prometheus-operator image
##
image:
repository: quay.io/prometheus-operator/prometheus-operator
tag: v0.50.0
registry: quay.io
repository: prometheus-operator/prometheus-operator
tag: ""

sha: ""
pullPolicy: IfNotPresent

Expand Down Expand Up @@ -724,13 +728,6 @@ prometheus:
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#webtlsconfig
web: {}

## Image of Prometheus.
##
image:
repository: quay.io/prometheus/prometheus
tag: v2.28.1
sha: ""

## ConfigMaps is a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods.
## The ConfigMaps are mounted into /etc/prometheus/configmaps/.
##
Expand Down
3 changes: 1 addition & 2 deletions scripts/metrics/start-kar-metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ echo "... Wait, installing Prometheus, Grafana, and other goodies ..."
# Prometheus Server, Prometheus Operator, Grafana, Node Exporter, K8s Dashboards
helm install prometheus prometheus-community/kube-prometheus-stack -f prom-overrides.yaml --wait -n $NAMESPACE 2>/dev/null

# Redis
helm install redis-exporter -f redis-values.yaml prometheus-community/prometheus-redis-exporter --wait -n $NAMESPACE 2>/dev/null
# Redis - currently broken

# Redis dashboard
kubectl create -f redis-dashboard-cm.yaml -n $NAMESPACE
Expand Down

0 comments on commit 8e103cb

Please sign in to comment.