mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-04-20 09:26:49 +00:00
add log-counter go plugin
This commit is contained in:
@@ -108,7 +108,7 @@ func (p *Plugin) run(rule cpmtypes.CustomRule) (exitStatus cpmtypes.Status, outp
|
||||
}
|
||||
defer cancel()
|
||||
|
||||
cmd := exec.CommandContext(ctx, rule.Path)
|
||||
cmd := exec.CommandContext(ctx, rule.Path, rule.Args...)
|
||||
stdout, err := cmd.Output()
|
||||
if err != nil {
|
||||
if _, ok := err.(*exec.ExitError); !ok {
|
||||
|
||||
@@ -48,6 +48,8 @@ type CustomRule struct {
|
||||
Reason string `json:"reason"`
|
||||
// Path is the path to the custom plugin.
|
||||
Path string `json:"path"`
|
||||
// Args is the args passed to the custom plugin.
|
||||
Args []string `json:"args"`
|
||||
// Timeout is the timeout string for the custom plugin to execute.
|
||||
TimeoutString *string `json:"timeout"`
|
||||
// Timeout is the timeout for the custom plugin to execute.
|
||||
|
||||
Reference in New Issue
Block a user