Fixed the bug and modified the config testing data for exec plugin
This commit is contained in:
parent
3d9eeb0d8e
commit
7c8222813b
|
@ -107,7 +107,7 @@
|
|||
# Read flattened metrics from one or more commands that output JSON to stdout
|
||||
[[inputs.exec]]
|
||||
# the command to run
|
||||
command = "/usr/bin/mycollector --foo=bar"
|
||||
commands = ["/usr/bin/mycollector --foo=bar"]
|
||||
name_suffix = "_mycollector"
|
||||
|
||||
# Read metrics of haproxy, via socket or csv stats page
|
||||
|
|
|
@ -89,7 +89,7 @@ func (t *Tail) Start() error {
|
|||
c := NewConfig(t.Files, t.Separator, t.Tags, t.Templates)
|
||||
c.WithDefaults()
|
||||
if err := c.Validate(); err != nil {
|
||||
return fmt.Errorf("Tail input configuration is error! ", err.Error())
|
||||
return fmt.Errorf("Tail input configuration is error: %s ", err.Error())
|
||||
}
|
||||
t.config = c
|
||||
|
||||
|
@ -111,7 +111,7 @@ func (t *Tail) Start() error {
|
|||
for i, fileName := range t.Files {
|
||||
t.tailPointers[i], err = t.tailFile(fileName)
|
||||
if err != nil {
|
||||
fmt.Errorf("Can not open the file: %s to tail", fileName)
|
||||
return fmt.Errorf("Can not open the file: %s to tail", fileName)
|
||||
} else {
|
||||
t.logger.Printf("Openning the file: %s to tail", fileName)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue