-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds fluentd monitor_agent input plugin (#967)
* Add fluentd monitor_agent input plugin. Signed-off-by: Josh Baird <jbaird@galileo.io> * Add docs. Signed-off-by: Josh Baird <jbaird@galileo.io> * Use the right test file. Signed-off-by: Josh Baird <jbaird@galileo.io> * Use the right test file. Signed-off-by: Josh Baird <jbaird@galileo.io> * Debug. Signed-off-by: Josh Baird <jbaird@galileo.io> * Remove debug bin. Signed-off-by: Josh Baird <jbaird@galileo.io> * Debug. Signed-off-by: Josh Baird <jbaird@galileo.io> * Debug. Signed-off-by: Josh Baird <jbaird@galileo.io> * Fix params. Signed-off-by: Josh Baird <jbaird@galileo.io> * Empty commit Signed-off-by: Josh Baird <jbaird@galileo.io> * Fix the input plugin. Signed-off-by: Josh Baird <jbaird@galileo.io> * Add other fields. Signed-off-by: Josh Baird <jbaird@galileo.io> * Removed debug bin. Signed-off-by: Josh Baird <jbaird@galileo.io> * Indent. Signed-off-by: Josh Baird <jbaird@galileo.io> * Make things work. Signed-off-by: Josh Baird <jbaird@galileo.io> * Use camelCase for CRD fields. Signed-off-by: Josh Baird <jbaird@galileo.io> * Update docs. Signed-off-by: Josh Baird <jbaird@galileo.io> * Empty commit Signed-off-by: Josh Baird <jbaird@galileo.io> * More camelCase. Signed-off-by: Josh Baird <jbaird@galileo.io> * Fix typos. Signed-off-by: Josh Baird <jbaird@galileo.io> --------- Signed-off-by: Josh Baird <jbaird@galileo.io>
- Loading branch information
1 parent
1dff378
commit fb92dfa
Showing
14 changed files
with
264 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package input | ||
|
||
// The in_monitor_agent Input plugin exports Fluentd's internal metrics via REST API. | ||
type MonitorAgent struct { | ||
// The port to listen to. | ||
Port *int64 `json:"port,omitempty"` | ||
// The bind address to listen to. | ||
Bind *string `json:"bind,omitempty"` | ||
// 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"` | ||
// You can set this option to false to remove the config field from the response. | ||
IncludeConfig *bool `json:"includeConfig,omitempty"` | ||
// You can set this option to false to remove the retry field from the response. | ||
IncludeRetry *bool `json:"includeRetry,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
apis/fluentd/v1alpha1/tests/expected/fluentd-global-cfg-input-monitorAgent.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<source> | ||
@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 | ||
@type label_router | ||
<route> | ||
@label @2d9e59757d3bfc66d93c3bc44b408922 | ||
<match> | ||
namespaces fluent | ||
</match> | ||
</route> | ||
</match> | ||
<label @2d9e59757d3bfc66d93c3bc44b408922> | ||
<match foo.*> | ||
@id FluentdConfig-fluent-fluentd-config::cluster::clusteroutput::fluentd-output-stdout-0 | ||
@type stdout | ||
</match> | ||
</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# MonitorAgent | ||
|
||
The in_monitor_agent Input plugin exports Fluentd's internal metrics via REST API. | ||
|
||
|
||
| Field | Description | Scheme | | ||
| ----- | ----------- | ------ | | ||
| port | The port to listen to. | *int64 | | ||
| bind | The bind address to listen to. | *string | | ||
| tag | If you set this parameter, this plugin emits metrics as records. | *string | | ||
| emitInterval | The interval time between event emits. This will be used when \"tag\" is configured. | *int64 | | ||
| includeConfig | You can set this option to false to remove the config field from the response. | *bool | | ||
| includeRetry | You can set this option to false to remove the retry field from the response. | *bool | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.