Skip to content

Commit

Permalink
filter_ecs: make metadata API host and port configurable
Browse files Browse the repository at this point in the history
Signed-off-by: Wesley Pettit <[email protected]>
  • Loading branch information
PettitWesley committed Nov 1, 2022
1 parent be080bd commit 784ce47
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plugins/filter_ecs/ecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1600,6 +1600,20 @@ static struct flb_config_map config_map[] = {
"have been stopped."
},

{
FLB_CONFIG_MAP_STR, "ecs_meta_host", FLB_ECS_FILTER_HOST,
0, FLB_TRUE, offsetof(struct flb_filter_ecs, ecs_host),
"The host name at which the ECS Agent Introspection endpoint is reachable. "
"Defaults to 127.0.0.1"
},

{
FLB_CONFIG_MAP_STR, "ecs_meta_port", FLB_ECS_FILTER_PORT,
0, FLB_TRUE, offsetof(struct flb_filter_ecs, ecs_host),
"The port at which the ECS Agent Introspection endpoint is reachable. "
"Defaults to 51678"
},

{0}
};

Expand Down
3 changes: 3 additions & 0 deletions plugins/filter_ecs/ecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ struct flb_filter_ecs {
struct mk_list metadata_keys;
int metadata_keys_len;

flb_sds_t ecs_host;
int ecs_port;

/*
* This field is used when we build new container metadata objects
*/
Expand Down

0 comments on commit 784ce47

Please sign in to comment.