Debugging Checkmk Special Agents (Combined)

Debugging Checkmk Special Agents (Combined)

This article explains how to manually execute and debug Checkmk special agents, collect diagnostic information, and troubleshoot common configuration, connectivity, authentication, and permission issues.

LAST TESTED ON CHECKMK 2.5.0P14

Overview

Checkmk special agents are programs that collect monitoring data from systems that cannot be monitored using the standard Checkmk agent alone. These include cloud platforms, virtualization environments, storage systems, and container platforms.

Special agents typically run on the Checkmk server and communicate with monitored systems through application programming interfaces (APIs) or other remote interfaces.

When a special agent fails, the Checkmk interface may provide limited information about the underlying problem.

Common causes include:

  • Incorrect authentication credentials or insufficient permissions.

  • Network connectivity problems.

  • TLS certificate validation errors.

  • Incorrect datasource program configuration.

  • API communication or processing errors.

  • Corrupted cached data.

  • Unsupported configurations or software versions.

To investigate these problems, identify the command generated by Checkmk, execute the special agent manually, and collect debugging information.


 

General debugging procedures

The following procedures apply to most Checkmk special agents. Individual agents may require additional parameters or different debugging options.

 

Identify the special agent command

Log in to the Checkmk server and switch to the affected site user.

root@linux:~$ su - mysite

 

Display the effective configuration of the affected host:

OMD[mysite]:~$ cmk -D <myhost>

Replace <myhost> with the name of the host configured to use the special agent.

 

Locate the Type of agent section.

Example:

Type of agent: Program: /omd/sites/mysite/share/check_mk/agents/special/agent_aws <ARGUMENTS>

The Program entry contains the executable and parameters generated from the datasource program rule.

Copy the complete command after Program: for manual execution.

 

Note
Some hosts may have multiple datasource programs configured. Make sure to select the command associated with the special agent you want to troubleshoot.

 

 

Execute the special agent manually

Execute the command identified in the previous step as the Checkmk site user.

Alternatively, for hosts with a single relevant datasource program, the following command can extract and execute the configured program:

OMD[mysite]:~$ /bin/sh -c "$(cmk -D <myhost> | grep -A10 '^Type of agent:' | grep 'Program:' | cut -f2- -d':')"

 

This command is a shortcut and may not work correctly when multiple datasource programs are configured or when configuration is supplied through standard input.

For those situations, manually execute the appropriate command displayed by cmk -D.

Running the special agent manually can reveal errors that are not fully displayed in the Checkmk interface.

 

 

Debugging options and VCR tracing

Many Checkmk special agents support additional command-line options that provide detailed information about execution and API communication.

The most commonly used options are:

Option

Description

Option

Description

--debug

Enables debugging and allows Python exceptions to be displayed.

--verbose

Increases diagnostic output.

-vvv

Enables more detailed verbose output where supported.

--vcrtrace <FILE>

Records API requests and responses in a trace file.

--tracefile <FILE>

Alternative tracing option supported by certain agents.

&> <FILE>

Redirects standard output and standard error to a file.

Not all special agents support the same options.

To identify the available options, execute the special agent with --help or -h.

 

 

VCR trace directories

The location used to generate VCR trace files depends on the Checkmk version.

Checkmk version

VCR trace directory

Checkmk version

VCR trace directory

2.3 / 2.4

~/tmp/debug/

2.5

~/tmp/check_mk/debug/

The directory restriction is related to Werk #17996. The Werk documents path validation but does not independently establish these directories for every patch release.

Before executing a command that generates trace files, create the appropriate directory if it does not already exist.

For Checkmk 2.3 and 2.4:

OMD[mysite]:~$ mkdir -p ~/tmp/debug/

 

For Checkmk 2.5:

OMD[mysite]:~$ mkdir -p ~/tmp/check_mk/debug/

 

Important: VCR trace behavior
For special agents that support VCR recording and replay, specifying a trace file that does not exist records API requests and responses.

If the trace file already exists, the agent may replay the recorded responses instead of contacting the remote system.

Use a new trace filename when collecting fresh debugging information.

 

 

 

Collect debugging information

When troubleshooting a special agent, collect the following information where supported.

File

Description

File

Description

agent_output.txt

Raw output generated by the special agent without debugging options.

debug.txt

Diagnostic output containing execution details, exceptions, and errors.

vcrtrace.txt

Recorded API requests and responses.

The exact location of these files depends on the Checkmk version and the commands used.

When submitting a support ticket, include the relevant files and the special agent command used to reproduce the problem.

Remove passwords, authentication tokens, and other credentials from the command before sharing it.

Security notice
Debugging logs and VCR trace files may contain sensitive information, including authentication credentials, API tokens, host information, and data returned by monitored systems.

Review the contents before sharing them with Checkmk Support.


 

 

AWS Special Agent

The Amazon Web Services (AWS) special agent collects metrics and inventory information from AWS services using API credentials.

Problems with AWS monitoring are commonly related to authentication, permissions, service configuration, or API communication.

 

Debugging

Identify the command generated by Checkmk:

OMD[mysite]:~$ cmk -D <myhost>

Locate the AWS special agent command under Type of agent → Program.

 

The command includes the configured credentials, regions, services, and additional monitoring options.

For example:

OMD[mysite]:~$ ~/share/check_mk/agents/special/agent_aws --access-key-id <ACCESS_KEY_ID> --secret-access-key <SECRET_ACCESS_KEY> --regions <AWS_REGION> --services ecs --ecs-limits --hostname <myhost>

The example monitors AWS Elastic Container Service (ECS). The parameters required in your environment depend on the configured AWS datasource program rule.

 

Add the debugging and VCR tracing options to the configured command.

Checkmk version

Debugging options

Checkmk version

Debugging options

2.3 / 2.4

--debug --verbose --vcrtrace ~/tmp/debug/vcrtrace.txt &> ~/tmp/debug/debug.txt

2.5

--debug --verbose --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

For example, on Checkmk 2.5:

OMD[mysite]:~$ ~/share/check_mk/agents/special/agent_aws --access-key-id <ACCESS_KEY_ID> --secret-access-key <SECRET_ACCESS_KEY> --regions <AWS_REGION> --services ecs --ecs-limits --hostname <myhost> --debug --verbose --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

 

This generates two files:

  • debug.txt, containing detailed execution information.

  • vcrtrace.txt, containing recorded AWS API communication.

Review the debugging output for authentication failures, permission errors, or API request failures.


 

 

Azure Special Agent

The Azure special agent retrieves monitoring data from Microsoft Azure through Azure Resource Manager and Microsoft Graph APIs.

Common problems include insufficient API permissions, authentication failures, and blocked outbound connections.

 

Debugging

Identify the Azure special agent command:

OMD[mysite]:~$ cmk -D <myhost>

Locate the relevant Program entry under Type of agent.

 

The executable location differs between Checkmk versions.

Checkmk version

Executable location

Checkmk version

Executable location

2.3 / 2.4

~/share/check_mk/agents/special/agent_azure

2.5

~/lib/python3/cmk/plugins/azure_v2/libexec/agent_azure_v2

 

For Checkmk 2.5, the Azure v2 special agent can be executed with parameters similar to:

OMD[mysite]:~$ ~/lib/python3/cmk/plugins/azure_v2/libexec/agent_azure_v2 --subscription <SUBSCRIPTION_ID> --tenant <TENANT_ID> --client <CLIENT_ID> --secret <CLIENT_SECRET> --authority global --cache-id azure --piggyback_vms self --services Microsoft.Compute/virtualMachines --debug --verbose --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

The services included in the command depend on the datasource program configuration.

 

Examples include:

  • usage_details

  • Microsoft.Compute/virtualMachines

  • Microsoft.Network/virtualNetworkGateways

  • Microsoft.Sql/servers/databases

  • Microsoft.Storage/storageAccounts

  • Microsoft.Web/sites

  • Microsoft.DBforMySQL/flexibleServers

  • Microsoft.DBforPostgreSQL/flexibleServers

  • Microsoft.Network/loadBalancers

  • Microsoft.RecoveryServices/vaults

  • Microsoft.Network/applicationGateways

 

Use the following version-specific debugging options:

Checkmk version

Debugging options

Checkmk version

Debugging options

2.3 / 2.4

--debug --verbose --vcrtrace ~/tmp/debug/vcrtrace.txt &> ~/tmp/debug/debug.txt

2.5

--debug --verbose --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt


Common Error: Insufficient Microsoft Graph privileges

The Azure special agent may report:

Graph client: Insufficient privileges to complete the operation

This indicates that the application used for monitoring does not have sufficient permissions to access the requested Microsoft Graph resources.

 

To investigate:

  1. Open Azure Portal

  2. Navigate to Azure Active Directory

    image-20261028-094631.png

     

  3. Open App registrations on the left side

    image-20261028-094701.png

     

  4. Select the Checkmk application

  5. Open API permissions on the left side

    image-20261028-094734.png

     

  6. Click Add Permissions and add a permissions for Microsoft Graph

    image-20261028-094802.png

The required permissions depend on the Azure resources being monitored.

 

Relevant API operations include retrieving metrics, resources, resource groups, consumption information, virtual machine details, users, and organizations.

 

Full list of access rights needed:

API & Use

Documentation

API & Use

Documentation

Get Metric data

Metrics - List

Get resources

Operations (Resources) - List

Get resource groups

Resource Groups - List

Consumption details

Usage Details - List

VM info

Virtual Machines - Instance View

Active Directory top users

List users

Active Directory organizations

List organizations

 

These are the metrics we get via the Azure agents

Resource URI

Metric name

Resource URI

Metric name

Microsoft.Network/virtualNetworkGateways

AverageBandwidth,P2SBandwidth

Microsoft.Sql/servers/databases

storage_percent,deadlock,cpu_percent,dtu_consumption_percent,connection_successful,connection_failed

Microsoft.Storage/storageAccounts

UsedCapacity,Ingress,Egress,Transactions,SuccessServerLatency,SuccessE2ELatency,Availability

Microsoft.Web/sites

 

 

Common Error: SSL handshake errors

Azure monitoring may also fail when the Checkmk server cannot establish a secure connection to the required Azure endpoints.

 

Verify connectivity using Netcat or Telnet to the Azure Resource Manager and Microsoft identity endpoints:

OMD[mysite]:~$ nc -zv management.azure.com 443 telnet management.azure.com 443
OMD[mysite]:~$ nc -zv login.microsoftonline.com 443 telnet login.microsoftonline.com 443

 

Successful connections should produce output similar to:

# via Netcat Connection to management.azure.com 443 port [tcp/https] succeeded! #via Telnet telnet management.azure.com 443 Trying 20.51.10.137... Connected to management.azure.com. Escape character is '^]'.

 

If the connection fails, investigate:

  • Firewall restrictions.

  • Proxy configuration.

  • DNS resolution.

  • TLS interception by security software.

  • Certificate validation problems.

A successful TCP connection confirms that the endpoint is reachable, but does not by itself verify successful TLS negotiation or API authentication.

Azure endpoints
If you're experiencing connectivity issues or receiving unexpected data, please ensure that your endpoints are available from the Checkmk server.

Please review Microsoft's documentation for further information.


 

 

BI Special Agent

The Business Intelligence (BI) special agent retrieves monitoring information from Checkmk BI aggregations.

The special agent receives its configuration through standard input rather than through command-line parameters.

 

Debugging

Display the effective configuration of the BI host:

OMD[mysite]:~$ cmk -D <myhost>

The output contains the executable under Program and the configuration under Program stdin.

 

Example:

Type of agent: Program: /omd/sites/mysite/share/check_mk/agents/special/agent_bi Program stdin: [{'site': 'local', 'credentials': 'automation', 'filter': {'groups': ['Hosts']}, 'assignments': {'querying_host': 'querying_host'}}]

 

To execute the agent manually, pass the configuration through standard input.

OMD[mysite]:~$ printf '%s\n' "[{'site': 'local', 'credentials': 'automation', 'filter': {'groups': ['Hosts']}, 'assignments': {'querying_host': 'querying_host'}}]" | ~/share/check_mk/agents/special/agent_bi

The configuration shown above is an example. Use the complete configuration returned by cmk -D for the affected host.

 

The manual execution method is the same for Checkmk 2.3, 2.4, and 2.5.

 

If additional debugging is required, inspect the executable's available options before adding debugging parameters.

 

If you use special agents installed from a Feature Pack, you can find the special agents in:

~/local/share/check_mk/agents/special/

 

The special agents that are already shipped with Checkmk can be found here:

~/share/check_mk/agents/special/

 

 

Jenkins Special Agent

The Jenkins special agent collects information about Jenkins jobs, nodes, builds, and related resources.

The account configured for monitoring must have sufficient permissions to retrieve this information.

 

Permissions and troubleshooting

If the Jenkins special agent fails to retrieve monitoring data or returns incomplete results, verify the permissions assigned to the monitoring account.

The permissions include:

Permission

Purpose

Permission

Purpose

General: Read

Allows access to the Jenkins instance.

Agent: Connect

Allows communication with Jenkins agents.

Element: Read & Workspace

Allows access to job information and workspaces.

Views: Read

Allows access to configured views.

Permission names and requirements may vary depending on the installed Jenkins version and plugins.

Verify that the monitoring account can authenticate and access the resources configured for monitoring.

 

To inspect the special agent command:

OMD[mysite]:~$ cmk -D <myhost>

Locate the Jenkins special agent under Type of agent and verify the configured parameters.

Use the installed agent's help output to determine the available debugging options.


 

 

Kubernetes Special Agent

The Kubernetes special agent collects monitoring information from Kubernetes clusters through the Kubernetes API and the Checkmk Cluster Collector.

The special agent monitors Kubernetes resources such as nodes, pods, deployments, daemon sets, and stateful sets. The Cluster Collector provides additional information, including usage metrics, to enrich Kubernetes monitoring.

Troubleshooting Kubernetes monitoring requires distinguishing between Kubernetes API connection failures and Cluster Collector connectivity problems.

The Kubernetes API connection is mandatory, while Cluster Collector connections are optional and depend on the configured datasource rule.

 

Background information regarding this subject is available on our:

 

 

Supported Kubernetes versions

The Kubernetes versions supported by Checkmk depend on the installed Checkmk release.

For Checkmk 2.5, Werk #19449 introduced a support policy under which four Kubernetes versions are officially supported at a time.

When support for a newer Kubernetes version is introduced, the oldest supported version is removed from the supported range.

 

This means:

  • Kubernetes clusters outside the supported range are not officially supported.

  • Monitoring may continue to work with unsupported Kubernetes versions, but compatibility issues may not be resolved.

  • New Kubernetes version support is announced through Checkmk Werks.

  • Compatibility should be verified when upgrading Kubernetes or Checkmk.

For Checkmk 2.3 and 2.4, consult the compatibility information applicable to the installed release.

 

Load balancing

 

Verify the LoadBalancer address

If the Cluster Collector was installed using a LoadBalancer, inspect the service:

root@linux:~$ kubectl get svc --namespace checkmk-monitoring checkmk-cluster-collector

The output should contain the external address assigned to the service.

 

Example:

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) checkmk-cluster-collector LoadBalancer 10.20.10.165 34.107.19.22 8080:31168/TCP

The external address and ports depend on the Kubernetes environment.

To retrieve the service IP address:

root@linux:~$ export SERVICE_IP=$(kubectl get svc --namespace checkmk-monitoring checkmk-cluster-collector --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")

 

Display the resulting endpoint:

root@linux:~$ echo "http://$SERVICE_IP:8080"

 

The Cluster Collector also has an internal Kubernetes DNS name:

checkmk-cluster-collector.checkmk-monitoring

This internal name is generally only resolvable from within the Kubernetes cluster.

 

 

Testing Cluster Collector connectivity

After installing the Cluster Collector, verify that it is reachable and responding.

The source procedure uses the service account created by the Helm installation to retrieve an authentication token and certificate authority information.

 

Retrieve the authentication token

The following command retrieves the token from the Kubernetes secret named checkmk-checkmk:

root@linux:~$ export TOKEN=$(kubectl get secret checkmk-checkmk -n checkmk-monitoring -o=jsonpath='{.data.token}' | base64 --decode)

 

Retrieve the certificate authority certificate:

root@linux:~$ export CA_CRT="$(kubectl get secret checkmk-checkmk -n checkmk-monitoring -o=jsonpath='{.data.ca\.crt}' | base64 --decode)"

 

To display the certificate while preserving its line breaks:

root@linux:~$ echo "$CA_CRT"

 

Note
These commands apply to installations where the Helm chart creates the referenced service account token secret. Newer Kubernetes configurations may use projected service account tokens instead.

If the secret is not present, verify the authentication configuration used by the installed chart.

 

 

Test the Cluster Collector API

Use the retrieved token to query the Cluster Collector metadata endpoint:

root@linux:~$ curl -H "Authorization: Bearer $TOKEN" http://$SERVICE_IP:8080/metadata | jq

A successful request confirms that the Cluster Collector API is responding and that the provided token is accepted.

 

If the request fails, investigate:

  • If the Cluster Collector service is running.

  • If the service is exposed correctly.

  • If IP address and port are correct.

  • If the Checkmk server can reach the endpoint.

  • If the authentication token is valid.

  • If firewall rules or network policies block communication.

Important
Perform the connectivity test from the Checkmk server, or from an environment with equivalent network access, to confirm that the endpoint is reachable from the monitoring environment.

 

Debugging

To troubleshoot the Kubernetes special agent, identify the command generated by Checkmk and execute it manually with additional debugging options.

 

Identify the configured command

Log in to the Checkmk server and switch to the affected site user.

root@linux:~$ su - mysite

 

Display the effective configuration of the Kubernetes cluster host:

OMD[mysite]:~$ cmk -D <myhost>

Locate the Type of agent → Program entry.

 

Example:

Type of agent: Program: /omd/sites/mysite/share/check_mk/agents/special/agent_kube '--cluster' 'k8s' '--token' 'xyz' '--monitored-objects' 'deployments' 'daemonsets' 'statefulsets' 'nodes' 'pods' '--api-server-endpoint' 'https://<API_SERVER>:6443' '--api-server-proxy' 'FROM_ENVIRONMENT' '--cluster-collector-endpoint' 'https://<COLLECTOR_ENDPOINT>:30035' '--cluster-collector-proxy' 'FROM_ENVIRONMENT'

The command includes all parameters configured through the Kubernetes datasource program rule.

 

The most important parameters include:

Parameter

Description

Parameter

Description

--cluster

Kubernetes cluster identifier.

--token

Authentication token used to access the Kubernetes API.

--monitored-objects

Kubernetes resource types to monitor.

--api-server-endpoint

Kubernetes API server address.

--api-server-proxy

Proxy configuration for Kubernetes API communication.

--cluster-collector-endpoint

Address of the Checkmk Cluster Collector.

--cluster-collector-proxy

Proxy configuration for Cluster Collector communication.

To inspect the available debugging options, execute the special agent with --help.

 

 

Execute the special agent manually

Copy the complete command from the Program entry and execute it as the Checkmk site user.

Alternatively, the following command extracts and executes the configured Kubernetes special agent:

OMD[mysite]:~$ /bin/sh -c "$(cmk -D <myhost> | grep -A1 '^Type of agent:' | grep 'Program:' | cut -f2- -d':')"

Note
If multiple Type of agent and Program entries exist, the command may produce incorrect results. In that case, manually execute the appropriate special agent command.

 

 

Enable debugging

The Kubernetes special agent provides the following debugging options:

 

The Kubernetes agent supports:

Option

Description

Option

Description

--debug

Enables debugging and displays Python exceptions.

--verbose

Enables verbose output.

-vvv

Enables more detailed output.

--vcrtrace

Records Kubernetes API requests and responses.

 

The VCR trace directory differs between Checkmk versions.

Checkmk version

Debugging options

Checkmk version

Debugging options

2.3 / 2.4

--debug -vvv --vcrtrace ~/tmp/debug/vcrtrace.txt &> ~/tmp/debug/debug.txt

2.5

--debug -vvv --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

 

For example, on Checkmk 2.5:

OMD[mysite]:~$ ~/share/check_mk/agents/special/agent_kube \ '--cluster' 'k8s' \ '--token' '<TOKEN>' \ '--monitored-objects' 'deployments' 'daemonsets' 'statefulsets' 'nodes' 'pods' \ '--api-server-endpoint' 'https://<API_SERVER>:6443' \ '--api-server-proxy' 'FROM_ENVIRONMENT' \ '--cluster-collector-endpoint' 'https://<COLLECTOR_ENDPOINT>:30035' \ '--cluster-collector-proxy' 'FROM_ENVIRONMENT' \ --debug -vvv --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt > ~/tmp/k8s_with_debug.txt 2>&1

Replace the example parameters with those generated by Checkmk.

 

If the generated output is too large, reduce the number of resources specified with --monitored-objects when reproducing the problem.

To collect raw agent output, execute the special agent without debugging options and redirect its output to a file:

OMD[mysite]:~$ <AGENT_COMMAND> > ~/tmp/agent_output.txt 2>&1

Replace <AGENT_COMMAND> with the configured Kubernetes special agent command.

 

 

Collect raw agent output

Execute the Kubernetes special agent without debugging options to generate a clean agent output file.

 

For example:

OMD[mysite]:~$ ~/share/check_mk/agents/special/agent_kube \ '--cluster' 'k8s' \ '--token' '<TOKEN>' \ '--monitored-objects' 'deployments' 'daemonsets' 'statefulsets' 'nodes' 'pods' \ '--api-server-endpoint' 'https://<API_SERVER>:6443' \ '--api-server-proxy' 'FROM_ENVIRONMENT' \ '--cluster-collector-endpoint' 'https://<COLLECTOR_ENDPOINT>:30035' \ '--cluster-collector-proxy' 'FROM_ENVIRONMENT' \ > ~/tmp/k8s_agent_output.txt 2>&1

Alternatively, download the agent output from the Kubernetes cluster host through the Checkmk web interface.

 

 

Collect diagnostic files

When submitting a support ticket, provide the following files:

File

Location

File

Location

Agent output

~/tmp/k8s_agent_output.txt

Debug output

~/tmp/k8s_with_debug.txt

VCR trace for Checkmk 2.3 / 2.4

~/tmp/debug/vcrtrace.txt

VCR trace for Checkmk 2.5

~/tmp/check_mk/debug/vcrtrace.txt

Security notice
Debugging output and VCR trace files may contain Kubernetes authentication tokens, API responses, and sensitive cluster information.

Review the files before sharing them with Checkmk Support.

 

 

Common Error: Cluster Collector connectivity errors

Cluster Collector connection failures are reported by the corresponding Cluster Collector service and do not necessarily cause the Kubernetes special agent to terminate.

The Kubernetes special agent can collect data from multiple datasources, and connections to Cluster Collector datasources are optional.

In normal production mode, Cluster Collector connection failures may not be raised as special agent errors.

Detailed error information is available when the special agent is executed with --debug.

 

Common causes

Cause

Description

Cause

Description

Cluster Collector not exposed

The Cluster Collector is not accessible through a LoadBalancer, NodePort, or Ingress.

Incorrect endpoint

The configured Cluster Collector IP address or port is incorrect.

Unhealthy Kubernetes resources

Pods, deployments, daemon sets, or replica sets are not running correctly.

Network restrictions

Firewalls, security groups, or network policies block communication.

Missing proxy configuration

A proxy is required but is not configured in the datasource program rule.

 

Troubleshooting procedure

  1. Verify that the Cluster Collector deployment is running.

  2. Check the Cluster Collector service configuration.

  3. Confirm that the service is exposed through an appropriate method.

  4. Verify that the configured IP address and port are correct.

  5. Test connectivity from the Checkmk server.

  6. Verify proxy settings where applicable.

  7. Execute the special agent with --debug to collect detailed information.

 

Use the following command to inspect the Kubernetes resources:

root@linux:~$ kubectl get all -n checkmk-monitoring

If the Cluster Collector is running but cannot be reached, investigate the service configuration and network connectivity.

 

 

Common Error: Kubernetes API connection errors

Unlike Cluster Collector connections, the connection to the Kubernetes API server is mandatory.

If the Kubernetes special agent cannot access the Kubernetes API, it terminates and the corresponding Checkmk service reports the failure.

 

For example, the agent may return:

401 Unauthorized

 

when querying Kubernetes API resources such as:

/api/v1/pods

 

 

Common causes

Cause

Description

Cause

Description

Incorrect service account configuration

The configured service account lacks the required roles or permissions.

Invalid authentication token

The configured token is incorrect or has expired.

TLS certificate validation failure

The Kubernetes API certificate cannot be verified.

Incorrect API endpoint

The configured Kubernetes API address or port is incorrect.

Network restrictions

Firewalls or other network controls prevent access to the API.

Proxy configuration

A required proxy is missing or incorrectly configured.

 

 

Troubleshooting procedure

  1. Verify that the configured Kubernetes API endpoint is correct.

  2. Confirm that the authentication token is valid.

  3. Verify that the service account has the required roles and permissions.

  4. Check network connectivity between the Checkmk server and the Kubernetes API.

  5. Verify proxy settings where applicable.

  6. Check TLS certificate validation settings.

  7. Execute the special agent with --debug.

 

 

TLS certificate validation

If the --verify-cert-api option is enabled, the Kubernetes API certificate must be trusted by Checkmk.

Ensure that the corresponding ca.crt certificate has been uploaded under Global settings → Trusted certificate authorities for SSL.

If the certificate authority is missing or incorrect, the special agent may fail with a certificate validation error.

 

 

Kubernetes API processing errors

Some Kubernetes API processing errors cannot be diagnosed using debugging output alone.

For example, the special agent may report an error similar to:

value ... was not set

These errors may occur while processing API responses.

In such cases, collect a VCR trace file in addition to the debugging output.

The VCR trace provides the API requests and responses required to investigate the problem in greater detail.

 

Use the version-appropriate trace directory:

Checkmk version

Trace file

Checkmk version

Trace file

2.3 / 2.4

~/tmp/debug/vcrtrace.txt

2.5

~/tmp/check_mk/debug/vcrtrace.txt

Include the trace file when submitting a support ticket.


 

 

Linux Agent Over SSH

The Checkmk Linux agent can be executed through SSH when direct agent communication is unavailable or unsuitable.

SSH monitoring failures are commonly caused by authentication problems or host key verification errors.

 

Debugging

If the Checkmk service reports an SSH-related error, verify the SSH configuration between the Checkmk server and the monitored host.

Log in to the Checkmk server and switch to the site user:

root@linux:~$ su - mysite

 

Attempt an SSH connection to the monitored host using the same account and authentication method configured for monitoring.

OMD[mysite]:~$ ssh <USERNAME>@<myhost>

 

If a specific private key is configured, include it in the command:

OMD[mysite]:~$ ssh -i <PRIVATE_KEY_PATH> <USERNAME>@<myhost>

These SSH troubleshooting procedures apply to Checkmk 2.3, 2.4, and 2.5.

 


Common Error: Permission denied

The Checkmk service may report:

Agent exited with code 255: Permission denied, please try again.

This indicates that SSH authentication failed.

One possible cause is an incorrectly configured public SSH key in the monitored host's authorized_keys file.

 

Check for:

  • Missing or additional characters.

  • Incorrectly copied public keys.

  • Unexpected line breaks.

  • Incorrect file permissions.

  • Incorrect usernames or private keys.

Verify that the public key stored on the monitored host matches the key configured for the Checkmk site user.

 

Common Error: Host key verification failed

The Checkmk service may report:

Agent exited with code 255: Host key verification failed. CRIT - Got no information from host, execution time 0.0 sec

This error indicates that SSH could not verify the remote host's identity.

 

The host key may be missing from the site's ~/.ssh/known_hosts file, or the stored key may no longer match the remote host.

 

To investigate, establish an SSH connection manually:

OMD[mysite]:~$ ssh <USERNAME>@<myhost>

If SSH prompts you to accept the remote host's key, verify the fingerprint against a trusted source before accepting it.

Once accepted, the host key is added to the site's known_hosts file.

If the stored key has changed unexpectedly, investigate the reason before replacing it.


 

 

Meraki Special Agent

The Cisco Meraki special agent collects monitoring data from the Meraki Dashboard API.

Troubleshooting typically involves verifying the configured API credentials, identifying the generated special agent command, and collecting debugging information.

The command contains the configured API key reference, monitored sections, and organization identifiers.

 

For example, the command may include:

agent_cisco_meraki meraki --apikey-id <PASSWORD_ID> --sections api-response-codes appliance-performance appliance-uplinks device-statuses --orgs <ORGANIZATION_ID>

Use the complete command generated by Checkmk rather than constructing the command manually.

 

The Meraki special agent supports:

  • --debug

  • --verbose

  • --vcrtrace

 

The executable for the newer plugin layout is:

~/lib/python3/cmk/plugins/cisco_meraki/libexec/agent_cisco_meraki

Confirm the executable location using cmk -D.

 

Append the following options to the configured command:

Checkmk version

Debugging options

Checkmk version

Debugging options

2.3 / 2.4

--debug --verbose --vcrtrace ~/tmp/debug/vcrtrace.txt &> ~/tmp/debug/debug.txt

2.5

--debug --verbose --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

 

For example, a Checkmk 2.5 command follows this structure:

OMD[mysite]:~$ ~/lib/python3/cmk/plugins/cisco_meraki/libexec/agent_cisco_meraki meraki --apikey-id <PASSWORD_ID> --sections api-response-codes appliance-performance appliance-uplinks device-statuses --orgs <ORGANIZATION_ID> --debug --verbose --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

Review debug.txt for API errors, authentication failures, and unexpected responses.

The vcrtrace.txt file contains additional API communication details that may be required for troubleshooting.


 

NetApp Special Agent

The NetApp special agent collects health, storage, and performance information from NetApp ONTAP systems through the REST API over HTTPS.

Common problems include incorrect authentication credentials, insufficient REST API permissions, and communication failures.

 

Debugging

Identify the configured NetApp special agent command:

OMD[mysite]:~$ cmk -D <myhost>

Locate the Program entry under Type of agent.

 

Add the debugging and VCR tracing options to the configured command.

Checkmk version

Debugging options

Checkmk version

Debugging options

2.3 / 2.4

--debug --verbose --vcrtrace ~/tmp/debug/vcrtrace.txt &> ~/tmp/debug/debug.txt

2.5

--debug --verbose --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

 

Example for Checkmk 2.5:

OMD[mysite]:~$ ~/share/check_mk/agents/special/agent_netapp_ontap --hostname <NETAPP_HOST> --username <USERNAME> --password <PASSWORD> --debug --verbose --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

Use the actual parameters and executable returned by cmk -D.

Review the debugging output for authentication errors, REST API failures, and permission problems.

The monitoring account requires read access to the ONTAP API endpoints used by the special agent.

 

Depending on the monitored resources, these may include:

REST API endpoint

Access

REST API endpoint

Access

/api/cluster

Read-only

/api/cluster/nodes

Read-only

/api/cluster/sensors

Read-only

/api/network/ethernet/ports

Read-only

/api/network/fc/ports

Read-only

/api/network/ip/interfaces

Read-only

/api/storage/aggregates

Read-only

/api/storage/disks

Read-only

/api/storage/luns

Read-only

/api/storage/shelves

Read-only

/api/storage/volumes

Read-only

/api/svm/svms

Read-only

Additional endpoints may be required for features such as S3 monitoring, SnapMirror relationships, quotas, and performance counters.

Verify that the configured ONTAP role provides access to the endpoints required by the enabled monitoring features.

When contacting Checkmk Support, provide the sanitized special agent command and debugging output.


 

Proxmox VE Special Agent

The Proxmox VE special agent collects monitoring information from Proxmox Virtual Environment through its API.

When troubleshooting the special agent, manually execute the configured command to identify authentication, communication, or data processing errors.

In some cases, the special agent may fail because cached JSON data has become corrupted.

 

Debugging

Identify the configured Proxmox VE special agent command:

OMD[mysite]:~$ cmk -D <myhost>

Locate the Type of agent → Program entry.

 

To reproduce the error manually, execute the configured special agent command.

Alternatively, the following command can extract and execute the Proxmox VE special agent command:

OMD[mysite]:~$ /bin/sh -c "$(cmk -D <myhost> | grep -A10 '^Type of agent:' | grep 'agent_proxmox_ve' | cut -f2- -d':')"

This shortcut assumes that the matching output contains the correct special agent command.

 

The Proxmox VE special agent supports:

Option

Description

Option

Description

--debug

Displays additional debugging information and Python exceptions.

--verbose

Enables verbose output.

--vcrtrace

Records API communication in a trace file.

 

The executable location differs between Checkmk versions.

Checkmk version

Executable

Checkmk version

Executable

2.3 / 2.4

~/share/check_mk/agents/special/agent_proxmox_ve

2.5

~/lib/python3.13/site-packages/cmk/plugins/proxmox_ve/libexec/agent_proxmox_ve

 

The Proxmox VE troubleshooting procedure provides a tested command for Checkmk 2.5.

To execute the special agent and collect its output:

OMD[mysite]:~$ ~/lib/python3.13/site-packages/cmk/plugins/proxmox_ve/libexec/agent_proxmox_ve -u <USERNAME> --password-id <PASSWORD_ID> test &> ~/proxmox.log

Replace <USERNAME> and <PASSWORD_ID> with the configured Proxmox VE username and Checkmk password ID.

 

For more detailed debugging:

OMD[mysite]:~$ ~/lib/python3.13/site-packages/cmk/plugins/proxmox_ve/libexec/agent_proxmox_ve -u <USERNAME> --password-id <PASSWORD_ID> test --debug --verbose --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

Ensure that the debugging directory exists before executing the command.

 

The version-specific debugging options are:

Checkmk version

Debugging options

Checkmk version

Debugging options

2.3 / 2.4

--debug --verbose --vcrtrace ~/tmp/debug/vcrtrace.txt &> ~/tmp/debug/debug.txt

2.5

--debug --verbose --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt


 

 

Special Agents Using stdin Parameters

Some Checkmk special agents receive configuration through standard input (stdin) rather than command-line arguments.

This allows Checkmk to pass structured configuration data to the special agent during execution.

Examples include the AWS and Prometheus special agents.

 

Debugging

When a special agent uses stdin parameters, the complete configuration is displayed in the effective host configuration.

Display the configuration:

OMD[mysite]:~$ cmk -D <myhost>

Locate the Type of agent section.

 

Example:

Type of agent: Program: /omd/sites/mysite/local/share/check_mk/agents/special/agent_prometheus Program stdin: {'connection': ('ip_address', {'port': 31275}), 'verify-cert': False, 'protocol': 'http', 'exporter': [('kube_state', {'cluster_name': 'mypromcluster', 'prepend_namespaces': 'use_namespace', 'entities': ['cluster', 'nodes', 'services', 'pods', 'daemon_sets']})], 'promql_checks': [], 'host_address': '10.18.49.2', 'host_name': 'myprometheushost'}

To execute the special agent manually, pass the configuration from Program stdin to the executable.

 

For example:

OMD[mysite]:~$ printf '%s\n' "{'connection': ('ip_address', {'port': 31275}), 'verify-cert': False, 'protocol': 'http', 'exporter': [('kube_state', {'cluster_name': 'mypromcluster', 'prepend_namespaces': 'use_namespace', 'entities': ['cluster', 'nodes', 'services', 'pods', 'daemon_sets']})], 'promql_checks': [], 'host_address': '10.18.49.2', 'host_name': 'myprometheushost'}" | ~/local/share/check_mk/agents/special/agent_prometheus

The configuration must match the output generated by Checkmk.

When the configuration contains characters that may be interpreted by the shell, use an appropriately quoted heredoc or another method that preserves the input exactly.

The stdin execution method is the same for Checkmk 2.3, 2.4, and 2.5.

 

For additional debugging, check the supported options:

OMD[mysite]:~$ <AGENT_EXECUTABLE> --help

Where supported, append options such as --debug or -vvv to the special agent command.

Not all stdin-based special agents support VCR tracing.


 

 

StoreOnce 4x Special Agent

The HPE StoreOnce 4.x special agent monitors StoreOnce backup systems through their REST API.

The special agent runs on the Checkmk server and communicates remotely with the StoreOnce appliance.

When troubleshooting monitoring failures, manually execute the configured command and collect debugging information.

 

Debugging

Identify the special agent command:

OMD[mysite]:~$ cmk -D <myhost>

Locate the Type of agent → Program entry.

 

The executable location differs between Checkmk versions.

Checkmk version

Executable

Checkmk version

Executable

2.3 / 2.4

~/share/check_mk/agents/special/agent_storeonce4x

2.5

~/lib/python3/cmk/plugins/storeonce4x/libexec/agent_storeonce4x

To inspect the available debugging options, execute the appropriate agent with --help.

For example, on Checkmk 2.5:

OMD[mysite]:~$ ~/lib/python3/cmk/plugins/storeonce4x/libexec/agent_storeonce4x --help

 

The options include:

Option

Description

Option

Description

--debug, -d

Enables debugging and allows certain exceptions to remain unhandled.

--verbose, -v

Enables verbose output.

--vcrtrace

Records or replays API communication.

--tracefile

Alternative option for specifying the trace file.

 

Use the command generated by Checkmk and append the appropriate debugging options.

Checkmk version

Debugging options

Checkmk version

Debugging options

2.3 / 2.4

--debug --verbose --vcrtrace ~/tmp/debug/vcrtrace.txt &> ~/tmp/debug/debug.txt

2.5

--debug --verbose --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

 

For Checkmk 2.5:

OMD[mysite]:~$ ~/lib/python3/cmk/plugins/storeonce4x/libexec/agent_storeonce4x <OTHER_ARGUMENTS> --debug --verbose --vcrtrace ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

Replace <OTHER_ARGUMENTS> with the complete parameters generated by Checkmk.

 

To collect raw agent output, execute the special agent without debugging options.

For Checkmk 2.5:

OMD[mysite]:~$ ~/lib/python3/cmk/plugins/storeonce4x/libexec/agent_storeonce4x <OTHER_ARGUMENTS> > ~/tmp/agent_output.txt

For Checkmk 2.3 and 2.4, use the corresponding executable from the version table.

 

The raw output can help reproduce the issue without additional debugging information.

Note
If a VCR trace file already exists, the StoreOnce special agent may replay the recorded responses instead of contacting the appliance.

Use a new trace filename when collecting fresh API communication.

 

For further details about authentication and available endpoints, refer to the StoreOnce REST API documentation.


 

 

VMware vSphere Special Agent

The VMware vSphere special agent collects monitoring information from VMware vCenter Server and ESXi environments.

The special agent provides information about virtual machines, host systems, datastores, performance counters, and other virtualization resources.

When monitoring vCenter, Checkmk can also use piggyback data to assign monitoring information to ESXi hosts and virtual machines.

 

Datastore provisioning

When monitoring vCenter, Checkmk can retrieve datastore provisioning information and identify excessive thin provisioning.

If only an individual ESXi host is monitored, the available provisioning information may not reflect the complete logical storage allocation across all virtual machines.

 

Piggyback monitoring

When vCenter is configured to collect the necessary information, Checkmk can distribute monitoring data to corresponding ESXi hosts and virtual machines through piggyback data.

This allows monitoring of resources such as CPU, memory, datastores, and virtual machine snapshots.

A read-only account on vCenter may be sufficient for collecting this information without requiring direct access to every ESXi host.

However, local host partitions are not visible when ESXi hosts are monitored exclusively through piggyback data.

Limitation: If ESXi hosts are not monitored directly via the Special Agent or SNMP, local host partitions are not visible.

 

Debugging

Identify the configured VMware vSphere special agent command:

OMD[mysite]:~$ cmk -D <myhost>

Locate the Type of agent → Program entry.

 

The command contains the configured credentials, target address, and monitored resources.

 

The executable is:

~/share/check_mk/agents/special/agent_vsphere

Verify the executable location using the effective host configuration.

 

Inspect the available options:

OMD[mysite]:~$ ~/share/check_mk/agents/special/agent_vsphere --help

 

The vSphere agent supports:

Option

 

Option

 

--debug

Enables debugging and displays Python exceptions.

--tracefile

Records outgoing and incoming API communication.

The vSphere instructions also contain examples using --vcrtrace and --trace.

These options should not be assumed to be interchangeable. Use the option supported by the installed special agent.

The debugging procedure is similar across Checkmk versions, but the trace directory and supported options may differ.

Checkmk version

Debugging options

Checkmk version

Debugging options

2.3 / 2.4

--debug --tracefile ~/tmp/debug/vcrtrace.txt &> ~/tmp/debug/debug.txt

2.5

--debug --tracefile ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

For example, where --tracefile is supported, a Checkmk 2.5 debugging command follows this structure:

OMD[mysite]:~$ ~/share/check_mk/agents/special/agent_vsphere -u <USERNAME> -s <PASSWORD> -i hostsystem,virtualmachine,datastore,counters,licenses -P --spaces cut --no-cert-check <VCENTER_ADDRESS> --debug --tracefile ~/tmp/check_mk/debug/vcrtrace.txt &> ~/tmp/check_mk/debug/debug.txt

Use the command generated by Checkmk for the affected vCenter host.

To collect raw agent output, execute the configured special agent command without debugging options and redirect the output to a file.

 

For example:

OMD[mysite]:~$ ~/share/check_mk/agents/special/agent_vsphere -u <USERNAME> -s <PASSWORD> -i hostsystem,virtualmachine,datastore,counters,licenses -P --spaces cut --no-cert-check <VCENTER_ADDRESS> > ~/tmp/agent_output.txt

 

Collect output over time

For intermittent problems, it may be necessary to collect multiple agent outputs over a longer period.

The following example collects the configured agent output every 60 seconds for approximately 10 minutes:

OMD[mysite]:~$ for s in $(seq 0 60 600); do cmk -d <myhost> > ~/tmp/agent_vsphere_output.$s; sleep 60; done

This captures the output available through cmk -d. Confirm that this is the required datasource output for the affected host before relying on it to reproduce a special agent problem.

 

For API-related problems, repeated trace collection may also be useful.

OMD[mysite]:~$ export t=60; export s=0; while [ $s -le 600 ]; do echo $s; ./agent_vsphere --trace /tmp/agent_vsphere_trace.$s $OTHER_COMMAND_PARAMS; let s=$s+$t; sleep $t; done

When collecting multiple traces, use a different filename for each execution to avoid replaying an existing trace file.


 

Related articles