Skip to content

Commit

Permalink
fix: modify yaml file for metric
Browse files Browse the repository at this point in the history
Signed-off-by: jcj <[email protected]>
  • Loading branch information
ggildong committed Sep 6, 2024
1 parent f3bba13 commit d6c5821
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 33 deletions.
17 changes: 8 additions & 9 deletions src/plugin/metadata/prowler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ tabs.1:
key: data.findings.status
desc: false
type: query-search-table
root_path: data.findings
unwind: data.findings
fields:
- Requirement ID: data.requirement_id
- Check Title: data.findings.check_title
- Status: data.findings.status
- Check Title: check_title
- Status: status
type: enum
enums:
- FAIL: coral.500
Expand All @@ -143,19 +144,17 @@ tabs.1:
- MANUAL: peacock.500
label: MANUAL
type: badge
- Resource Type: data.findings.resource_type
- Resource: data.findings.resource
- Resource Type: resource_type
- Resource: resource
reference:
reference_key: reference.resource_id
resource_type: inventory.CloudService
- Region: data.findings.region_code
- Region: region_code
reference:
reference_key: region_code
resource_type: inventory.Region
- Status Extended: data.findings.status_extended
- Status Extended: status_extended
search:
- key: data.requirement_id
name: Requirement ID
- key: data.findings.check_title
name: Check Title
- key: data.findings.status
Expand Down
9 changes: 7 additions & 2 deletions src/plugin/metrics/Prowler/Compliance/compliance_count.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
---
metric_id: metric-prowler-compliance
metric_id: metric-prowler-compliance-count
name: Compliance Count
metric_type: GAUGE
resource_type: inventory.CloudService:aws.Prowler.CIS-2.0
resource_type: inventory.CloudService
query_options:
fields:
value:
operator: count
group_by:
- key: cloud_service_type
name: Compliance Framework
- key: data.status
name: Status
- key: data.severity
name: Severity
- key: data.service
name: Service
filter:
- key: cloud_service_group
value: Prowler
unit: Count
namespace_id: ns-prowler-compliance
version: '1.0'
20 changes: 0 additions & 20 deletions src/plugin/metrics/Prowler/Compliance/fail_check_count.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions src/plugin/metrics/Prowler/Compliance/findings_count.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
metric_id: metric-prowler-findings-count
name: Findings Count
metric_type: GAUGE
resource_type: inventory.CloudService
query_options:
unwind:
path: data.findings
fields:
value:
operator: count
group_by:
- key: cloud_service_type
name: Compliance Framework
- key: data.findings.status
name: Status
- key: data.findings.region_code
name: Region
- key: data.findings.resource_type
name: Resource Type
filter:
- key: cloud_service_group
value: Prowler
unit: Count
namespace_id: ns-prowler-compliance
version: '1.0'
4 changes: 2 additions & 2 deletions src/plugin/metrics/Prowler/Compliance/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace_id: ns-prowler-compliance
name: Prowler/Compliance
category: ASSET
resource_type: inventory.CloudService:aws.Prowler.CIS-2.0
group: Prowler
resource_type: inventory.CloudService
group: prowler
icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/prowler.svg'
version: '1.0'

0 comments on commit d6c5821

Please sign in to comment.