Skip to content

Commit

Permalink
Merge pull request #130 from kangwork/master
Browse files Browse the repository at this point in the history
Add metrics back
  • Loading branch information
stat-kwon authored Jul 22, 2024
2 parents affdc8c + 473e39b commit 3315b83
Show file tree
Hide file tree
Showing 54 changed files with 189 additions and 178 deletions.
3 changes: 2 additions & 1 deletion pkg/pip_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ schematics
MarkupSafe>=2.0.0rc2
google-cloud-storage
requests
beautifulsoup4
beautifulsoup4
grpcio
2 changes: 1 addition & 1 deletion src/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.26
1.4.27
1 change: 1 addition & 0 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
license="Apache License 2.0",
packages=find_packages(),
install_requires=[
"grpcio",
"spaceone-api",
"schematics",
"google-api-python-client",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
namespace_id: ns-gcp-bigquery-sqlworkspace
namespace_id: ns-google-cloud-bigquery-sqlworkspace
name: BigQuery/SQLWorkspace
category: ASSET
provider: google_cloud
icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/Big_Query.svg'
version: '1.0'
version: '1.1'
resource_type: inventory.CloudService:google_cloud.BigQuery.SQLWorkspace
group: google_cloud
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-bigquery-workspace-count
metric_id: metric-google-cloud-bigquery-workspace-count
name: SQLWorkspace Count
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.BigQuery.SQLWorkspace
Expand All @@ -21,5 +21,5 @@ query_options:
value:
operator: count
unit: Count
namespace_id: ns-gcp-bigquery-sqlworkspace
version: '1.0'
namespace_id: ns-google-cloud-bigquery-sqlworkspace
version: '1.1'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-cf-function-count
metric_id: metric-google-cloud-cf-function-count
name: Function Count
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.CloudFunctions.Function
Expand All @@ -14,25 +14,25 @@ query_options:
reference:
resource_type: inventory.Region
reference_key: region_code
- key: data.state
name: Function State
search_key: data.state
- key: data.status
name: Function Status
search_key: data.status
default: true
- key: data.display.environment
name: Environment
search_key: data.display.environment
- key: data.display.trigger
name: Trigger
search_key: data.display.trigger
- key: data.service_config.ingress_settings
- key: data.ingress_settings
name: Ingress Settings
search_key: data.service_config.ingress_settings
- key: data.build_config.runtime
search_key: data.ingress_settings
- key: data.runtime
name: Runtime
search_key: data.build_config.runtime
search_key: data.runtime
fields:
value:
operator: count
unit: Count
namespace_id: ns-gcp-cloudfunctions-function
version: '1.0'
namespace_id: ns-google-cloud-cloudfunctions-function
version: '1.1'
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
namespace_id: ns-gcp-cloudfunctions-function
namespace_id: ns-google-cloud-cloudfunctions-function
name: CloudFunctions/Function
category: ASSET
provider: google_cloud
icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/cloud_functions.svg'
version: '1.0'
version: '1.1'
resource_type: inventory.CloudService:google_cloud.CloudFunctions.Function
group: google_cloud
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-sql-database-count
metric_id: metric-google-cloud-sql-database-count
name: Database Count
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.CloudSQL.Instance
Expand Down Expand Up @@ -32,5 +32,5 @@ query_options:
key: data.stats.database_count
operator: sum
unit: Count
namespace_id: ns-gcp-cloudsql-instance
version: '1.0'
namespace_id: ns-google-cloud-cloudsql-instance
version: '1.1'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-sql-instance-count
metric_id: metric-google-cloud-sql-instance-count
name: Instance Count
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.CloudSQL.Instance
Expand Down Expand Up @@ -31,5 +31,5 @@ query_options:
value:
operator: count
unit: Count
namespace_id: ns-gcp-cloudsql-instance
version: '1.0'
namespace_id: ns-google-cloud-cloudsql-instance
version: '1.1'
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
namespace_id: ns-gcp-cloudsql-instance
namespace_id: ns-google-cloud-cloudsql-instance
name: CloudSQL/Instance
category: ASSET
provider: google_cloud
icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/Cloud_SQL.svg'
version: '1.0'
version: '1.1'
resource_type: inventory.CloudService:google_cloud.CloudSQL.Instance
group: google_cloud
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-sql-user-count
metric_id: metric-google-cloud-sql-user-count
name: User Count
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.CloudSQL.Instance
Expand Down Expand Up @@ -32,5 +32,5 @@ query_options:
key: data.stats.user_count
operator: sum
unit: Count
namespace_id: ns-gcp-cloudsql-instance
version: '1.0'
namespace_id: ns-google-cloud-cloudsql-instance
version: '1.1'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-cs-bucket-count
metric_id: metric-google-cloud-cs-bucket-count
name: Bucket Count
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.CloudStorage.Bucket
Expand All @@ -24,5 +24,5 @@ query_options:
value:
operator: count
unit: Count
namespace_id: ns-gcp-cloudstorage-bucket
version: '1.0'
namespace_id: ns-google-cloud-cloudstorage-bucket
version: '1.1'
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
namespace_id: ns-gcp-cloudstorage-bucket
namespace_id: ns-google-cloud-cloudstorage-bucket
name: CloudStorage/Bucket
category: ASSET
provider: google_cloud
icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/Cloud_Storage.svg'
version: '1.0'
version: '1.1'
resource_type: inventory.CloudService:google_cloud.CloudStorage.Bucket
group: google_cloud
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-ce-disk-count
metric_id: metric-google-cloud-ce-disk-count
name: Disk Count
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.ComputeEngine.Disk
Expand All @@ -14,9 +14,9 @@ query_options:
- key: account
name: Project ID
search_key: account
- key: data.state
- key: state
name: State
search_key: data.state
search_key: state
- key: data.encryption
name: Encryption
search_key: data.encryption
Expand All @@ -27,5 +27,5 @@ query_options:
value:
operator: count
unit: Count
namespace_id: ns-gcp-ce-disk
version: '1.0'
namespace_id: ns-google-cloud-ce-disk
version: '1.1'
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
namespace_id: ns-gcp-ce-disk
namespace_id: ns-google-cloud-ce-disk
name: ComputeEngine/Disk
category: ASSET
provider: google_cloud
icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/Compute_Engine.svg'
version: '1.0'
version: '1.1'
resource_type: inventory.CloudService:google_cloud.ComputeEngine.Disk
group: google_cloud
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-ce-disk-ri-count
metric_id: metric-google-cloud-ce-disk-ri-count
name: Read IOPS Count
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.ComputeEngine.Disk
Expand All @@ -14,9 +14,9 @@ query_options:
- key: account
name: Project ID
search_key: account
- key: data.state
- key: state
name: State
search_key: data.state
search_key: state
- key: data.encryption
name: Encryption
search_key: data.encryption
Expand All @@ -28,5 +28,5 @@ query_options:
key: data.read_iops
operator: sum
unit: Count
namespace_id: ns-gcp-ce-disk
version: '1.0'
namespace_id: ns-google-cloud-ce-disk
version: '1.1'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-ce-disk-wi-count
metric_id: metric-google-cloud-ce-disk-wi-count
name: Write IOPS Count
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.ComputeEngine.Disk
Expand All @@ -14,9 +14,9 @@ query_options:
- key: account
name: Project ID
search_key: account
- key: data.state
- key: state
name: State
search_key: data.state
search_key: state
- key: data.encryption
name: Encryption
search_key: data.encryption
Expand All @@ -28,5 +28,5 @@ query_options:
key: data.write_iops
operator: sum
unit: Count
namespace_id: ns-gcp-ce-disk
version: '1.0'
namespace_id: ns-google-cloud-ce-disk
version: '1.1'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-ce-instance-disk-size
metric_id: metric-google-cloud-ce-instance-disk-size
name: Disk Size
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.ComputeEngine.Instance
Expand All @@ -23,12 +23,10 @@ query_options:
- key: data.os.os_type
name: OS Type
search_key: data.os.os_type
unwind:
- path: data.disks
fields:
value:
key: data.disks.size
operator: sum
unit: BYTES
namespace_id: ns-gcp-ce-instance
version: '1.0'
namespace_id: ns-google-cloud-ce-instance
version: '1.1'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-ce-instance-count
metric_id: metric-google-cloud-ce-instance-count
name: Instance Count
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.ComputeEngine.Instance
Expand Down Expand Up @@ -31,5 +31,5 @@ query_options:
value:
operator: count
unit: Count
namespace_id: ns-gcp-ce-instance
version: '1.0'
namespace_id: ns-google-cloud-ce-instance
version: '1.1'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-ce-instance-memory-size
metric_id: metric-google-cloud-ce-instance-memory-size
name: Memory Size
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.ComputeEngine.Instance
Expand Down Expand Up @@ -28,5 +28,5 @@ query_options:
key: data.hardware.memory
operator: sum
unit: GB
namespace_id: ns-gcp-ce-instance
version: '1.0'
namespace_id: ns-google-cloud-ce-instance
version: '1.1'
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
namespace_id: ns-gcp-ce-instance
namespace_id: ns-google-cloud-ce-instance
name: ComputeEngine/Instance
category: ASSET
provider: google_cloud
icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/Compute_Engine.svg'
version: '1.0'
version: '1.1'
resource_type: inventory.CloudService:google_cloud.ComputeEngine.Instance
group: google_cloud
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
metric_id: metric-gcp-ce-instance-vcpu-count
metric_id: metric-google-cloud-ce-instance-vcpu-count
name: vCPU Count
metric_type: GAUGE
resource_type: inventory.CloudService:google_cloud.ComputeEngine.Instance
Expand Down Expand Up @@ -28,5 +28,5 @@ query_options:
key: data.hardware.core
operator: sum
unit: Core
namespace_id: ns-gcp-ce-instance
version: '1.0'
namespace_id: ns-google-cloud-ce-instance
version: '1.1'
Loading

0 comments on commit 3315b83

Please sign in to comment.