Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #57: All the storage examples are incorrect with type=linux #60

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ connector:
- remote
- local
appliesTo:
- Storage
- NT
supersedes:
- WBEMGenDiskNT
Expand Down
13 changes: 11 additions & 2 deletions src/it/metricshub-connectors/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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('<h3 id="examples">Examples</h3>') > - 1 : "MIB2: Page must indicate 'Examples' as HTML H3 element"
assert htmlText.indexOf('<h4 id="cli">CLI</h4>') > - 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('<h4 id="metricshub-yaml">metricshub.yaml</h4>') > - 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"
Expand Down Expand Up @@ -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("<code>nvidia-smi</code>") > -1 : "NvidiaSmi: Unexpected criterion command line"
assert htmlText.indexOf("<code>nvidia-smi</code>") > -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("<code>root\\Microsoft\\Windows\\Storage</code>") > -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."
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -407,7 +407,7 @@ private void produceMetricsHubExamplesContent(
yamlBuilder.append(" host.name: <HOSTNAME> # 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);
Expand Down
Loading