Capturing historical metrics an extremely useful tool to help diagnose your running system.
With fabric8 we recommend using:
If you are running Fabric8 with the Fabric8 Console then go to the Apps tab.
Cadvisor runs embedded in the kubelet on each node to ensure the metrics are collected.
Once the above is running, the Fabric8 Console should have a Metrics tab letting you view and search the metrics via Grafana.
When using Prometheus to collect metrics for monitoring your containers you can enable
scraping in Java Maven projects in the pom.xml
file accordingly. For example to enable scraping and service enable this on port 9779, define the following in the pom.xml
file:
<fabric8.metrics.scrape>true</fabric8.metrics.scrape>
<fabric8.metrics.port>9779</fabric8.metrics.port>
<fabric8.metrics.scheme>http</fabric8.metrics.scheme>
There must be at least one service define in your application to ensure the metrics scaping is enabled. If no services has been defined,
then a headless service must be configured to ensure the metrics scraping works. Add the following two lines to the pom.xml
file:
<fabric8.service.name>${project.artifactId}</fabric8.service.name>
<fabric8.service.headless>true</fabric8.service.headless>
This headless service is used to collect application level metrics for ingestion into Prometheus.