Skip to content

Commit

Permalink
Make things work.
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Baird <[email protected]>
  • Loading branch information
joshuabaird committed Oct 30, 2023
1 parent fa9661f commit 6a17c3d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions apis/fluentd/v1alpha1/plugins/input/monitor_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ type MonitorAgent struct {
// If you set this parameter, this plugin emits metrics as records.
Tag *string `json:"tag,omitempty"`
// The interval time between event emits. This will be used when "tag" is configured.
EmitInterval *int64 `json:"emitInterval,omitempty"`
EmitInterval *int64 `json:"emit_interval,omitempty"`
// You can set this option to false to remove the config field from the response.
IncludeConfig *bool `json:"includeConfig,omitempty"`
IncludeConfig *bool `json:"include_config,omitempty"`
// You can set this option to false to remove the retry field from the response.
IncludeRetry *bool `json:"includeRetry,omitempty"`
IncludeRetry *bool `json:"include_retry,omitempty"`
}
10 changes: 5 additions & 5 deletions apis/fluentd/v1alpha1/plugins/input/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,22 +366,22 @@ func (i *Input) samplePlugin(parent *params.PluginStore, loader plugins.SecretLo
func (i *Input) monitorAgentPlugin(parent *params.PluginStore, loader plugins.SecretLoader) *params.PluginStore {
monitorAgentModel := i.MonitorAgent
if monitorAgentModel.Port != nil {
parent.InsertPairs("port", fmt.Sprint(*monitorAgentModel.Tag))
parent.InsertPairs("port", fmt.Sprint(*monitorAgentModel.Port))
}
if monitorAgentModel.Bind != nil {
parent.InsertPairs("bind", fmt.Sprint(*monitorAgentModel.Tag))
parent.InsertPairs("bind", fmt.Sprint(*monitorAgentModel.Bind))
}
if monitorAgentModel.Tag != nil {
parent.InsertPairs("tag", fmt.Sprint(*monitorAgentModel.Tag))
}
if monitorAgentModel.EmitInterval != nil {
parent.InsertPairs("emitInterval", fmt.Sprint(*monitorAgentModel.Tag))
parent.InsertPairs("emit_interval", fmt.Sprint(*monitorAgentModel.EmitInterval))
}
if monitorAgentModel.IncludeConfig != nil {
parent.InsertPairs("includeConfig", fmt.Sprint(*monitorAgentModel.Tag))
parent.InsertPairs("include_config", fmt.Sprint(*monitorAgentModel.IncludeConfig))
}
if monitorAgentModel.IncludeRetry != nil {
parent.InsertPairs("includeRetry", fmt.Sprint(*monitorAgentModel.Tag))
parent.InsertPairs("include_retry", fmt.Sprint(*monitorAgentModel.IncludeRetry))
}
return parent
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<source>
@type monitor_agent
port 24220
bind 0.0.0.0
tag example
emit_interval 5
include_config true
include_retry true
@type monitor_agent
bind 0.0.0.0
emit_interval 5
include_config true
include_retry true
port 24220
tag example
</source>
<match **>
@id main
Expand Down
10 changes: 5 additions & 5 deletions apis/fluentd/v1alpha1/tests/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ spec:
globalInputs:
- monitor_agent:
bind: 0.0.0.0
port: 24220
tag: test
emit_interval: 5
include_config: true
include_retry: true
port: 24220
tag: example
emit_interval: 5
include_config: true
include_retry: true
replicas: 1
image: kubesphere/fluentd:v1.15.3
fluentdCfgSelector:
Expand Down

0 comments on commit 6a17c3d

Please sign in to comment.