AWS collector
Service description
Amazon Web Services (AWS) provides on-demand cloud computing platforms and APIs to individuals and companies. Each available AWS service generates information related to different aspects of its functionality. The AWS collector will use some of the available AWS APIs for retrieving this information and sending it to the Devo platform.
You can use the AWS collector to send this information to your Devo domain. Once the gathered information arrives at Devo, it will be processed and included in different tables in the associated Devo domain.
Data source description
From the monitoring point of view, AWS generates the following types of information:
Events
Information that happens at a specific timestamp. This information will always be joined to that timestamp, and can be categorized into two different subtypes:
Service events
The different available services usually generate information related to their internal behaviors, such as A virtual machine has been started, A new file has been created in an S3 bucket or An AWS lambda function has been invoked.
Note that this type of event can be triggered with no human interaction. These kinds of events are managed by the CloudWatch Events service (CWE).
Audit events
These events are more specific because they need human interaction no matter the different ways used (API, web interaction, or even CLI command). These events are managed by the CloudTrail service.
Metrics
According to the standard definition, this kind of information is usually generated at the same moment it is requested because it is usually a query about the status of a service (all things inside AWS are considered services).
AWS makes something slightly different because it generates metrics information every N time slots, such as 1 min, 5 min, 30 min, 1h, etc., even if no one makes a request (it is also possible to have information every X seconds but this would require an extra cost). This kind of information is managed by the CloudWatch Metrics service (CWM).
Logs
Logs can be defined as information with a non-fixed structure that is sent to one of the available “logging” services. These services are CloudWatch Logs and S3.
There are some very customizable services, such as AWS Lambda, or even any developed application which is deployed inside an AWS virtual machine (EC2), that can generate custom log information. This kind of information is managed by the CloudWatch Logs service (CWL) and also by the S3 service. There are also some other services that can generate logs with a fixed structure, such as VPC Flow Logs or CloudFront Logs. These kinds of services require one special way of collecting their data.
Some services generate information that can be sent to different targets at the same time, for example, the CloudTrail service generates audit-related information. This information is really an "audit event", but it can be treated as a "simple event" and being sent to the Cloudwatch Events service. Also, it can be sent as a string “logline” to the Cloudwatch Logs service or sent as a file to a bucket inside the S3 service.
Almost all services that generate Service events usually send them to Cloudwatch Events service (CWE). It could be said that 90% of services use CloudWatch Events.
CloudWatch Events is in the process of changing its name, the new one is Amazon EventBridge.
Setup
Some manual actions are necessary in order to get all the required information/services and allow the Devo collector to gather the information from AWS. The following sections describe how to get the required AWS credentials and how to proceed with the different required setups depending on the gathered information type.
Credentials
The AWS collector requires a valid AWS Access Key to start working. To create it, please visit the AWS Console and log in with a user account with enough permissions to create/access AWS structures (depending on whether or not the auto-setup functionality will be used). Then, follow these steps:
Go to IAM → Users
Find your user and click on it.
Select the Security credentials tab and click Create access key.
Copy and save the Access key ID and the Secret access key to use them later in the collector configuration, in the
access_key
andaccess_secret
fields.
Service events
All service events are managed by the AWS CloudWatch service. This service brings together all service events that are generated by most of the AWS services.
The AWS services generate service events per region, so the next instructions should be applied in each region where the collecting of information is required (use the same values for all your configured regions).
In order to collect these service events, there are some structures that must be created: one FIFO queue in the SQS service and one Rule+Target in the CloudWatch service.
For a manual creation of these required structures, follow the next steps (click to expand):
Audit events
No actions are required in the Cloudtrail service to retrieve this kind of information.
Metrics
No actions are required in the CloudWatch Metrics service to retrieve this kind of information.
Logs
Logs can be collected from different services. Depending on the service type, you may need to apply some settings on AWS:
CloudWatch Logs
No actions are required in this service to retrieve this kind of information.
VPC Flow Logs
Before enabling the generation of these logs, you must create one bucket in the S3 service and one FIFO queue in the SQS service. For a manual creation of these required structures, follow these steps (click to expand):
CloudFront Logs
Before enabling the generation of these logs, you must create one bucket in the S3 service and one FIFO queue in the SQS service. For a manual creation of these required structures, follow these steps (click to expand):
Collector service details
The following tables show details about the predefined services available to be used in the collector configuration.
Devo collector service name | Complete service name | CloudWatch filter used | CloudTrail source filter used | Metrics namespace used | Description | Service events | Audit events | Metrics | Logs |
---|---|---|---|---|---|---|---|---|---|
| All service events |
| N/A | N/A | This service will collect all service events information available in the CloudWatch service, no matter the source defined in the event. | ✓ | X | X | X |
| All audit events | N/A |
| N/A | This service will collect all audit events information available in the CloudTrail service, no matter the source defined in the event. | X | ✓ | X | X |
| All metrics | N/A | N/A |
| This service will collect all metric information from CloudWatch service. Metrics from all the available metric namespaces will be retrieved. | X | X | ✓ | X |
| CloudWatch Logs | N/A | N/A | N/A | This service will collect the different “Log Streams” that are part of a “Log Group” from the CloudWatch Logs service. Since it is common to have more than one “Log Group” defined, this will require creating one | X | X | X | ✓ |
| Non-CloudWatch Logs | N/A | N/A | N/A | This service will collect data from the following services VPC Flow Logs and CloudFront Logs. | X | X | X | ✓ |
Collector configuration details
Depending on the data type chosen for collecting, the following service definitions could be added to the configuration inside the services section. The following are common properties that all services have:
regions
(mandatory) - It must be a list with valid target region names to be used when collecting data. One processing thread will be created per region. See more info about the available regions here.request_period_in_seconds
(optional) - The period in seconds to be used between pulling executions (default value: 60)pull_retries
(optional) - Number of retries that will be executed when a pulling error occurs (default value: 3)tag
(optional) - Used for sending the data to a table different from the default one (in the configuration examples, they appear as commented lines).
Global predefined services
These service definitions can be used for collecting in a global way the different data types available in AWS.
All service events
service-events-all:
#tag: my.app.aws_service_events
regions:
- <region_a>
- <region_b>
- <region_c>
All audit events
audit-events-all:
#tag: my.app.aws_audit_events
regions:
- <region_a>
- <region_b>
- <region_c>
All metrics
metrics-all:
#tag: my.app.aws_metrics
regions:
- <region_a>
- <region_b>
- <region_c>
CloudWatch Logs
An entry per Log Stream that wanted to be processed must be defined. In this example, two different entries have been created (cwl_1
, cwl_2
) for processing the Log Streams called /aws/log_stream_a
and /aws/log_stream_b
Non-CloudWatch Logs
Run the collector
Once the data source is configured, you can send us the required information and we will host and manage the collector for you (Cloud collector), or you can host the collector in your own machine using a Docker image (On-premise collector).