Skip to content

Commit

Permalink
filter_aws: add more IMDS categories
Browse files Browse the repository at this point in the history
Signed-off-by: commiterate <111539270+commiterate@users.noreply.github.com>
  • Loading branch information
commiterate committed Dec 16, 2024
1 parent 362ca1f commit 398a519
Show file tree
Hide file tree
Showing 4 changed files with 1,482 additions and 17 deletions.
29 changes: 19 additions & 10 deletions include/fluent-bit/aws/flb_aws_imds.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,25 @@

/* The following metadata paths can be evaluated with flb_aws_imds_request
* to retrieve specific metadata members */
#define FLB_AWS_IMDS_INSTANCE_ID_PATH "/latest/meta-data/instance-id/"
#define FLB_AWS_IMDS_AZ_PATH "/latest/meta-data/placement/availability-zone/"
#define FLB_AWS_IMDS_INSTANCE_TYPE_PATH "/latest/meta-data/instance-type/"
#define FLB_AWS_IMDS_PRIVATE_IP_PATH "/latest/meta-data/local-ipv4/"
#define FLB_AWS_IMDS_VPC_ID_PATH_PREFIX "/latest/meta-data/network/interfaces/macs/"
#define FLB_AWS_IMDS_AMI_ID_PATH "/latest/meta-data/ami-id/"
#define FLB_AWS_IMDS_ACCOUNT_ID_PATH "/latest/dynamic/instance-identity/document/"
#define FLB_AWS_IMDS_HOSTNAME_PATH "/latest/meta-data/hostname/"
#define FLB_AWS_IMDS_MAC_PATH "/latest/meta-data/mac/"
#define FLB_AWS_IMDS_INSTANCE_TAG "/latest/meta-data/tags/instance"
#define FLB_AWS_IMDS_INSTANCE_ID_PATH "/latest/meta-data/instance-id/"
#define FLB_AWS_IMDS_PARTITION_PATH "/latest/meta-data/services/partition/"
#define FLB_AWS_IMDS_DOMAIN_PATH "/latest/meta-data/services/domain/"
#define FLB_AWS_IMDS_REGION_PATH "/latest/meta-data/placement/region/"
#define FLB_AWS_IMDS_AZ_PATH "/latest/meta-data/placement/availability-zone/"
#define FLB_AWS_IMDS_AZ_ID_PATH "/latest/meta-data/placement/availability-zone-id/"
#define FLB_AWS_IMDS_PLACEMENT_GROUP_PATH "/latest/meta-data/placement/group-name/"
#define FLB_AWS_IMDS_PARTITION_NUMBER_PATH "/latest/meta-data/placement/partition-number/"
#define FLB_AWS_IMDS_HOST_ID_PATH "/latest/meta-data/placement/host-id/"
#define FLB_AWS_IMDS_INSTANCE_TYPE_PATH "/latest/meta-data/instance-type/"
#define FLB_AWS_IMDS_PRIVATE_IP_PATH "/latest/meta-data/local-ipv4/"
#define FLB_AWS_IMDS_PUBLIC_IP_PATH "/latest/meta-data/public-ipv4/"
#define FLB_AWS_IMDS_IPV6_PATH "/latest/meta-data/ipv6/"
#define FLB_AWS_IMDS_VPC_ID_PATH_PREFIX "/latest/meta-data/network/interfaces/macs/"
#define FLB_AWS_IMDS_AMI_ID_PATH "/latest/meta-data/ami-id/"
#define FLB_AWS_IMDS_ACCOUNT_ID_PATH "/latest/dynamic/instance-identity/document/"
#define FLB_AWS_IMDS_HOSTNAME_PATH "/latest/meta-data/hostname/"
#define FLB_AWS_IMDS_MAC_PATH "/latest/meta-data/mac/"
#define FLB_AWS_IMDS_INSTANCE_TAG "/latest/meta-data/tags/instance"

#include <fluent-bit/flb_config.h>
#include <fluent-bit/flb_sds.h>
Expand Down
Loading

0 comments on commit 398a519

Please sign in to comment.