Skip to content

custom plugin "Error in running plugin timeout" #1110

@raffaelespazzoli

Description

@raffaelespazzoli

Hello, I have a custom plugin define as follows:

ontap-san-test.json: |
    {
      "plugin": "custom",
      "pluginConfig": {
        "invoke_interval": "30s",
        "timeout": "5s",
        "max_output_length": 80,
        "concurrency": 3,
        "enable_message_change_based_condition_update": true
      },
      "source": "ontap-san-custom-plugin-monitor",
      "metricsReporting": true,
      "conditions": [
        {
          "type": "OntapSANProblem",
          "reason": "OntapSANIsUp",
          "message": "Ontap-san connection service is up"
        }
      ],
      "rules": [
        {
          "type": "permanent",
          "condition": "OntapSANProblem",
          "reason": "OntapSANIsDown",
          "path": "./custom-config/ontap-check.sh",
          "timeout": "3s"
        }
      ]
    }
  ontap-check.sh: |
    #!/bin/bash

    # This plugin checks if the ntp service is running under systemd.
    # NOTE: This is only an example for systemd services.

    readonly OK=0
    readonly NONOK=1
    readonly UNKNOWN=2

    # Return success if we can read data from the block device
    if timeout -k 2s 1s dd iflag=direct if=/dev/ontap-san-test bs=4096 count=1 of=/dev/null; then
      echo "ontap-san-test is accessible"
      exit $OK
    else
      echo "ontap-san-test is NOT accessible"
      exit $NONOK
    fi

When I artificially generate the error condition, the node-problem-detector prints out the following:

Error in running plugin timeout "./custom-config/ontap-check.sh"

I took a look at the code, and this log log line does not seem to be in the right place (

klog.Errorf("Error in running plugin timeout %q", rule.Path)
).
But after that log it's unclera to me why nothng else happens.

Any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions