From ae3e116500afbfd7104394a92f6865acbee5dd8b Mon Sep 17 00:00:00 2001 From: seolmin Date: Thu, 9 May 2024 18:09:14 +0900 Subject: [PATCH] feat: apply collect metrics method when collecting cloud resources --- .../inventory/metrics/BigQuery/SQLWorkspace/namespace.yaml | 7 +++++++ .../metrics/CloudFunctions/Function/namespace.yaml | 7 +++++++ .../inventory/metrics/CloudSQL/Instance/namespace.yaml | 7 +++++++ .../inventory/metrics/CloudStorage/Bucket/namespace.yaml | 7 +++++++ .../metrics/ComputeEngine/Instance/instance_count.yaml | 4 ++-- .../metrics/ComputeEngine/Instance/memory_size.yaml | 4 ++-- .../metrics/ComputeEngine/Instance/namespace.yaml | 2 +- .../metrics/ComputeEngine/Instance/vcpu_count.yaml | 4 ++-- .../metrics/Networking/ExternalIPAddress/namespace.yaml | 7 +++++++ .../inventory/metrics/Networking/Firewall/namespace.yaml | 7 +++++++ .../metrics/Networking/LoadBalancing/namespace.yaml | 7 +++++++ .../inventory/metrics/Networking/Route/namespace.yaml | 7 +++++++ .../inventory/metrics/Networking/VPCNetwork/namespace.yaml | 7 +++++++ .../inventory/metrics/PubSub/Schema/namespace.yaml | 7 +++++++ .../inventory/metrics/PubSub/Snapshot/namespace.yaml | 7 +++++++ .../inventory/metrics/PubSub/Subscription/namespace.yaml | 7 +++++++ src/spaceone/inventory/metrics/PubSub/Topic/namespace.yaml | 7 +++++++ 17 files changed, 98 insertions(+), 7 deletions(-) create mode 100644 src/spaceone/inventory/metrics/BigQuery/SQLWorkspace/namespace.yaml create mode 100644 src/spaceone/inventory/metrics/CloudFunctions/Function/namespace.yaml create mode 100644 src/spaceone/inventory/metrics/CloudSQL/Instance/namespace.yaml create mode 100644 src/spaceone/inventory/metrics/CloudStorage/Bucket/namespace.yaml create mode 100644 src/spaceone/inventory/metrics/Networking/ExternalIPAddress/namespace.yaml create mode 100644 src/spaceone/inventory/metrics/Networking/Firewall/namespace.yaml create mode 100644 src/spaceone/inventory/metrics/Networking/LoadBalancing/namespace.yaml create mode 100644 src/spaceone/inventory/metrics/Networking/Route/namespace.yaml create mode 100644 src/spaceone/inventory/metrics/Networking/VPCNetwork/namespace.yaml create mode 100644 src/spaceone/inventory/metrics/PubSub/Schema/namespace.yaml create mode 100644 src/spaceone/inventory/metrics/PubSub/Snapshot/namespace.yaml create mode 100644 src/spaceone/inventory/metrics/PubSub/Subscription/namespace.yaml create mode 100644 src/spaceone/inventory/metrics/PubSub/Topic/namespace.yaml diff --git a/src/spaceone/inventory/metrics/BigQuery/SQLWorkspace/namespace.yaml b/src/spaceone/inventory/metrics/BigQuery/SQLWorkspace/namespace.yaml new file mode 100644 index 0000000..8696bb3 --- /dev/null +++ b/src/spaceone/inventory/metrics/BigQuery/SQLWorkspace/namespace.yaml @@ -0,0 +1,7 @@ +--- +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' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/CloudFunctions/Function/namespace.yaml b/src/spaceone/inventory/metrics/CloudFunctions/Function/namespace.yaml new file mode 100644 index 0000000..27cda46 --- /dev/null +++ b/src/spaceone/inventory/metrics/CloudFunctions/Function/namespace.yaml @@ -0,0 +1,7 @@ +--- +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' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/CloudSQL/Instance/namespace.yaml b/src/spaceone/inventory/metrics/CloudSQL/Instance/namespace.yaml new file mode 100644 index 0000000..a02efa8 --- /dev/null +++ b/src/spaceone/inventory/metrics/CloudSQL/Instance/namespace.yaml @@ -0,0 +1,7 @@ +--- +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' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/CloudStorage/Bucket/namespace.yaml b/src/spaceone/inventory/metrics/CloudStorage/Bucket/namespace.yaml new file mode 100644 index 0000000..0e7972e --- /dev/null +++ b/src/spaceone/inventory/metrics/CloudStorage/Bucket/namespace.yaml @@ -0,0 +1,7 @@ +--- +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' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/ComputeEngine/Instance/instance_count.yaml b/src/spaceone/inventory/metrics/ComputeEngine/Instance/instance_count.yaml index e40804f..bc5a5b8 100644 --- a/src/spaceone/inventory/metrics/ComputeEngine/Instance/instance_count.yaml +++ b/src/spaceone/inventory/metrics/ComputeEngine/Instance/instance_count.yaml @@ -1,5 +1,5 @@ --- -metric_id: metric-google-cloud-compute-engine-instance-count +metric_id: metric-google-cloud-computeengine-instance-count name: Instance Count metric_type: GAUGE resource_type: inventory.CloudService:google_cloud.ComputeEngine.Instance @@ -31,5 +31,5 @@ query_options: value: operator: count unit: Count -namespace_id: ns-google-cloud-compute-engine-instance +namespace_id: ns-google-cloud-computeengine-instance version: '1.0' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/ComputeEngine/Instance/memory_size.yaml b/src/spaceone/inventory/metrics/ComputeEngine/Instance/memory_size.yaml index 64ebb85..858b9f0 100644 --- a/src/spaceone/inventory/metrics/ComputeEngine/Instance/memory_size.yaml +++ b/src/spaceone/inventory/metrics/ComputeEngine/Instance/memory_size.yaml @@ -1,5 +1,5 @@ --- -metric_id: metric-google-cloud-compute-engine-instance-memory-size +metric_id: metric-google-cloud-computeengine-instance-memory-size name: Memory Size metric_type: GAUGE resource_type: inventory.CloudService:google_cloud.ComputeEngine.Instance @@ -28,5 +28,5 @@ query_options: key: data.hardware.memory operator: sum unit: GB -namespace_id: ns-google-cloud-compute-engine-instance +namespace_id: ns-google-cloud-computeengine-instance version: '1.0' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/ComputeEngine/Instance/namespace.yaml b/src/spaceone/inventory/metrics/ComputeEngine/Instance/namespace.yaml index a155f8c..1367573 100644 --- a/src/spaceone/inventory/metrics/ComputeEngine/Instance/namespace.yaml +++ b/src/spaceone/inventory/metrics/ComputeEngine/Instance/namespace.yaml @@ -1,5 +1,5 @@ --- -namespace_id: ns-google-cloud-compute-engine-instance +namespace_id: ns-google-cloud-computeengine-instance name: ComputeEngine/Instance category: ASSET provider: google_cloud diff --git a/src/spaceone/inventory/metrics/ComputeEngine/Instance/vcpu_count.yaml b/src/spaceone/inventory/metrics/ComputeEngine/Instance/vcpu_count.yaml index b460d1e..a23bbcb 100644 --- a/src/spaceone/inventory/metrics/ComputeEngine/Instance/vcpu_count.yaml +++ b/src/spaceone/inventory/metrics/ComputeEngine/Instance/vcpu_count.yaml @@ -1,5 +1,5 @@ --- -metric_id: metric-google-cloud-compute-engine-instance-vcpu-count +metric_id: metric-google-cloud-computeengine-instance-vcpu-count name: vCPU Count metric_type: GAUGE resource_type: inventory.CloudService:google_cloud.ComputeEngine.Instance @@ -28,5 +28,5 @@ query_options: key: data.hardware.core operator: sum unit: Core -namespace_id: ns-google-cloud-compute-engine-instance +namespace_id: ns-google-cloud-computeengine-instance version: '1.0' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/Networking/ExternalIPAddress/namespace.yaml b/src/spaceone/inventory/metrics/Networking/ExternalIPAddress/namespace.yaml new file mode 100644 index 0000000..dbf2505 --- /dev/null +++ b/src/spaceone/inventory/metrics/Networking/ExternalIPAddress/namespace.yaml @@ -0,0 +1,7 @@ +--- +namespace_id: ns-google-cloud-networking-externalipaddress +name: Networking/ExternalIPAddress +category: ASSET +provider: google_cloud +icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/External_IP_Address.svg' +version: '1.0' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/Networking/Firewall/namespace.yaml b/src/spaceone/inventory/metrics/Networking/Firewall/namespace.yaml new file mode 100644 index 0000000..18ab188 --- /dev/null +++ b/src/spaceone/inventory/metrics/Networking/Firewall/namespace.yaml @@ -0,0 +1,7 @@ +--- +namespace_id: ns-google-cloud-networking-firewall +name: Networking/Firewall +category: ASSET +provider: google_cloud +icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/Firewall_Rule.svg' +version: '1.0' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/Networking/LoadBalancing/namespace.yaml b/src/spaceone/inventory/metrics/Networking/LoadBalancing/namespace.yaml new file mode 100644 index 0000000..124423b --- /dev/null +++ b/src/spaceone/inventory/metrics/Networking/LoadBalancing/namespace.yaml @@ -0,0 +1,7 @@ +--- +namespace_id: ns-google-cloud-networking-loadbalancing +name: Networking/LoadBalancing +category: ASSET +provider: google_cloud +icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/Load_Balancing.svg' +version: '1.0' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/Networking/Route/namespace.yaml b/src/spaceone/inventory/metrics/Networking/Route/namespace.yaml new file mode 100644 index 0000000..cfcc551 --- /dev/null +++ b/src/spaceone/inventory/metrics/Networking/Route/namespace.yaml @@ -0,0 +1,7 @@ +--- +namespace_id: ns-google-cloud-networking-route +name: Networking/Route +category: ASSET +provider: google_cloud +icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/Route.svg' +version: '1.0' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/Networking/VPCNetwork/namespace.yaml b/src/spaceone/inventory/metrics/Networking/VPCNetwork/namespace.yaml new file mode 100644 index 0000000..8dd52dd --- /dev/null +++ b/src/spaceone/inventory/metrics/Networking/VPCNetwork/namespace.yaml @@ -0,0 +1,7 @@ +--- +namespace_id: ns-google-cloud-networking-vpcnetwork +name: Networking/VPCNetwork +category: ASSET +provider: google_cloud +icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/VPC.svg' +version: '1.0' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/PubSub/Schema/namespace.yaml b/src/spaceone/inventory/metrics/PubSub/Schema/namespace.yaml new file mode 100644 index 0000000..6e99c5a --- /dev/null +++ b/src/spaceone/inventory/metrics/PubSub/Schema/namespace.yaml @@ -0,0 +1,7 @@ +--- +namespace_id: ns-google-cloud-pubsub-schema +name: PubSub/Schema +category: ASSET +provider: google_cloud +icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/cloud_pubsub.svg' +version: '1.0' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/PubSub/Snapshot/namespace.yaml b/src/spaceone/inventory/metrics/PubSub/Snapshot/namespace.yaml new file mode 100644 index 0000000..3798859 --- /dev/null +++ b/src/spaceone/inventory/metrics/PubSub/Snapshot/namespace.yaml @@ -0,0 +1,7 @@ +--- +namespace_id: ns-google-cloud-pubsub-snapshot +name: PubSub/Snapshot +category: ASSET +provider: google_cloud +icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/cloud_pubsub.svg' +version: '1.0' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/PubSub/Subscription/namespace.yaml b/src/spaceone/inventory/metrics/PubSub/Subscription/namespace.yaml new file mode 100644 index 0000000..eaae238 --- /dev/null +++ b/src/spaceone/inventory/metrics/PubSub/Subscription/namespace.yaml @@ -0,0 +1,7 @@ +--- +namespace_id: ns-google-cloud-pubsub-subscription +name: PubSub/Subscription +category: ASSET +provider: google_cloud +icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/cloud_pubsub.svg' +version: '1.0' \ No newline at end of file diff --git a/src/spaceone/inventory/metrics/PubSub/Topic/namespace.yaml b/src/spaceone/inventory/metrics/PubSub/Topic/namespace.yaml new file mode 100644 index 0000000..d325a75 --- /dev/null +++ b/src/spaceone/inventory/metrics/PubSub/Topic/namespace.yaml @@ -0,0 +1,7 @@ +--- +namespace_id: ns-google-cloud-pubsub-topic +name: PubSub/Topic +category: ASSET +provider: google_cloud +icon: 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/cloud_pubsub.svg' +version: '1.0' \ No newline at end of file