diff --git a/src/it/metricshub-connectors/src/main/connector/hardware/WinStorageSpaces/WinStorageSpaces.yaml b/src/it/metricshub-connectors/src/main/connector/hardware/WinStorageSpaces/WinStorageSpaces.yaml index 4ded269..f9110c1 100644 --- a/src/it/metricshub-connectors/src/main/connector/hardware/WinStorageSpaces/WinStorageSpaces.yaml +++ b/src/it/metricshub-connectors/src/main/connector/hardware/WinStorageSpaces/WinStorageSpaces.yaml @@ -11,6 +11,7 @@ connector: - remote - local appliesTo: + - Storage - NT supersedes: - WBEMGenDiskNT diff --git a/src/it/metricshub-connectors/verify.groovy b/src/it/metricshub-connectors/verify.groovy index bce2805..b7696cf 100644 --- a/src/it/metricshub-connectors/verify.groovy +++ b/src/it/metricshub-connectors/verify.groovy @@ -214,7 +214,7 @@ assert htmlText.indexOf("Technology and protocols:") > - 1 : "MIB2 'Technology a assert htmlText.indexOf("SNMP") > - 1 : "MIB2 SNMP protocol must be present" assert htmlText.indexOf('

Examples

') > - 1 : "MIB2: Page must indicate 'Examples' as HTML H3 element" assert htmlText.indexOf('

CLI

') > - 1 : "MIB2: Page must indicate 'CLI' as HTML H4 element" -assert htmlText.indexOf("metricshub HOSTNAME -t management -c +MIB2 --snmp v2c --community public") > - 1 : "MIB2: Page must indicate the expected CLI example" +assert htmlText.indexOf("metricshub HOSTNAME -t network -c +MIB2 --snmp v2c --community public") > - 1 : "MIB2: Page must indicate the expected CLI example" assert htmlText.indexOf('

metricshub.yaml

') > - 1 : "MIB2: Page must indicate 'metricshub.yaml' as HTML H4 element" assert htmlText.indexOf("snmp:") > - 1 : "MIB2: 'snmp:' yaml section must be present" assert htmlText.indexOf("v2c") > - 1 : "MIB2: version 'v2c' must be present in the yaml configuration example" @@ -247,4 +247,13 @@ assert htmlText.indexOf("Any system with Nvidia GPUs") > -1 : "NvidiaSmi: Unexpe assert htmlText.indexOf("Microsoft Windows, Linux") > -1 : "NvidiaSmi: Unexpected Operating Systems" assert htmlText.indexOf("NVIDIA drivers with NVIDIA-SMI support") > -1 : "NvidiaSmi: Unexpected Leverages" assert htmlText.indexOf("Command Lines") > -1 : "NvidiaSmi: Unexpected Technology and protocols" -assert htmlText.indexOf("nvidia-smi") > -1 : "NvidiaSmi: Unexpected criterion command line" \ No newline at end of file +assert htmlText.indexOf("nvidia-smi") > -1 : "NvidiaSmi: Unexpected criterion command line" + +// WinStoreSpaces +htmlText = new File(basedir, "target/site/connectors/winstoragespaces.html").text +assert htmlText.indexOf("Any system") > -1 : "WinStoreSpaces: Unexpected Typical platform" +assert htmlText.indexOf("Storage System, Microsoft Windows") > -1 : "WinStoreSpaces: Unexpected Operating Systems" +assert htmlText.indexOf("Windows Storage Spaces") > -1 : "WinStoreSpaces: Unexpected Leverages" +assert htmlText.indexOf("WMI/WinRM") > -1 : "WinStoreSpaces: Unexpected Technology and protocols" +assert htmlText.indexOf("root\\Microsoft\\Windows\\Storage") > -1 : "WinStoreSpaces: Unexpected namespaces" +assert htmlText.indexOf("metricshub HOSTNAME -t storage -c +WinStorageSpaces --wmi -u USER") > -1 : "WinStoreSpaces: Page must indicate the expected CLI example." diff --git a/src/main/java/org/sentrysoftware/maven/metricshub/connector/producer/ConnectorPageProducer.java b/src/main/java/org/sentrysoftware/maven/metricshub/connector/producer/ConnectorPageProducer.java index 009958e..abce3dd 100644 --- a/src/main/java/org/sentrysoftware/maven/metricshub/connector/producer/ConnectorPageProducer.java +++ b/src/main/java/org/sentrysoftware/maven/metricshub/connector/producer/ConnectorPageProducer.java @@ -212,7 +212,7 @@ public void produce( sink.section2_(); // MetricsHub Example - produceMetricsHubExamplesContent(sink, osList, technologies, sudoCommands); + produceMetricsHubExamplesContent(sink, appliesTo, technologies, sudoCommands); // Detection criteria sink.section2(); @@ -407,7 +407,7 @@ private void produceMetricsHubExamplesContent( yamlBuilder.append(" host.name: # Change with actual host name\n"); yamlBuilder.append(" host.type: ").append(hostType).append("\n"); yamlBuilder - .append(" selectConnectors: [ ") + .append(" connectors: [ +") .append(connectorId) .append(" ] # Optional, to load only this connector\n") .append(PROTOCOLS_SECTION);