20
loading...
This website collects cookies to deliver better user experience
customer_purchase.initiate
, customer_purchase.queried
, customer_purchase.finalized
, and so on. Depending on your programming language, you might be able to provide a function block or lambda to the metrics service:statsd.timing('customer_purchase.initiate') do
# ...
end
statsd.histogram('customer_purchase.initiate') do
statsd.histogram('customer_purchase.external_database_query') do
# ...
end
end
monitoring
namespace:$ kubectl create namespace monitoring
$ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
$ helm repo add stable https://kubernetes-charts.storage.googleapis.com/
$ helm repo update
$ helm install -f https://bit.ly/2RgzDtg -n monitoring prometheus prometheus-community/prometheus
KongPlugin
resource—which integrates into the KIC. Create a file called prometheus-plugin.yml
:apiVersion: configuration.konghq.com/v1
kind: KongClusterPlugin
metadata:
name: prometheus
annotations:
kubernetes.io/ingress.class: kong
labels:
global: "true"
plugin: prometheus
$ helm install grafana stable/grafana -n monitoring --values http://bit.ly/2FuFVfV
$ POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace monitoring port-forward $POD_NAME 9090 &
$ POD_NAME=$(kubectl get pods --namespace monitoring -l "app.kubernetes.io/instance=grafana" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace monitoring port-forward $POD_NAME 3000 &
9090
and the Grafana dashboard on port 3000
.20