Integrate Prometheus with OSM
Prometheus and OSM Integration
To familiarize yourself on how OSM works with Prometheus, try installing a new mesh with sample applications to see which metrics are collected.
-
Install OSM with its own Prometheus instance:
-
Create a namespace for sample workloads:
-
Make the new OSM monitor the new namespace:
-
Configure OSM’s Prometheus to scrape metrics from the new namespace:
-
Install sample applications:
Ensure the new Pods are Running and all containers are ready:
-
Generate traffic:
The following command makes the curl Pod make about 1 request per second to the httpbin Pod forever:
-
View metrics in Prometheus:
Forward the Prometheus port:
Navigate to http://localhost:7070 in a web browser to view the Prometheus UI. The following query shows how many requests per second are being made from the curl pod to the httpbin pod, which should be about 1:
irate(envoy_cluster_upstream_rq_xx{source_service="curl", envoy_cluster_name="metrics-demo/httpbin"}[30s])
Feel free to explore the other metrics available from within the Prometheus UI.
-
Cleanup
Once you are done with the demo resources, clean them up by first deleting the application namespace:
Then, uninstall OSM:
$ osm uninstall mesh Uninstall OSM [mesh name: osm] ? [y/n]: y OSM [mesh name: osm] uninstalled
To remove OSM’s cluster wide resources after uninstallation, run the following command. See the uninstall guide for more context and information.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.