# Global prefix that prefixes all metrics generated by this deployment. A _ separator is added automatically. metricPrefix: awssdk # Uncomment and edit the section below if you wish to deploy to an EKS Cluster. #deploymentConfig: # # Create / Determine your OIDC provider. See: https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html # oidcProvider: oidc.eks.[region].amazonaws.com/id/[identifier] # # The namespace that will be used for our metric gathering container. It will be created if it doesn't exist. # namespace: aws-sdk-prom-metrics # # Your AWS Account ID. Used while constructing the roles trust information. # awsAccountId: "012345678910" # # The URI to retrieve the container image you built with 'make docker' and pushed to. # imageUri: 012345678910.dkr.ecr.[region].amazonaws.com/aws-sdk-prom-metrics:label # # The Service Account Name that will be created in the EKS cluster. # serviceAccountName: aws-sdk-prom-metrics metrics: # How often (in minutes) to run our SDK command - frequency: 1 # The name of the metric in Prometheus. This will be prefixed by the 'metricPrefix' listed above. metricName: "remaining_ips" # The help message that accompanies the metric in Prometheus metricHelp: Remaining IP Addresses for Subnet # The name of the SDK Library to use. For available libraries see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html sdkLibrary: "@aws-sdk/client-ec2" # The name of the client within the library above. ie: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/index.html sdkClientName: "EC2Client" # The command we want our sdk to run. ie: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/describesubnetscommand.html sdkCommand: "DescribeSubnetsCommand" # The Action, and Resources section for permissions required for this command to work. These are optional and only used if 'deploymentConfig' is setup. iamPermissions: actions: - ec2:DescribeSubnets resources: # You can limit this scope to specific Subnet resource ARNs if they are known up-front - '*' # Knowing our commands output shape # (ie: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/describesubnetscommandoutput.html) # We can use a JSON Pointer (https://datatracker.ietf.org/doc/html/rfc6901) to set and get values. # Since our IP Count is numeric, we will create a gauge. Gauges are optional and when not present will create a 'Summary' instead. gaugeValue: "$.Subnets[*].AvailableIpAddressCount" # We can include labels using our JSON pointer syntax to extract labels of interest. labels: subnet_id: "$.Subnets[*].SubnetId" availability_zone: "$.Subnets[*].AvailabilityZone" availability_zone_id: "$.Subnets[*].AvailabilityZoneId" # By default, we will gather metrics for all subnets. We can fine-tune this knowing our command input shape if desired. # Uncomment the line below if the specific list of subnets you wish to describe is known up-front. sdkCommandInput: # SubnetIds: # # Add more subnets to this array if they are known up-front. # - subnet-[identifier]