Skip to content

Custom plugins always show negative reason #307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
grosser opened this issue Jul 8, 2019 · 2 comments
Closed

Custom plugins always show negative reason #307

grosser opened this issue Jul 8, 2019 · 2 comments

Comments

@grosser
Copy link
Contributor

grosser commented Jul 8, 2019

For example this config:

{
  "plugin": "custom",
  "pluginConfig": {
    "invoke_interval": "5m",
    "timeout": "60s",
    "max_output_length": 80,
    "concurrency": 1
  },
  "conditions": [
    {
      "type": "MyCondition",
      "reason": "PositiveReason",
      "message": "Docker Task count is normal"
    }
  ],
  "rules": [
    {
      "type": "permanent",
      "condition": "MyCondition",
      "reason": "NegativeReason",
      "path": "./config/plugin/my_condition.rb",
      "timeout": "60s"
    }
  ]
}

the plugin passes (can see that in the logs), and it shows the correct message, but it always shows the NegativeReason reason ... we were following the example https://github.com/kubernetes/node-problem-detector/blob/master/config/custom-plugin-monitor.json which uses the same positive/negative reason setup, but that does not seem to work.

Same goes for the events

  Normal  MyCondition  9m47s  , ip-xxx.ec2.internal            Node condition MyCondition is now: False, reason: NegativeReason
@grosser
Copy link
Contributor Author

grosser commented Jul 8, 2019

and if there is not fix, at least update the ntp example so nobody else runs into this problem 🤷‍♂

@wangzhen127
Copy link
Member

Sounds like duplicated issues as #202, I am closing this one in favor of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants