1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00
node-feature-discovery/docs/deployment/metrics.md
Carlos Eduardo Arango Gutierrez e3aedd33e2
Enable metrics via prometheus operator
Expose metrics via prometheus.monitoring.coreos.com/v1

The exposed metrics are

| Metric        | Type | Meaning |
| --------------- | ---------------- | ---------------- |
|  `nfd_master_build_info`           | Gauge | Version from which nfd-master was built. |
|  `nfd_worker_build_info`           | Gauge | Version from which nfd-worker was built. |
|  `nfd_updated_nodes`           |  Counter | Time taken to label a node |
|  `nfd_crd_processing_time`          |  Gauge | Time taken to process a NodeFeatureRule CRD |
| `nfd_feature_discovery_duration_seconds` |  HistogramVec | Time taken to discover features on a node |

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Co-authored-by: Markus Lehtonen <markus.lehtonen@intel.com>
2023-07-21 10:59:52 +02:00

1.6 KiB

title layout sort
Metrics default 7

Metrics

Metrics are configured to be exposed using prometheus operator API's by default. If you want to expose metrics using the prometheus operator API's you need to install the prometheus operator in your cluster. By default NFD Master and Worker expose metrics on port 8081.

The exposed metrics are

Metric Type Meaning
nfd_master_build_info Gauge Version from which nfd-master was built.
nfd_worker_build_info Gauge Version from which nfd-worker was built.
nfd_updated_nodes Counter Time taken to label a node
nfd_crd_processing_time Gauge Time taken to process a NodeFeatureRule CRD
nfd_feature_discovery_duration_seconds HistogramVec Time taken to discover features on a node

Via Kustomize

To deploy NFD with metrics enabled using kustomize, you can use the Metrics Overlay.

Via Helm

By default metrics are enabled when deploying NFD via Helm. To enable Prometheus to scrape metrics from NFD, you need to pass the following values to Helm:

--set prometheus.enable=true

For more info on Helm deployment, see Helm.

We recommend setting --set prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false when deploying prometheus-operator via Helm to enable the prometheus-operator to scrape metrics from any PodMonitor.