Skip to content

Commit 2cdf105

Browse files
authored
Merge pull request #19 from mz-ko/master
Add asset metrics(CloudFront, EC2, ELB, S3)
2 parents 05cdad0 + 974f890 commit 2cdf105

22 files changed

+406
-14
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
metric_id: metric-aws-cloudfront-distribution-count
3+
name: Distribution Count
4+
metric_type: GAUGE
5+
resource_type: inventory.CloudService:aws.CloudFront.Distribution
6+
query_options:
7+
group_by:
8+
- key: account
9+
name: Account ID
10+
search_key: account
11+
- key: data.id
12+
name: ID
13+
search_key: data.id
14+
- key: data.viewer_certificate.minimum_protocol_version
15+
name: SSL version
16+
search_key: data.viewer_certificate.minimum_protocol_version
17+
- key: data.status
18+
name: Distribution Status
19+
search_key: data.status
20+
- key: data.state_display
21+
name: Status
22+
search_key: data.state_display
23+
fields:
24+
value:
25+
operator: count
26+
unit: Count
27+
namespace_id: ns-aws-cloudfront-distribution
28+
version: '1.0'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
namespace_id: ns-aws-cloudfront-distribution
3+
name: CloudFront/Distribution
4+
category: ASSET
5+
provider: aws
6+
icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/aws/Amazon-CloudFront.svg'
7+
version: '1.0'
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
metric_id: metric-aws-cloudfront-distribution-origin-count
3+
name: Origin Total Count
4+
metric_type: GAUGE
5+
resource_type: inventory.CloudService:aws.CloudFront.Distribution
6+
query_options:
7+
group_by:
8+
- key: account
9+
name: Account ID
10+
search_key: account
11+
- key: data.id
12+
name: ID
13+
search_key: data.id
14+
- key: data.viewer_certificate.minimum_protocol_version
15+
name: SSL version
16+
search_key: data.viewer_certificate.minimum_protocol_version
17+
- key: data.status
18+
name: Distribution Status
19+
search_key: data.status
20+
- key: data.state_display
21+
name: Status
22+
search_key: data.state_display
23+
fields:
24+
value:
25+
operator: sum
26+
key: data.origins.quantity
27+
unit: Count
28+
namespace_id: ns-aws-cloudfront-distribution
29+
version: '1.0'
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
metric_id: metric-aws-ec2-ami-count
3+
name: AMI Count
4+
metric_type: GAUGE
5+
resource_type: inventory.CloudService:aws.EC2.AMI
6+
query_options:
7+
group_by:
8+
- key: region_code
9+
name: Region
10+
search_key: region_code
11+
reference:
12+
resource_type: inventory.Region
13+
reference_key: region_code
14+
- key: account
15+
name: Account ID
16+
search_key: account
17+
fields:
18+
value:
19+
operator: count
20+
unit: count
21+
namespace_id: ns-aws-ec2-ami
22+
version: '1.0'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
namespace_id: ns-aws-ec2-ami
3+
name: EC2/AMI
4+
category: ASSET
5+
provider: aws
6+
icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/Amazon-AMI.svg'
7+
version: '1.0'
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
metric_id: metric-aws-ec2-launch_template-count
3+
name: AMI Count
4+
metric_type: GAUGE
5+
resource_type: inventory.CloudService:aws.EC2.LaunchTemplate
6+
query_options:
7+
group_by:
8+
- key: region_code
9+
name: Region
10+
search_key: region_code
11+
reference:
12+
resource_type: inventory.Region
13+
reference_key: region_code
14+
- key: data.AvailabilityZones
15+
name: Availability Zone
16+
search_key: data.AvailabilityZones
17+
- key: account
18+
name: Account ID
19+
search_key: account
20+
fields:
21+
value:
22+
operator: count
23+
unit: count
24+
namespace_id: ns-aws-ec2-auto-scaling-group
25+
version: '1.0'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
namespace_id: ns-aws-ec2-auto-scaling-group
3+
name: EC2/AutoScalingGroup
4+
category: ASSET
5+
provider: aws
6+
icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/Amazon-EC2-Auto-Scaling.svg'
7+
version: '1.0'
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
metric_id: metric-aws-ec2-launch-template-count
3+
name: LaunchTemplate Count
4+
metric_type: GAUGE
5+
resource_type: inventory.CloudService:aws.EC2.LaunchTemplate
6+
query_options:
7+
group_by:
8+
- key: region_code
9+
name: Region
10+
search_key: region_code
11+
reference:
12+
resource_type: inventory.Region
13+
reference_key: region_code
14+
- key: account
15+
name: Account ID
16+
search_key: account
17+
fields:
18+
value:
19+
operator: count
20+
unit: Count
21+
namespace_id: ns-aws-ec2-launch-template
22+
version: '1.0'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
namespace_id: ns-aws-ec2-launch-template
3+
name: EC2/LaunchTemplate
4+
category: ASSET
5+
provider: aws
6+
icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/Amazon-EC2-Auto-Scaling.svg'
7+
version: '1.0'

src/plugin/metrics/EC2/SecurityGroup/sg_count.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
metric_id: metric-aws-ec2-sg-count
3-
name: Volume Count
3+
name: Security Groups Count
44
metric_type: GAUGE
55
resource_type: inventory.CloudService:aws.EC2.SecurityGroup
66
query_options:

0 commit comments

Comments
 (0)