NPD Config Mode Command Reference

node-problem-detector agent

Enable Node Problem Detector (NPD), the diagnostic tool, to identify and report problems that may impact node performance.

Command Mode

Exec

Syntax

node-problem-detector agent enabled 

Usage Guidelines

This command enables NPD with default configurations and built-in monitoring rules for detecting well-known issues. By default NPD is disabled.

When the NPD is enabled, it is easy to monitor and manage the health of all nodes on the cluster.

node-problem-detector agent exporters

Configure the Node Problem Detector (NPD) exporter definitions.

node-problem-detector agent exporters { k8s apiserver-uri-override string | prometheus port port_number }

no node-problem-detector agent exporters { k8s apiserver-uri-override string | prometheus port port_number }

Syntax Description

k8s apiserver-uri-override string

Configure the custom URI that is used to connect to the Kubernetes API server. The custom URI can be an alphanumerical string.

prometheus port port_number

Specify the port number of Prometheus exporter. Port number is an integer from 0 to 65535.

Command Default

NPD functionality is disabled.

Command Modes

Global configuration

Command History

Release Modification
2025.02.1

This command was introduced.

Usage Guidelines

Use this command to enable the NPD tool to monitor the health of nodes within the cluster.

Example

This example shows how to configure the NPD in the Kubernetes environment.

node-problem-detector agent exporters k8s apiserver-uri-override http://example:8443

node-problem-detector agent monitors

Configure the Node Problem Detector (NPD) monitor definitions.

node-problem-detector agent monitors monitor_name { custom | filelog | journald | ksmg }

no node-problem-detector agent monitors

Syntax Description

monitors monitor_name

Configure the monitor name that is used as the source value for reporting the node problems.

custom

Specify to use custom plugin.

filelog

Specify to use filelog plugin.

journald

Specify to use journald plugin.

ksmg

Specify to use ksmg plugin.

Command Default

NPD functionality is disabled.

Command Modes

Global configuration

Command History

Release Modification
2025.02.1

This command was introduced.

Usage Guidelines

Use this command to enable the NPD tool to monitor the health of nodes within the cluster.

Example

This example shows how to configure the NPD monitor in the Kubernetes environment.

node-problem-detector agent monitors test

node-problem-detector agent exporters k8s

Configure the K8s exporter to enable communication with the Kubernetes API server for monitoring resources.

node-problem-detector agent exporters k8s apiserver-uri-override uri_string

Syntax Description

apiserver-uri-overrideuri_string

This keyword allows you to specify a custom URI for connecting to the API server.

This URI can include the IP address, port, and other options needed for the connection.

If you are managing multiple clusters and need NPD to export problems to a centralized API server, this override is essential.

Command Default

None

Command Modes

Global configuration mode

Command History

Release Modification
Release 2025.02.1

This command was introduced.

Usage Guidelines

This configuration must be performed to enable communication with the Kubernetes API server.

Usage Guidelines

Example

The following example shows how to configure Kubernetes API server IP address and port for K8s to communicate with.

node-problem-detector agent exporters k8s apiserver-override=https://209.165.200.227:8080

node-problem-detector agent exporters prometheus

Configure the Node Problem Detector to act as an agent that exports node health metrics to Prometheus.

node-problem-detector agent exporters prometheus port port_number

Syntax Description

portport_number

Specify the port to bind the Prometheus scrape endpoint.

The default value of port number is 20257. Use 0 to disable.

Command Default

None

Command Modes

Global configuration mode

Command History

Release Modification
Release 2025.02.1

This command was introduced.

Usage Guidelines

This command is used to set up Node Problem Detector to work as an agent that collects node health data and exports it to Prometheus for monitoring and alerting purposes. It is an essential part of maintaining the health and reliability of Kubernetes clusters in production environments.

Example

The following example shows the configuration of port to bind the Prometheus scrape endpoint.

node-problem-detector agent exporters prometheus port 8080