Collector 'AWS-KinesisAnalytics' Configuration Manual¶
Before reading this document, please read:
Tip
Before using this collector, you must install the 'Integration Core Package' and its accompanying third-party dependencies.
1. Configuration Structure¶
The configuration structure of this collector is as follows:
Field | Type | Required | Description |
---|---|---|---|
regions |
list | Required | List of regions to be collected |
regions[#] |
str | Required | Region ID. For example: 'cn-north-1' See appendix for the complete list |
2. Configuration Example¶
Collect instance data from the Beijing region
Configuration Filter (Optional)¶
This collector script supports custom filters, allowing users to filter target resources based on object attributes. The filter function returns True or False.
-
True: The target resource should be collected.
-
False: The target resource should not be collected.
# Example: Enable the filter to filter based on the ApplicationName attribute of the object. The configuration format is as follows:
def filter_instance(instance):
application_name = instance['tags'].get('ApplicationName')
if application_name in ['xxx'] :
return True
return False
@DFF.API('AWS-KinesisAnalytics Collection', timeout=3600, fixed_crontab='* * * * *')
def run():
Runner(main.DataCollector(account, collector_configs, filters=[filter_instance])).run()
3. Data Reporting Format¶
After data is successfully synchronized, you can view the data in the 'Infrastructure - Resource Catalog' of TrueWatch.
An example of the reported data is as follows:
{
"measurement": "aws_kinesis_analytics",
"tags": {
"ApplicationARN": "arn:aws-cn:xxxx:xxxx",
"ApplicationMode": "STREAMING",
"ApplicationName": "zsh_test",
"ApplicationStatus": "RUNNING",
"ApplicationVersionId": "3",
"RegionId": "cn-northwest-1",
"RuntimeEnvironment": "FLINK-1_15",
"name": "zsh_test"
},
"fields": {
"message" : "{Instance JSON Data}"
}
}
Note
The fields in tags and fields may change with subsequent updates.
4. IAM Policy Permissions¶
Note
If users use the method of bringing IAM roles to collect resources, certain operation permissions need to be enabled.
This collector requires the following permissions:
kinesisanalytics:ListApplications
X. Appendix¶
Please refer to the official AWS documentation: