Monitoring AWS Beanstalk
You can monitor your AWS Beanstalk service with the Instana AWS sensor to gain insights into the performance and health of your web applications. After you install the Instana AWS agent, the AWS Beanstalk sensor is automatically deployed and installed. To monitor Beanstalk instances, enable enhanced monitoring in the AWS Console and select the desired metrics in the environment configuration. You can then view Beanstalk metrics in the Instana UI.
For more information about other supported AWS services, see the AWS documentation.
- Prerequisites for monitoring
- Setting up monitoring
- Viewing metrics and configuration data
- Disabling monitoring
Prerequisites for monitoring
Ensure that the following prerequisites are met:
- The Instana AWS agent is installed. For more information, see Installing AWS agent.
- Enhanced monitoring is enabled in the AWS Console.
- Desired metrics are selected in the environment configuration.
Setting up monitoring
After you install the AWS agent, the AWS Beanstalk sensor is automatically deployed and installed. To monitor AWS Beanstalk instances, you need to complete the following steps:
After you complete these steps, you can view the metrics in the Instana UI. For more information, see Viewing metrics.
Adding required IAM permissions
To monitor AWS Beanstalk environments, add the following permissions to the IAM role configurations. For more information, see Amazon web services IAM configuration.
cloudwatch:GetMetricStatistics
cloudwatch:GetMetricData
elasticbeanstalk:DescribeEnvironments
elasticbeanstalk:ListTagsForResource
elasticbeanstalk:DescribeInstancesHealth
With these permissions, the Instana AWS agent can discover and monitor your AWS resources.
Optional: Configuring the AWS Beanstalk sensor
After the Instana agent is installed and required permissions are added, the AWS Beanstalk sensor is enabled by default. The sensor starts collecting metrics from the AWS Beanstalk environments and instances. You can modify the following configuration settings for enhanced monitoring:
Setting metrics collection interval
Beanstalk instances are refreshed every 60 seconds. Due to an asynchronous nature of detection, display of instance metrics in the Instana UI can be delayed. This delay depends on the specified poll rate (cloudwatch_period
)
in the agent configuration file.
By default, the AWS Beanstalk sensor pulls and displays instance metrics on the Instana dashboard every 60 seconds. To modify this setting, change the cloudwatch_period
configuration parameter value in the agent
configuration yaml file /opt/instana/agent/etc/instana/configuration.yml
:
com.instana.plugin.aws.beanstalk:
cloudwatch_period: 60
Setting proxy configuration
To configure the specific AWS Sensor to use proxy configuration, add the following agent configuration settings:
com.instana.plugin.aws.beanstalk:
proxy_host: 'example.com' # proxy host name or ip address
proxy_port: 3128 # proxy port
proxy_protocol: 'HTTP' # proxy protocol: HTTP or HTTPS
proxy_username: 'username' # OPTIONAL: proxy username
proxy_password: 'password' # OPTIONAL: proxy password
Monitoring AWS Beanstalk environments across multiple AWS accounts
You need to configure which profiles or roles must be used to monitor Beanstalk environments across multiple AWS accounts.
For more information about setting up monitoring of multiple AWS accounts with one AWS agent in the same region, see Monitoring multiple AWS accounts.
AWS named profiles approach
To override which profiles must be used to monitor Beanstalk, add the additional profiles to be used by the AWS agent:
com.instana.plugin.aws.beanstalk:
profile_names:
- 'profile2'
- 'profile3'
Defining profiles on service level overrides the global AWS profiles configuration.
AWS STS approach
To override which IAM Roles must be used to monitor Beanstalk, provide IAM role ARNs from all additional AWS accounts:
com.instana.plugin.aws.beanstalk:
role_arns:
- 'arn:aws:iam::<account_1_id>:role/<role_2_name>'
- 'arn:aws:iam::<account_2_id>:role/<role_3_name>'
Defining IAM roles on the service level overrides the global AWS IAM roles configuration.
Filtering AWS Beanstalk instances for monitoring
After the AWS Beanstalk sensor is enabled, it monitors all instances of AWS Beanstalk by default. However, you can filter which of the AWS Beanstalk instances the sensor must discover and monitor based on AWS tags. To configure filtering,
modify the AWS agent configuration file /opt/instana/agent/etc/instana/configuration.yaml
.
Multiple tags can be defined, separated by a comma. Tags must be provided as a key-value pair separated by colon (:). To make configuration easier, you can define which tags to include in discovery or exclude from discovery. If you define a tag in both lists (include and exclude), the exclude list has a higher priority. If you don't need filtering services, do not define the configuration. It’s not mandatory to define all values to enable filtering.
You can specify how often sensors poll the AWS tagged resources that use the tagged-services-poll-rate
configuration property (default 300 seconds). For more information, see Modifying poll Rate.
Tags are only available with the AWS agent.
To include Beanstalk instances with specified tags into discovery, add their tags to the following configuration:
com.instana.plugin.aws.beanstalk:
include_tags: # Comma separated list of tags in key:value format (e.g. env:prod,env:staging)
To exclude Beanstalk instances with specified tags from discovery, add their tags to the following configuration:
com.instana.plugin.aws.beanstalk:
exclude_tags: # Comma separated list of tags in key:value format (e.g. env:dev,env:test)
Beanstalk instances without tags are monitored by default but can be excluded by setting the include_untagged
field to false
:
com.instana.plugin.aws.beanstalk:
include_untagged: false # True value by default
Modifying poll rate
To define how often sensors poll the tagged resources, modify the tagged-services-poll-rate
in the following configuration:
com.instana.plugin.aws:
tagged-services-poll-rate: 60 #default 300
Viewing metrics and configuration data
To view the metrics, complete the following steps:
- From the navigation menu in the Instana UI, click Infrastructure.
- Click a specified host.
You can see a host dashboard with all the collected metrics and monitored processes.
Tracked configuration data
The AWS Beanstalk sensor collects the following configuration data:
Environment details
The sensor tracks the following environment details:
- Application name
- Environment ID
- Environment Name
- Environment Description
- Environment ARN
- Environment Status
- Date created
- Version Label
- Solution Stack
- Environment URL
- Application name
- Application name
- Application name
- Grouping zone (region)
Instance details
The sensor tracks the following instance details:
- Instance ID
- Instance Status
- Instance Type
- Instance started Date
Metrics
The AWS Beanstalk sensor collects the following metrics:
Environment metrics
The following table displays the environment metrics that the sensor collects:
Name | Description |
---|---|
EnvironmentHealth | Environment health represented as one of seven statuses |
InstancesOk | Number of instances in the environment with Ok status |
InstancesInfo | Number of instances in the environment with information status |
InstancesUnknown | Number of instances in the environment with Unknown status |
InstancesNoData | Number of instances in the environment with NoData status |
InstancesWarning | Number of instances in the environment with Warning status |
InstancesDegraded | Number of instances in the environment with Degraded status |
InstancesSevere | Number of instances in the environment with Severe status |
Instance metrics
The following table displays the instance metrics that the sensor collects:
Name | Description |
---|---|
InstanceHealth | Current health status of the instance |
CPUIrq | Percentage of time that the CPU spent in irq state |
CPUIdle | Percentage of time that the CPU spent in idle state |
CPUUser | Percentage of time that the CPU spent in user state |
CPUSystem | Percentage of time that the CPU spent in system state |
CPUSoftirq | Percentage of time that the CPU spent in softirq state |
CPUIowait | Percentage of time that the CPU spent in iowait state |
CPUNice | Percentage of time that the CPU spent in nice state |
LoadAverage1min | CPU load of the instance over the last minute |
RootFilesystemUtil | Percentage of disk space in use by instance |
Environment and instance metrics
The following table displays the environment and instance metrics that the sensor collects:
Name | Description |
---|---|
ApplicationLatencyP10 | Amount of time it takes to complete the fastest 10% of requests |
ApplicationLatencyP50 | Amount of time it takes to complete the fastest 50% of requests |
ApplicationLatencyP75 | Amount of time it takes to complete the fastest 75% of requests |
ApplicationLatencyP85 | Amount of time it takes to complete the fastest 85% of requests |
ApplicationLatencyP90 | Amount of time it takes to complete the fastest 90% of requests |
ApplicationLatencyP95 | Amount of time it takes to complete the fastest 95% of requests |
ApplicationLatencyP99 | Amount of time it takes to complete the fastest 99% of requests |
ApplicationLatencyP99.9 | Amount of time it takes to complete the fastest 99.9% of requests |
ApplicationRequests2xx | Number of requests that completed with 2xx status code |
ApplicationRequests3xx | Number of requests that completed with 3xx status code |
ApplicationRequests4xx | Number of requests that completed with 4xx status code |
ApplicationRequests5xx | Number of requests that completed with 5xx status code |
ApplicationRequestsTotal | Total number of requests |
Disabling monitoring
To disable monitoring of Beanstalk instances, modify the following settings in the agent configuration file:
com.instana.plugin.aws.beanstalk:
enabled: false