From b4b4daadbf354de18c1353d450ccded493ab7ca6 Mon Sep 17 00:00:00 2001 From: ikavanaghNR <34025886+ikavanaghNR@users.noreply.github.com> Date: Wed, 24 Feb 2021 15:12:43 +0100 Subject: [PATCH] Vsphere Cluster Entity Golden Metrics/Tags (#53) Add GM & Tags for several entity types --- definitions/infra-apacheserver/definition.yml | 5 +++- .../infra-apacheserver/golden_metrics.yml | 16 +++++++++++- .../infra-cassandranode/definition.yml | 7 +++++- .../infra-elasticsearchnode/definition.yml | 5 +++- definitions/infra-kafkabroker/definition.yml | 4 ++- .../infra-mssqlinstance/definition.yml | 4 ++- definitions/infra-mysqlnode/definition.yml | 7 +++++- .../infra-mysqlnode/golden_metrics.yml | 7 ++++++ definitions/infra-nginxserver/definition.yml | 6 ++++- .../infra-postgresqlinstance/definition.yml | 3 ++- .../infra-redisinstance/definition.yml | 6 ++++- .../infra-vspherecluster/definition.yml | 6 ++++- .../infra-vspherecluster/golden_metrics.yml | 25 ++++++++++--------- definitions/infra-vspherehost/definition.yml | 8 +++++- .../infra-vspherehost/golden_metrics.yml | 11 ++++++-- definitions/infra-vspherevm/definition.yml | 8 +++++- 16 files changed, 101 insertions(+), 27 deletions(-) diff --git a/definitions/infra-apacheserver/definition.yml b/definitions/infra-apacheserver/definition.yml index 53b7c79fc..70b2ad234 100644 --- a/definitions/infra-apacheserver/definition.yml +++ b/definitions/infra-apacheserver/definition.yml @@ -1,6 +1,9 @@ domain: INFRA type: APACHESERVER -goldenTags: [] +goldenTags: + - apache.hostname + - apache.port + - apache.version compositeMetrics: goldenMetrics: - golden_metrics.yml diff --git a/definitions/infra-apacheserver/golden_metrics.yml b/definitions/infra-apacheserver/golden_metrics.yml index 4dea79cc2..500297971 100644 --- a/definitions/infra-apacheserver/golden_metrics.yml +++ b/definitions/infra-apacheserver/golden_metrics.yml @@ -3,12 +3,26 @@ requestsPerSecond: query: select: average(net.requestsPerSecond) from: ApacheSample - facet: entityName eventId: entityGuid + facet: entityName totalBytesSentPerSecond: title: Total Bytes Sent per second query: select: average(net.bytesPerSecond) from: ApacheSample + eventId: entityGuid + facet: entityName +busyWorkers: + title: Current number of Busy Workers + query: + select: average(server.busyWorkers) + from: ApacheSample + eventId: entityGuid facet: entityName +idleWorkers: + title: Current number of Idle Workers + query: + select: average(server.idleWorkers) + from: ApacheSample eventId: entityGuid + facet: entityName diff --git a/definitions/infra-cassandranode/definition.yml b/definitions/infra-cassandranode/definition.yml index f05b6ddf7..c331b9991 100644 --- a/definitions/infra-cassandranode/definition.yml +++ b/definitions/infra-cassandranode/definition.yml @@ -1,6 +1,11 @@ domain: INFRA type: CASSANDRANODE -goldenTags: [] +goldenTags: + - cassandra.hostname + - cassandra.port + - cassandra.version + - cassandra.clusterDatacenter + - cassandra.clusterName compositeMetrics: goldenMetrics: - golden_metrics.yml diff --git a/definitions/infra-elasticsearchnode/definition.yml b/definitions/infra-elasticsearchnode/definition.yml index b7dee5c53..c536ce12b 100644 --- a/definitions/infra-elasticsearchnode/definition.yml +++ b/definitions/infra-elasticsearchnode/definition.yml @@ -1,6 +1,9 @@ domain: INFRA type: ELASTICSEARCHNODE -goldenTags: [] +goldenTags: + - elasticsearch.clusterName + - elasticsearch.nodeHostname + - elasticsearch.nodeIpAddress compositeMetrics: goldenMetrics: - golden_metrics.yml diff --git a/definitions/infra-kafkabroker/definition.yml b/definitions/infra-kafkabroker/definition.yml index fd373bccd..cc5c263d4 100644 --- a/definitions/infra-kafkabroker/definition.yml +++ b/definitions/infra-kafkabroker/definition.yml @@ -1,6 +1,8 @@ domain: INFRA type: KAFKABROKER -goldenTags: [] +goldenTags: + - kafka.clusterName + - kafka.brokerId compositeMetrics: goldenMetrics: - golden_metrics.yml diff --git a/definitions/infra-mssqlinstance/definition.yml b/definitions/infra-mssqlinstance/definition.yml index e3228c81d..4947666fc 100644 --- a/definitions/infra-mssqlinstance/definition.yml +++ b/definitions/infra-mssqlinstance/definition.yml @@ -1,6 +1,8 @@ domain: INFRA type: MSSQLINSTANCE -goldenTags: [] +goldenTags: + - mssql.host + - mssql.instance compositeMetrics: goldenMetrics: - golden_metrics.yml diff --git a/definitions/infra-mysqlnode/definition.yml b/definitions/infra-mysqlnode/definition.yml index 19f448a2d..0fa0485ec 100644 --- a/definitions/infra-mysqlnode/definition.yml +++ b/definitions/infra-mysqlnode/definition.yml @@ -1,6 +1,11 @@ domain: INFRA type: MYSQLNODE -goldenTags: [] +goldenTags: + - mysql.port + - mysql.version + - mysql.edition + - mysql.hostname + - mysql.clusterNodeType compositeMetrics: goldenMetrics: - golden_metrics.yml diff --git a/definitions/infra-mysqlnode/golden_metrics.yml b/definitions/infra-mysqlnode/golden_metrics.yml index 7f39889b5..5b3fdef27 100644 --- a/definitions/infra-mysqlnode/golden_metrics.yml +++ b/definitions/infra-mysqlnode/golden_metrics.yml @@ -12,3 +12,10 @@ slowQueriesPerMinute: from: MysqlSample facet: entityName eventId: entityGuid +connectionsPerSecond: + title: Connections per Second + query: + select: average(net.connectionsPerSecond) + from: MysqlSample + facet: entityName + eventId: entityGuid diff --git a/definitions/infra-nginxserver/definition.yml b/definitions/infra-nginxserver/definition.yml index 04d78b1eb..b875d3654 100644 --- a/definitions/infra-nginxserver/definition.yml +++ b/definitions/infra-nginxserver/definition.yml @@ -1,6 +1,10 @@ domain: INFRA type: NGINXSERVER -goldenTags: [] +goldenTags: + - nginx.port + - nginx.version + - nginx.edition + - nginx.hostname compositeMetrics: goldenMetrics: - golden_metrics.yml diff --git a/definitions/infra-postgresqlinstance/definition.yml b/definitions/infra-postgresqlinstance/definition.yml index 2cff57d2b..94383d6e8 100644 --- a/definitions/infra-postgresqlinstance/definition.yml +++ b/definitions/infra-postgresqlinstance/definition.yml @@ -1,6 +1,7 @@ domain: INFRA type: POSTGRESQLINSTANCE -goldenTags: [] +goldenTags: + - postgres.host compositeMetrics: goldenMetrics: - golden_metrics.yml diff --git a/definitions/infra-redisinstance/definition.yml b/definitions/infra-redisinstance/definition.yml index e71d9ac9f..4d4a4ccb3 100644 --- a/definitions/infra-redisinstance/definition.yml +++ b/definitions/infra-redisinstance/definition.yml @@ -1,6 +1,10 @@ domain: INFRA type: REDISINSTANCE -goldenTags: [] +goldenTags: + - redis.port + - redis.hostname + - redis.version + - redis.clusterRole compositeMetrics: goldenMetrics: - golden_metrics.yml diff --git a/definitions/infra-vspherecluster/definition.yml b/definitions/infra-vspherecluster/definition.yml index 479e0118b..d9fa0fd6e 100644 --- a/definitions/infra-vspherecluster/definition.yml +++ b/definitions/infra-vspherecluster/definition.yml @@ -1,6 +1,10 @@ domain: INFRA type: VSPHERECLUSTER -goldenTags: [] +goldenTags: + - vsphere.clusterDatacenterLocation + - vsphere.clusterDatacenterName + - vsphere.clusterHostList + - vsphere.clusterDatastoreList compositeMetrics: goldenMetrics: - golden_metrics.yml diff --git a/definitions/infra-vspherecluster/golden_metrics.yml b/definitions/infra-vspherecluster/golden_metrics.yml index d2f2cbe09..aa728ae11 100644 --- a/definitions/infra-vspherecluster/golden_metrics.yml +++ b/definitions/infra-vspherecluster/golden_metrics.yml @@ -1,21 +1,22 @@ -effectiveCpuAvailableToVmsMhz: - title: Effective CPU available to VMs (MHz) + +hostsCount: + title: Total Hosts in the Cluster query: - select: average(cpu.totalEffectiveMHz) + eventId: entityGuid + select: latest(`hosts`) from: VSphereClusterSample facet: entityName - eventId: entityGuid -effectiveMemoryAvailableToVmsMb: - title: Effective memory available to VMs (MB) +totalEffectiveMHz: + title: Total Effective CPU resources in MHz query: - select: average(mem.effectiveSize) + eventId: entityGuid + select: latest(`cpu.totalEffectiveMHz`) from: VSphereClusterSample facet: entityName - eventId: entityGuid -numberOfEffectiveHosts: - title: Number of effective hosts +totalMHz: + title: Aggregated CPU resources of all hosts in MHz query: - select: average(effectiveHosts) + eventId: entityGuid + select: latest(`cpu.totalMHz`) from: VSphereClusterSample facet: entityName - eventId: entityGuid diff --git a/definitions/infra-vspherehost/definition.yml b/definitions/infra-vspherehost/definition.yml index 7b440a5e9..f086c6661 100644 --- a/definitions/infra-vspherehost/definition.yml +++ b/definitions/infra-vspherehost/definition.yml @@ -1,6 +1,12 @@ domain: INFRA type: VSPHEREHOST -goldenTags: [] +goldenTags: + - vsphere.hostClusterName + - vsphere.hostOverallStatus + - vsphere.hostDatacenterName + - vsphere.hostResourcePoolNameList + - vsphere.hostDatastoreNameList + - vsphere.hostHypervisorHostname compositeMetrics: goldenMetrics: - golden_metrics.yml diff --git a/definitions/infra-vspherehost/golden_metrics.yml b/definitions/infra-vspherehost/golden_metrics.yml index 09e8ac522..de8e7ecb7 100644 --- a/definitions/infra-vspherehost/golden_metrics.yml +++ b/definitions/infra-vspherehost/golden_metrics.yml @@ -3,19 +3,26 @@ cpuUsage: query: select: average(cpu.percent) from: VSphereHostSample - facet: entityName eventId: entityGuid + facet: entityName memoryUsage: title: Memory usage (%) query: select: average(mem.free)*100/average(mem.size) from: VSphereHostSample - facet: entityName eventId: entityGuid + facet: entityName diskUsageMib: title: Disk usage (MiB) query: select: average(disk.totalMiB) from: VSphereHostSample + eventId: entityGuid facet: entityName +connectionState: + title: Connection State of the Host + query: eventId: entityGuid + select: latest(`connectionState`) + from: VSphereHostSample + facet: entityName diff --git a/definitions/infra-vspherevm/definition.yml b/definitions/infra-vspherevm/definition.yml index 0be6d1c74..a22d2ab06 100644 --- a/definitions/infra-vspherevm/definition.yml +++ b/definitions/infra-vspherevm/definition.yml @@ -1,6 +1,12 @@ domain: INFRA type: VSPHEREVM -goldenTags: [] +goldenTags: + - vsphere.vmClusterName + - vsphere.vmDatacenterName + - vsphere.vmHypervisorHostname + - vsphere.vmResourcePoolName + - vsphere.vmDatastoreNameList + - vsphere.vmVmHostname compositeMetrics: goldenMetrics: - golden_metrics.yml