2023-06-06 14:39:02 +00:00
|
|
|
---
|
|
|
|
title: "Metrics"
|
|
|
|
layout: default
|
|
|
|
sort: 7
|
|
|
|
---
|
|
|
|
|
|
|
|
# Metrics
|
|
|
|
|
|
|
|
Metrics are configured to be exposed using [prometheus operator](https://github.com/prometheus-operator/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
|
|
|
|
|
2023-08-01 06:14:53 +00:00
|
|
|
| Metric | Type | Description
|
|
|
|
| ------------------------------------------------- | --------- | ---------------------------------------
|
|
|
|
| `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_node_updates_total` | Counter | Number of nodes updated
|
2023-08-01 11:54:24 +00:00
|
|
|
| `nfd_node_update_failures_total` | Counter | Number of nodes update failures
|
2023-08-01 13:11:58 +00:00
|
|
|
| `nfd_node_labels_rejected_total` | Counter | Number of nodes labels rejected by nfd-master
|
|
|
|
| `nfd_node_extendedresources_rejected_total` | Counter | Number of nodes extended resources rejected by nfd-master
|
|
|
|
| `nfd_node_taints_rejected_total` | Counter | Number of nodes taints rejected by nfd-master
|
2023-08-01 06:14:53 +00:00
|
|
|
| `nfd_nodefeaturerule_processing_duration_seconds` | Histogram | Time taken to process NodeFeatureRule objects
|
2023-08-01 12:50:03 +00:00
|
|
|
| `nfd_nodefeaturerule_processing_errors_total` | Counter | Number or errors encountered while processing NodeFeatureRule objects
|
2023-08-01 06:14:53 +00:00
|
|
|
| `nfd_feature_discovery_duration_seconds` | Histogram | Time taken to discover features on a node
|
2023-06-06 14:39:02 +00:00
|
|
|
|
|
|
|
## Via Kustomize
|
|
|
|
|
|
|
|
To deploy NFD with metrics enabled using kustomize, you can use the
|
|
|
|
[Metrics Overlay](kustomize.md#metrics).
|
|
|
|
|
|
|
|
## 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:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
--set prometheus.enable=true
|
|
|
|
```
|
|
|
|
|
|
|
|
For more info on Helm deployment, see [Helm](helm.md).
|
|
|
|
|
|
|
|
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.
|
2023-07-21 14:20:43 +00:00
|
|
|
|
|
|
|
or setting labels on the PodMonitor via the helm parameter `prometheus.labels`
|
|
|
|
to control which Prometheus instances will scrape this PodMonitor.
|