From bcf6f66428b5942274aa5ba72e7e967a9e744741 Mon Sep 17 00:00:00 2001 From: Safae Ajib Date: Tue, 10 Sep 2024 10:37:48 +0200 Subject: [PATCH] Issue #384: Remove Connector Design Guide from the documentation --- .../configuration/configure-monitoring.md | 2 +- .../src/site/markdown/develop/computes/add.md | 24 - .../src/site/markdown/develop/computes/and.md | 35 -- .../site/markdown/develop/computes/append.md | 25 - .../develop/computes/array-translate.md | 64 --- .../src/site/markdown/develop/computes/awk.md | 46 -- .../site/markdown/develop/computes/convert.md | 23 - .../site/markdown/develop/computes/divide.md | 24 - .../develop/computes/duplicate-column.md | 22 - .../computes/exclude-matching-lines.md | 24 - .../develop/computes/extract-wbem-property.md | 23 - .../site/markdown/develop/computes/extract.md | 48 -- .../site/markdown/develop/computes/index.md | 26 -- .../markdown/develop/computes/json2csv.md | 26 -- .../markdown/develop/computes/keep-columns.md | 22 - .../computes/keep-only-matching-lines.md | 24 - .../markdown/develop/computes/multiply.md | 24 - .../site/markdown/develop/computes/prepend.md | 25 - .../site/markdown/develop/computes/replace.md | 24 - .../markdown/develop/computes/substring.md | 24 - .../markdown/develop/computes/subtract.md | 24 - .../develop/computes/translate-per-bit.md | 57 --- .../markdown/develop/computes/translate.md | 59 --- .../site/markdown/develop/computes/xml2csv.md | 23 - .../src/site/markdown/develop/connector.md | 441 ------------------ .../develop/detection/command-line.md | 43 -- .../develop/detection/engine-requirements.md | 34 -- .../site/markdown/develop/detection/http.md | 52 --- .../site/markdown/develop/detection/index.md | 40 -- .../site/markdown/develop/detection/ipmi.md | 28 -- .../markdown/develop/detection/process.md | 32 -- .../develop/detection/resource-type.md | 49 -- .../markdown/develop/detection/service.md | 32 -- .../markdown/develop/detection/snmp-get.md | 35 -- .../develop/detection/snmp-getnext.md | 34 -- .../site/markdown/develop/detection/wbem.md | 38 -- .../site/markdown/develop/detection/wmi.md | 37 -- .../src/site/markdown/develop/index.md | 49 -- .../src/site/markdown/develop/monitors.md | 85 ---- .../src/site/markdown/develop/references.md | 165 ------- .../markdown/develop/sources/command-line.md | 34 -- .../src/site/markdown/develop/sources/copy.md | 20 - .../src/site/markdown/develop/sources/http.md | 31 -- .../site/markdown/develop/sources/index.md | 27 -- .../src/site/markdown/develop/sources/ipmi.md | 20 - .../src/site/markdown/develop/sources/pre.md | 18 - .../site/markdown/develop/sources/snmp-get.md | 27 -- .../markdown/develop/sources/snmp-table.md | 28 -- .../src/site/markdown/develop/sources/sql.md | 28 -- .../site/markdown/develop/sources/static.md | 20 - .../markdown/develop/sources/table-join.md | 26 -- .../markdown/develop/sources/table-union.md | 21 - .../src/site/markdown/develop/sources/wbem.md | 27 -- .../src/site/markdown/develop/sources/wmi.md | 27 -- metricshub-doc/src/site/site.xml | 59 --- 55 files changed, 1 insertion(+), 2324 deletions(-) delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/add.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/and.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/append.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/array-translate.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/awk.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/convert.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/divide.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/duplicate-column.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/exclude-matching-lines.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/extract-wbem-property.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/extract.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/index.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/json2csv.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/keep-columns.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/keep-only-matching-lines.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/multiply.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/prepend.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/replace.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/substring.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/subtract.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/translate-per-bit.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/translate.md delete mode 100644 metricshub-doc/src/site/markdown/develop/computes/xml2csv.md delete mode 100644 metricshub-doc/src/site/markdown/develop/connector.md delete mode 100644 metricshub-doc/src/site/markdown/develop/detection/command-line.md delete mode 100644 metricshub-doc/src/site/markdown/develop/detection/engine-requirements.md delete mode 100644 metricshub-doc/src/site/markdown/develop/detection/http.md delete mode 100644 metricshub-doc/src/site/markdown/develop/detection/index.md delete mode 100644 metricshub-doc/src/site/markdown/develop/detection/ipmi.md delete mode 100644 metricshub-doc/src/site/markdown/develop/detection/process.md delete mode 100644 metricshub-doc/src/site/markdown/develop/detection/resource-type.md delete mode 100644 metricshub-doc/src/site/markdown/develop/detection/service.md delete mode 100644 metricshub-doc/src/site/markdown/develop/detection/snmp-get.md delete mode 100644 metricshub-doc/src/site/markdown/develop/detection/snmp-getnext.md delete mode 100644 metricshub-doc/src/site/markdown/develop/detection/wbem.md delete mode 100644 metricshub-doc/src/site/markdown/develop/detection/wmi.md delete mode 100644 metricshub-doc/src/site/markdown/develop/index.md delete mode 100644 metricshub-doc/src/site/markdown/develop/monitors.md delete mode 100644 metricshub-doc/src/site/markdown/develop/references.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/command-line.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/copy.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/http.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/index.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/ipmi.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/pre.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/snmp-get.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/snmp-table.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/sql.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/static.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/table-join.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/table-union.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/wbem.md delete mode 100644 metricshub-doc/src/site/markdown/develop/sources/wmi.md diff --git a/metricshub-doc/src/site/markdown/configuration/configure-monitoring.md b/metricshub-doc/src/site/markdown/configuration/configure-monitoring.md index e39867205..ace9f8e47 100644 --- a/metricshub-doc/src/site/markdown/configuration/configure-monitoring.md +++ b/metricshub-doc/src/site/markdown/configuration/configure-monitoring.md @@ -578,7 +578,7 @@ Follow the structure below to declare your monitor: # ``` -Refer to [Monitors](../develop/monitors.md) for more information on how to configure custom resource monitoring. +Refer to [Monitors](https://sentrysoftware.org/metricshub-community-connectors/develop/monitors.html) for more information on how to configure custom resource monitoring. ### Example: Monitoring a Grafana Service diff --git a/metricshub-doc/src/site/markdown/develop/computes/add.md b/metricshub-doc/src/site/markdown/develop/computes/add.md deleted file mode 100644 index 53e1f28a3..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/add.md +++ /dev/null @@ -1,24 +0,0 @@ -keywords: math, plus, minus, add, subtract, substract -description: Use "add" in MetricsHub to perform a mathematical addition with a specified value on a source. - -# `add` - -The `add` compute allows to perform an addition operation to the values of a column. The column values must be numerics (integer, float, double, ...).
-The `value` can be a number, or a reference to another column of the same table, using the '$' character followed by the column number. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: add - column: # - value: # -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/and.md b/metricshub-doc/src/site/markdown/develop/computes/and.md deleted file mode 100644 index 8c5510f09..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/and.md +++ /dev/null @@ -1,35 +0,0 @@ -keywords: bitwise, and, or, xor, logic, binary, math -description: The "and" compute operation is used to calculate the result of the bitwise "and" operator with the specified value on a source in MetricsHub. - -# `and` - -The `and` compute allows make a bitwise `and` on the values of a column. - -The `value` can be a number, or a reference to another column of the same table, using the '$' character followed by the column number. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: and - column: # - value: # -``` - -## Example - -In this example, we will remove the high level bits of the column 1 of our source using a bitwise `and` with the value 1023. - -```yaml - - type: and - column: 1 - value: 1023 -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/append.md b/metricshub-doc/src/site/markdown/develop/computes/append.md deleted file mode 100644 index 0e98aa3f0..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/append.md +++ /dev/null @@ -1,25 +0,0 @@ -keywords: append, string, concat, right -description: Use the "append" compute operation to append a specified string to a source. - -# `append` (Append) - -The `Append` compute allow to concatenate a value at the end of all the lines in a selected column. -The `value` can be a number, or a reference to another column of the same table, using the '$' character followed by the column number. -Since the data is converted from a CSV to a Table, you can add columns by adding ';' characters using the append. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: append - column: # - value: # -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/array-translate.md b/metricshub-doc/src/site/markdown/develop/computes/array-translate.md deleted file mode 100644 index ad4474362..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/array-translate.md +++ /dev/null @@ -1,64 +0,0 @@ -keywords: translate, map, table, status, array, list -description: Use the "arrayTranslate" compute operation to map an array of values following a specified translation table. - -# `arrayTranslate` - -The `arrayTranslate` compute allows make to translate a column containing an array of values using a translation table. - -The `arraySeparator` value can be used to define how are separated the values in the array to translate. Default value: "|". - -The `resultSeparator` value can be used to define how to separate the values after the translation. Default value: "|". - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: arrayTranslate - column: # - translationTable: # - arraySeparator: # - resultSeparator: # -``` - -## Example - -In this example, we will use the `arrayTranslate` compute to tranlate an operational status, which in this case is a number, to a more understandable status using the OperationStatusTranslationTable translation table at the end of the connector file. - -```yaml - - type: arrayTranslate - column: 2 - translationTable: "${esc.d}{translation::OperationStatusTranslationTable}" -``` - -Here is the translation table we will use in our case. - -```yaml - OperationStatusTranslationTable: - "11": degraded - "12": failed - "13": failed - "14": failed - "15": ok - "16": degraded - "17": ok - "18": ok - Default: UNKNOWN - "1": ok - "2": ok - "3": degraded - "4": degraded - "5": degraded - "6": failed - "7": failed - "8": degraded - "9": degraded - "10": failed -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/awk.md b/metricshub-doc/src/site/markdown/develop/computes/awk.md deleted file mode 100644 index 63762674c..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/awk.md +++ /dev/null @@ -1,46 +0,0 @@ -keywords: awk, gawk, jawk -description: The "awk" compute operation processes a source through the specified AWK script in MetricsHub. - -# `awk` - -The `awk` compute allows to process the table through an awk script. -The script to execute can be put in a separate file for more readability and be called in the script value. - -Eg: ```yaml script: ${esc.d}{file::my-script.awk}``` for a script named `my-script.awk` placed in the directory of your connector. - -`keep` and `exclude` can be used to trim your result values with regular expressions. - -`separators` and `selectColumns` can be used to separate your result value into multiple columns and keep only those of your choice. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: awk - script: # - exclude: # - keep: # - separators: # - selectColumns: # | comma separated values -``` - -## Example - -In this example, we will process our source through an Awk script. -Each line that results from the execution of this script will then be filtered using the regular expression and separated into multiple columns using the ';' character as a separator and keep columns only from 2 to 12. - -```yaml - - type: awk - script: "${esc.d}{file::embeddedFile-1}" - keep: ^MSHW; - separators: ; - selectColumns: "2,3,4,5,6,7,8,9,10,11,12" -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/convert.md b/metricshub-doc/src/site/markdown/develop/computes/convert.md deleted file mode 100644 index 8be8465ea..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/convert.md +++ /dev/null @@ -1,23 +0,0 @@ -keywords: convert, hex, merge, array, status -description: The "convert" operation performs the specified conversion on a source in MetricsHub. - -# `convert` - -The `convert` compute allows make to convert a column from a hexadecimal value to a decimal value or an array of status into a simple status. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: convert - column: # - conversion: # | possible values: [ hex2Dec, array2SimpleStatus ] -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/divide.md b/metricshub-doc/src/site/markdown/develop/computes/divide.md deleted file mode 100644 index ae193b46b..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/divide.md +++ /dev/null @@ -1,24 +0,0 @@ -keywords: math, multiply, divide, times, ratio -description: Use the "divide" compute operation in MetricsHub to divide a value. - -# `divide` - -The `divide` compute allows to perform an division operation to the values of a column. The column values must be numerics (integer, float, double, ...). -The `value` can be a number other than '0', or a reference to another column of the same table, using the '$' character followed by the column number. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: divide - column: # - value: # -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/duplicate-column.md b/metricshub-doc/src/site/markdown/develop/computes/duplicate-column.md deleted file mode 100644 index 07130d5df..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/duplicate-column.md +++ /dev/null @@ -1,22 +0,0 @@ -keywords: clone, duplicate, copy, field -description: The "duplicateColumn" compute operation is used to duplicate a specified column in a table source in MetricsHub. - -# `duplicateColumn` - -The `duplicateColumn` compute allows to duplicate a column. The added column will be set next to the duplicated column and move all - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: duplicateColumn - column: # -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/exclude-matching-lines.md b/metricshub-doc/src/site/markdown/develop/computes/exclude-matching-lines.md deleted file mode 100644 index 2de8dd5d3..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/exclude-matching-lines.md +++ /dev/null @@ -1,24 +0,0 @@ -keywords: filter, keep, exclude, matching, regex, grep -description: The "excludeMatchingLines" compute operation filters a source in MetricsHub with the specified criteria. - -# `excludeMatchingLines` - -The `excludeMatchingLines` compute allows to remove the lines of your table where the selected column correspond to the `regExp` values or is equal to one of the values in the `valueList`. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: excludeMatchingLines - column: # - regExp: # - valueList: # | comma separated values -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/extract-wbem-property.md b/metricshub-doc/src/site/markdown/develop/computes/extract-wbem-property.md deleted file mode 100644 index edfa4d650..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/extract-wbem-property.md +++ /dev/null @@ -1,23 +0,0 @@ -keywords: wbem, path, cim -description: The "extractPropertyFromWbemPath" is a very WBEM specific compute operation in MetricsHub to extract the value of a specified property from a CIMPath. - -# `extractPropertyFromWbemPath` - -The `ExtractPropertyFromWbemPath` compute allows to extract the specified property from a WBEM ObjectPath in the specified column. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: extractPropertyFromWbemPath - property: # - column: # -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/extract.md b/metricshub-doc/src/site/markdown/develop/computes/extract.md deleted file mode 100644 index b79fe6066..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/extract.md +++ /dev/null @@ -1,48 +0,0 @@ -keywords: extract, csv, substr, string, field -description: Use the "extract" compute operation in MetricsHub to extract a field from a string value. - -# `extract` - -The `extract` compute allows to extract a part of a column and replace this column by this part. -The `subSeparators` value is used to split the original column into an array and the `subColumn` value is used to chose a single column from this array. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: extract - column: # - subColumn: # - subSeparators: # -``` - -## Example - -In this example, let's suppose the column 1 is the speed of a CPU in GHz where the value is separated from the unit by a space character: - -| `2.5 GHz` | -| `1.35 GHz` | -| `3.4755 GHz` | - -This extract will split this column on every space character and keep only the first value. - -```yaml - - type: extract - column: 1 - subColumn: 1 - subSeparator: ' ' -``` - -Then the value of the column 3 after the extract will be: - -| `2.5` | -| `1.35` | -| `3.4755` | diff --git a/metricshub-doc/src/site/markdown/develop/computes/index.md b/metricshub-doc/src/site/markdown/develop/computes/index.md deleted file mode 100644 index 875d10628..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/index.md +++ /dev/null @@ -1,26 +0,0 @@ -keywords: develop, connector, compute -description: This page describes all the compute formats support by the connector - -# Computes - -
Documentation under construction...
- -This page describes all the compute formats support by the connector. - -## Format - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # -``` - -Note: All column numbers start at 1, not 0. diff --git a/metricshub-doc/src/site/markdown/develop/computes/json2csv.md b/metricshub-doc/src/site/markdown/develop/computes/json2csv.md deleted file mode 100644 index 7a7d261bc..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/json2csv.md +++ /dev/null @@ -1,26 +0,0 @@ -keywords: json, translate, map, csv, flat -description: "json2Csv" transforms a JSON source into a CSV table in MetricsHub. - -# `json2Csv` - -The `json2Csv` compute allows to convert a JSON value to a CSV value. -The `entryKey` value is the key in the JSON data that will be shown as a new entry in the resulting CSV (i.e. a new line). -The `properties` value is the list of strings specifying the properties of the entry key to be added to the CSV as new fields. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: json2Csv - entryKey: # - properties: # | comma separated values - separator: # | default: ";" -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/keep-columns.md b/metricshub-doc/src/site/markdown/develop/computes/keep-columns.md deleted file mode 100644 index 82d1aadef..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/keep-columns.md +++ /dev/null @@ -1,22 +0,0 @@ -keywords: filter, columns, reduce -description: Use the "keepColumns" operation to remove unnecessary columns in a source table in MetricsHub. - -# `keepColumns` - -The `keepColumns` compute allows to keep only the selected columns from a table. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: keepColumns - columnNumbers: # | comma separated values -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/keep-only-matching-lines.md b/metricshub-doc/src/site/markdown/develop/computes/keep-only-matching-lines.md deleted file mode 100644 index 6e6af43e6..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/keep-only-matching-lines.md +++ /dev/null @@ -1,24 +0,0 @@ -keywords: filter, keep, exclude, matching, regex, grep -description: The "keepOnlyMatchingLines" compute operation filters a source in MetricsHub with the specified criteria. - -## `keepOnlyMatchingLines` - -The `KeepOnlyMatchingLines` compute allows to keep only the lines of your table where the selected column correspond to the `regExp` values or is equal to one of the values in the `valueList`. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: keepOnlyMatchingLines - column: # - regExp: # - valueList: # | comma separated values -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/multiply.md b/metricshub-doc/src/site/markdown/develop/computes/multiply.md deleted file mode 100644 index f462c0b61..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/multiply.md +++ /dev/null @@ -1,24 +0,0 @@ -keywords: math, multiply, times, divide, ratio -description: Use the "multiply" compute operation in MetricsHub to multiply a value. - -# `multiply` - -The `multiply` compute allows to perform an multiplication operation to the values of a column. The column values must be numerics (integer, float, double, ...). -The `value` can be a number, or a reference to another column of the same table, using the '$' character followed by the column number. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: multiply - column: # - value: # -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/prepend.md b/metricshub-doc/src/site/markdown/develop/computes/prepend.md deleted file mode 100644 index 731842a39..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/prepend.md +++ /dev/null @@ -1,25 +0,0 @@ -keywords: string, prepend, insert, concat -description: Use the "prepend" operation to prepend (insert at the beginning) a specified string into a source in MetricsHub. - -# `prepend` - -The `Prepend` compute allow to concatenate a value at the beginning of all the lines in a selected column. -The `value` can be a number, or a reference to another column of the same table, using the '$' character followed by the column number. -Since the data is converted from a CSV to a Table, you can add columns by adding ';' characters using the append. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: prepend - column: # - value: # -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/replace.md b/metricshub-doc/src/site/markdown/develop/computes/replace.md deleted file mode 100644 index 99c4801da..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/replace.md +++ /dev/null @@ -1,24 +0,0 @@ -keywords: string, replace, trim -description: The "replace" operation replaces a string with another into a source in MetricsHub. - -# Replace - -The `Replace` compute allows to replace a specific value in a column by another value. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: replace - column: # - existingValue: # - newValue: # -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/substring.md b/metricshub-doc/src/site/markdown/develop/computes/substring.md deleted file mode 100644 index 5a7b6b2e4..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/substring.md +++ /dev/null @@ -1,24 +0,0 @@ -keywords: string, substr, extract -description: "substring" is a compute operation in MetricsHub that extracts a string from the specified input. - -# Substring - -The `Substring` compute allows to extract a String from a column. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: substring - column: # - start: # - length: # -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/subtract.md b/metricshub-doc/src/site/markdown/develop/computes/subtract.md deleted file mode 100644 index 4d872ee8e..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/subtract.md +++ /dev/null @@ -1,24 +0,0 @@ -keywords: math, minus, subtract, substract, add -description: Use "subtract" in MetricsHub to perform a subtraction operation on a source. - -# `subtract` - -The `subtract` compute allows to perform an subtraction operation to the values of a column. The column values must be numerics (integer, float, double, ...).
-The `value` can be a number, or a reference to another column of the same table, using the '$' character followed by the column number. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: subtract - column: # - value: # -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/translate-per-bit.md b/metricshub-doc/src/site/markdown/develop/computes/translate-per-bit.md deleted file mode 100644 index a82e00e51..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/translate-per-bit.md +++ /dev/null @@ -1,57 +0,0 @@ -keywords: translate, map, bit, status -description: Use "perBitTranslation" to map set bits in an integer value to a specific meaning in MetricsHub. - -# `perBitTranslation` - -The `PerBitTranslation` allows to translate a numeric value into a string based on its bits, each bit having a different meaning. -The `BitList` is the list of bits to be taken into account. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: perBitTranslation - column: # - bitList: # | comma separated values - translationTable: # -``` - -## Example - -Here is an example of a `PerBitTranslation` compute. - -```yaml - - - type: perBitTranslation - column: 2 - bitList: "0,2,3,6,7,8,9,10,11,12,13,14" - translationTable: "${esc.d}{translation::StatusInformationTranslationTable}" -``` - -And here is the associated translation table: - -```yaml - PowerSupplyStatusInformationTranslationTable: - "13,1": AC Out-of-range - "12,1": AC Lost or Out-of-range - "10,1": Predicted Failure - "11,1": AC Lost - "0,1": "" - "2,1": Not Ready - "3,1": Fan Failure - "6,1": AC Switch On - "7,1": AC Power On - "8,1": "" - "9,1": Failed - "14,1": Configuration Error -``` - -In this example, the column of the current source is decomposed into its bits and is replaced by the first match in the translation table.
diff --git a/metricshub-doc/src/site/markdown/develop/computes/translate.md b/metricshub-doc/src/site/markdown/develop/computes/translate.md deleted file mode 100644 index 040de481e..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/translate.md +++ /dev/null @@ -1,59 +0,0 @@ -keywords: translate, map, table, status -description: This page describes how to define translation tables in a connector file. - -# Translate - -The `Translate` compute allows to translate values from specified column following a specified translation table. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: translate - column: # - translationTable: # -``` - -## Translation Tables - -This page describes how to define translation tables in a connector file. - -### Format - -```yaml -connector: - # ... - -monitors: - # ... - -translations: # - : # - : # -``` - -### Example - -Note here that you must define target states that match the states defined in the [Metrics Section](metrics.md), that’s why `WARN` and `ALARM` are becoming `degraded` and `failed`. - -```yaml -translations: - physicalDiskStatuses: - 3: ok - 4: degraded - 5: failed - 6: failed - 7: ok - 8: ok - 9: ok - 10: ok - default: UNKNOWN -``` diff --git a/metricshub-doc/src/site/markdown/develop/computes/xml2csv.md b/metricshub-doc/src/site/markdown/develop/computes/xml2csv.md deleted file mode 100644 index edfff2102..000000000 --- a/metricshub-doc/src/site/markdown/develop/computes/xml2csv.md +++ /dev/null @@ -1,23 +0,0 @@ -keywords: xml, translate, map, csv, flat -description: "xml2Csv" transforms an XML source into a CSV table in MetricsHub. - -# `xml2Csv` - -The `xml2Csv` compute allows to convert a XML source to a character-separated table. - -```yaml -connector: - # ... -pre: # - : # - -monitors: - : # - : # - sources: # - : # - computes: # - - type: xml2Csv - recordTag: # - properties: # | comma separated values -``` diff --git a/metricshub-doc/src/site/markdown/develop/connector.md b/metricshub-doc/src/site/markdown/develop/connector.md deleted file mode 100644 index 885d6ccd9..000000000 --- a/metricshub-doc/src/site/markdown/develop/connector.md +++ /dev/null @@ -1,441 +0,0 @@ -keywords: develop, connector -description: The intended audience of this guide is the advanced user of MetricsHub, who feels confident enough to dig into the depth of connector development. - -# Connector - -
Documentation under construction...
- - - -## Connector Directory - -The connector directory defines the location of the connector files. As best practice, each connector has its own directory that will contain the connector and its embedded files. - -All connector directories are to be placed in the "MetricsHub/connectors" directory for them to be exploited by MetricsHub. - -## The Connector Object - - - -The first part of a connector is a list of information defining its identity, what is the purpose of this connector and what type of platforms and systems it can be used against. The goal of this part is for someone to understand quickly what this connector is about. - -### Format - -```yaml -connector: - displayName: # - platforms: # - reliesOn: # - version: # - projectVersion: # | default: {esc.d}${project.version} - information: # - detection: # -``` - -### Properties - -| Property | Description | -| --------------------- | ------------------------ | -| `displayName` | Name of the connector, which can be displayed in the console or reported in the metric’s attribute.(`connector.status{name="Dell OpenManage (WMI)"}`)
This preferably refers to the underlying instrumentation layer (e.g.: Dell OpenManage (WMI)).
If several connectors are required to cover different aspects of a platform (one connector for the CPU, memory, another for the disks, and a last one for the network cards, for example), the name will specify it with a dash separator.

The typical display name therefore looks like:
` [ - Subcomponent ] [ - OS ] [ (protocol) ]`. | -| `information` | Describes what the connector monitors and how.

This ends up in the documentation of the Hardware Connector Library as the description of the connector.
Do not hesitate to provide details about the specific requirements for the connector to work properly. | -| `platforms` | Typical targeted system.
Examples: "`HP ProLiant`" or "`Any system with SNMP`"
This property is leveraged to build the Supported Platforms in the documentation.
The platform name must be short and simple enough to group several connectors targeting the same type of systems.
Several platforms can be specified in a comma-separated list.
Connectors that monitor components that may be present in large number of platforms (e.g.: the
connector which monitors network cards in all Windows systems) must specify: `Any system with [xxx]`. | -| `reliesOn` | Name of the instrumentation layer this connector leverages. This can also be considered as the
technical prerequisites for this connector work, but it can only mention one instrumentation layer.

This also ends up in the documentation and in the [Supported Platforms](../platform-requirements.html) and it is important that all
connectors have a consistent wording for this property. | -| `projectVersion` | The current version of the connector library project. | -| `version` | The current version of the connector. | -| `detection` | Defines all the information required to perform connector’s detection. See specification in [Detection](detection.md). | - -## Embedded Files - -The embedded files will be located in external files under the connector directory. - -## SUDO Commands - -This page defines how to specify in a connector the sudo-able commands. - -### Format - -```yaml -connector: - # ... -sudoCommands: -``` - -## Constants - -This page describes how to declare constant in a connector file. - -## Format - -```yaml -connector: - # ... -connector: - # ... -constants: # - : # -``` - -## Extends - -To defines a set of connectors to extends, you need to declare the connectors under the `extends` sections. - -## Format - -```yaml -connector: - # ... -extends: -``` - -In the extends array, you need to declare connectors using their file name without the .yaml extension. -Either a relative path can be used to point to the extended connector, or an absolute path, using the `connectors` directory as root. - -## YAML Schema - -```yaml -connector: - displayName: # - platforms: # - reliesOn: # - version: # - projectVersion: # | default: {esc.d}${project.version} - information: # - - detection: # - connectionTypes: # | possible values: [ remote, local ] | default: local - disableAutoDetection: # | default: false - onLastResort: # - appliesTo: # | possible values: [ vms, osf1, hp, rs6000, linux, oob, nt, network, storage, solaris, sunos. ] - supersedes: # - - criteria: # - # Http criterion - - type: http - method: # | possible values: [ get, post, delete, put ] - path: # - header: # - body: # - expectedResult: # - errorMessage: # - resultContent: # | possible values: [ httpStatus, header, body, all ] | default: body - authenticationToken: # - forceSerialization: # - # Ipmi criterion - - type: ipmi - # productVersion criterion - - type: productRequirements - kmVersion: # - engineVersion: # - # Os criterion - - type: deviceType - keep: # | possible values: [ vms, osf1, hp, rs6000, linux, oob, nt, network, storage, solaris, sunos ] - exclude: # | possible values: [ vms, osf1, hp, rs6000, linux, oob, nt, network, storage, solaris, sunos ] - # OsCommand criterion - - type: osCommand - commandLine: # - errorMessage: # - expectedResult: # - executeLocally: # - timeout: # - forceSerialization: # - # Process criterion - - type: process - commandLine: # - # Service criterion - - type: service - name: # - # SnmpGet criterion - - type: snmpGet - oid: # - expectedResult: # - forceSerialization: # - # SnmpGetNext criterion - - type: snmpGetNext - oid: # - expectedResult: # - forceSerialization: # - # Ucs criterion - - type: ucs - query: # - errorMessage: # - expectedResult: # - forceSerialization: # - # Wbem criterion - - type: wbem - query: # - namespace: # | default: root/cimv2 - errorMessage: # - expectedResult: # - forceSerialization: # - # Wmi criterion - - type: wmi - query: # - namespace: # | default: root/cimv2 - errorMessage: # - expectedResult: # - forceSerialization: # - -sudoCommands: # - -extends: # - -metrics: - : # - unit: # - description: # - type: # oneOf [ , ] | possible values for [ Gauge, Counter, UpDownCounter ] - stateSet: # - output: # | possible values [ Gauge, Counter, UpDownCounter ] | Optional | Default: UpDownCounter - - - -constants: # - : # - -pre: # - : # - -monitors: - : # - : # | key possible values [ discovery, collect, simple] - type: # | Only for collect | possible values [ multiInstance, monoInstance ] - keys: # | Only for collect with multiInstance type | Default: [ id ] - # Sources - sources: # - # Http Source - : # - type: http - method: # | possible values: [ get, post, delete, put ] - path: # - header: # - body: # - authenticationToken: # - resultContent: # | possible values: [ httpStatus, header, body, all ] - forceSerialization: - executeForEachEntryOf: # - source: # - concatMethod: # onOf [ , ] | possible values for : [ list, json_array, json_array_extended ] - concatStart: # - concatEnd: # - computes: # - # Ipmi Source - : # - type: ipmi - forceSerialization: - computes: # - # OsCommand Source - : # - type: osCommand - commandLine: # - timeout: # - executeLocally: # - exclude: # - keep: # - beginAtLineNumber: # - endAtLineNumber: # - separators: # - selectColumns: # | comma separated values - forceSerialization: - executeForEachEntryOf: # - source: # - concatMethod: # onOf [ , ] | possible values for : [ list, json_array, json_array_extended ] - concatStart: # - concatEnd: # - computes: # - # Copy Source - : # - type: copy - from: # - computes: # - # Static Source - : # - type: static - value: # - computes: # - # SnmpGet source - : # - type: snmpGet - oid: # - forceSerialization: - executeForEachEntryOf: # - source: # - concatMethod: # onOf [ , ] | possible values for : [ list, json_array, json_array_extended ] - concatStart: # - concatEnd: # - computes: # - : # - type: snmpTable - oid: # - selectColumns: # | comma separated values - forceSerialization: - executeForEachEntryOf: # - source: # - concatMethod: # onOf [ , ] | possible values for : [ list, json_array, json_array_extended ] - concatStart: # - concatEnd: # - computes: # - # TableJoin Source - : # - type: tableJoin - leftTable: # - rightTable: # - leftKeyColumn: # - rightKeyColumn: # - defaultRightLine: # | comma separated values - isWbemKey: # - forceSerialization: - computes: - # TableUnion Source - : # - type: tableUnion - tables: # - forceSerialization: - computes: - # Ucs Source - : # - type: ucs - queries: # - exclude: # - keep: # - selectColumns: # | comma separated values - forceSerialization: - executeForEachEntryOf: # - source: # - concatMethod: # onOf [ , ] | possible values for : [ list, json_array, json_array_extended ] - concatStart: # - concatEnd: # - computes: - # Wbem Source - : # - type: wbem - query: # - namespace: # - forceSerialization: - executeForEachEntryOf: # - source: # - concatMethod: # onOf [ , ] | possible values for : [ list, json_array, json_array_extended ] - concatStart: # - concatEnd: # - computes: - # Wmi Source - : # - type: wmi - query: # - namespace: # - forceSerialization: - executeForEachEntryOf: # - source: # - concatMethod: # onOf [ , ] | possible values for : [ list, json_array, json_array_extended ] - concatStart: # - concatEnd: # - computes: - # SQL Source - : # - : - type: sql - tables: - - source: - alias: - columns: - - name: - number: - type: - query: - computes: - - # Computes - : # - computes: - - type: add - column: # - value: # - - type: and - column: # - value: # - - type: arrayTranslate - column: # - translationTable: # - arraySeparator: # - resultSeparator: # - - type: awk - script: # - exclude: # - keep: # - separators: # - selectColumns: # | comma separated values - - type: convert - column: # - conversion: # | possible values: [ hex2Dec, array2SimpleStatus ] - - type: divide - column: # - value: # - - type: duplicateColumn - column: # - - type: excludeMatchingLines - column: # - regExp: # - valueList: # | comma separated values - - type: extract - column: # - subColumn: # - subSeparators: # - - type: extractPropertyFromWbemPath - property: # - column: # - - type: json2Csv - entryKey: # - properties: # | comma separated values - separator: # | default: ";" - - type: keepColumns - columnNumbers: # | comma separated values - - type: keepMatchingLines - column: # - regExp: # - valueList: # | comma separated values - - type: prepend - column: # - value: # - - type: multiply - column: # - value: # - - type: perBitTranslation - column: # - bitList: # | comma separated values - translationTable: # - - type: replace - column: # - existingValue: # - newValue: # - - type: append - column: # - value: # - - type: subtract - column: # - value: # - - type: substring - column: # - start: # - length: # - - type: translate - column: # - translationTable: # - - type: xml2Csv - recordTag: # - properties: # | comma separated values - - mapping: - source: # - attributes: - : # - conditionalCollection: - : # - metrics: - : # - legacyTextParameters: - : # - -translations: # - : # - : # -``` - diff --git a/metricshub-doc/src/site/markdown/develop/detection/command-line.md b/metricshub-doc/src/site/markdown/develop/detection/command-line.md deleted file mode 100644 index c78d4bc35..000000000 --- a/metricshub-doc/src/site/markdown/develop/detection/command-line.md +++ /dev/null @@ -1,43 +0,0 @@ -keywords: develop, connector, criteria -description: This page defines the detection’s criteria that are defined in a connector. - -## Command Line (Detection) - -The goal of this part is to see how to define OS commands criteria. - -```yaml -connector: - # ... - detection: # - # ... - criteria: # - - type: osCommand - commandLine: # - errorMessage: # - expectedResult: # - executeLocally: # - timeout: # -``` - -### Input Properties - -| Input Property | Description | -| -------------- | ----------- | -| `commandLine` | Command-line to be executed. Macros such as `%{USERNAME}`, `%{PASSWORD}` or `%{HOSTNAME}` may be used | -| `timeout` | Time in seconds after which the command is stopped is considered failed. If not provided, the default OS command timeout will be used | -| `errorMessage` | The message to display if the detection criteria fails | -| `executeLocally` | Specifies if the command must be executed locally even when monitoring a remote system (`0`, `false`, `1`, `true`) | -| `expectedResult` | Regular expression that is expected to match the result of the OS command | - -### Example - -```yaml -connector: - detection: - criteria: - - type: osCommand - commandLine: naviseccli -help - expectedResult: Navisphere - executeLocally: true - errorMessage: Not a Navisphere system -``` diff --git a/metricshub-doc/src/site/markdown/develop/detection/engine-requirements.md b/metricshub-doc/src/site/markdown/develop/detection/engine-requirements.md deleted file mode 100644 index 7273e28ab..000000000 --- a/metricshub-doc/src/site/markdown/develop/detection/engine-requirements.md +++ /dev/null @@ -1,34 +0,0 @@ -keywords: develop, connector, criteria -description: This page defines the detection’s criteria that are defined in a connector. - -# Product Requirements (Detection) - -The goal of this part is to see how to define Product Requirements criteria. - -```yaml -connector: - # ... - detection: # - # ... - criteria: # - - type: productRequirements - engineVersion: # - kmVersion: # -``` - -### Input Properties - -| Input Property | Description | -| -------------- | ----------- | -| `kmVersion` | Minimum required KM version, using this format: x.y.z (ex: 3.1.01) | -| `engineVersion` | Minimum required engine version, using this format: x.y.z (ex: 3.1.01) | - -### Example - -```yaml -connector: - detection: - criteria: - - type: productRequirements - engineVersion: 4.1.00 -``` diff --git a/metricshub-doc/src/site/markdown/develop/detection/http.md b/metricshub-doc/src/site/markdown/develop/detection/http.md deleted file mode 100644 index 5e24a70aa..000000000 --- a/metricshub-doc/src/site/markdown/develop/detection/http.md +++ /dev/null @@ -1,52 +0,0 @@ -keywords: develop, connector, criteria -description: This page defines the detection’s criteria that are defined in a connector. - -# HTTP (Detection) - - - -The goal of this part is to see how to define HTTP criteria. - -```yaml -connector: - # ... - detection: # - # ... - criteria: # - - type: http - method: # | possible values: [ get, post, delete, put ] - path: # - header: # - body: # - expectedResult: # - resultContent: # | possible values: [ httpStatus, header, body, all ] - authenticationToken: # - errorMessage: # -``` - -### Input Properties - -| Input Property | Description | -| --------------------- | ----------------- | -| `method` | The HTTP request method type: `get`, `post`, `delete`, put (default: `get`) | -| `path` | The path to connect to.
Macros such as `%{AUTHENTICATIONTOKEN}`, `%{USERNAME}`, `%{PASSWORD}`, `%{PASSWORD_BASE64}`, `%{BASIC_AUTH_BASE64}` or `%{AUTHENTICATIONTOKEN}` may be used. | -| `header` | The HTTP request’s header.
Macros such as `%{AUTHENTICATIONTOKEN}`, `%{USERNAME}`, `%{PASSWORD}`, `%{PASSWORD_BASE64}`, `%{BASIC_AUTH_BASE64}` or `%{AUTHENTICATIONTOKEN}` may be used. | -| `body` | The HTTP request’s body.
Macros such as `%{AUTHENTICATIONTOKEN}`, `%{USERNAME}`, `%{PASSWORD}`, `%{PASSWORD_BASE64}`, `%{BASIC_AUTH_BASE64}` or `%{AUTHENTICATIONTOKEN}` may be used. | -| `expectedResult` | Regular expression that is expected to match the result of the `HTTP` request. | -| `resultContent` | Extracts the specified content from the HTTP request’s result (default: `body`). | -| `authenticationToken` | The authentication token (typically a reference to another source). | -| `errorMessage` | The error message to display if the expectedResult regular expression evaluates to false. | - -### Example - -```yaml -connector: - detection: - criteria: - - type: http - method: GET - path: /api/DeviceService/Devices - header: ${esc.d}{file::http-header} - expectedResult: api - errorMessage: Failed to get response from API -``` diff --git a/metricshub-doc/src/site/markdown/develop/detection/index.md b/metricshub-doc/src/site/markdown/develop/detection/index.md deleted file mode 100644 index d5c543b37..000000000 --- a/metricshub-doc/src/site/markdown/develop/detection/index.md +++ /dev/null @@ -1,40 +0,0 @@ -keywords: develop, connector, detection -description: This page defines the connector’s detection section. - -# Detection - -
Documentation under construction...
- -The detection's goal is to see if the connector will be of use, given the specified system type and the protocol enabled in your configuration. - -## Format - -```yaml -connector: - # ... - detection: - connectionTypes: # | possible values: [ remote, local ] | default: local - disableAutoDetection: # | default: false - onLastResort: # - appliesTo: # | possible values: [ vms, osf1, hp, rs6000, linux, oob, nt, network, storage, solaris, sunos ] - supersedes: # - criteria: # - - #... -``` - -## Properties - -| Property | Description | -| --------------------- | ----------------- | -| `connectionTypes` | The types of the connection `local` and/or `remote`:
  • `remote` the connector can be used to monitor a remote system
  • `local` the connector can be used to monitor the system the agent is running on.

If the connector cannot be used locally (because the targeted system is something which you cannot install an agent on) use only `remote`. | -| `appliesTo` | Comma-separated list of OSes the connector can be used on.
Possible values:
  • HP = HP-UX
  • NT = Microsoft Windows
  • Linux = Linux
  • OSF1 = HP Tru64
  • Solaris = Sun Solaris
  • SunOS = Sun Solaris
  • SOLARIS = Sun Solaris
  • RS6000 = IBM AIX
  • Storage = Storage Device
  • VMS = HP OpenVMS
  • OOB = Out-of-band, management cards, etc.
| -| `supersedes` | Comma-separated list of connectors that are superseded by this connector. In automatic detection, this connector will prevail on the listed connectors if they happen to be detected too. | -| `disableAutoDetection` | When set to true prevent the connector from running a detection. | -| `onLastResort` | Specifies that the connector is to be used as “last resort” only. The connector may be applied to monitor the system if no other connectors discovering the specified device type matches the system.
Example:
`onLastResort: enclosure`
The connector will be activated if and only if no other connector matches and has an `$monitors.enclosure.discovery.mapping.source` or `$monitors.enclosure.simple.mapping.source`. | -| `criteria` | Array of criterion objects that the engine executes to decide whether the connector should be staged to monitor the host or not. These criteria are also executed by the engine if the user selects specific connectors. See specification in the [Criteria Section](criteria.md). | - -## Criteria - -In order for a connector to match a system, some criterion must be met. They are defined in the [Detection Section](detection.md) of the connector and checked during the discovery. If all criterion are met, the connector matches and will be used to monitor the system. If a criteria is not met, MetricsHub stops processing the detection and as far as the target system is concerned, the connector will not be used. - -A maximum number of 99 detection criterion may be defined in a connector. diff --git a/metricshub-doc/src/site/markdown/develop/detection/ipmi.md b/metricshub-doc/src/site/markdown/develop/detection/ipmi.md deleted file mode 100644 index 8fa8aded7..000000000 --- a/metricshub-doc/src/site/markdown/develop/detection/ipmi.md +++ /dev/null @@ -1,28 +0,0 @@ -keywords: develop, connector, criteria -description: This page defines the detection’s criteria that are defined in a connector. - -## IPMI (Detection) - -The goal of this part is to see how to define IPMI criteria. - -```yaml -connector: - # ... - detection: # - # ... - criteria: # - - type: ipmi -``` - -### Input Properties - -None, the product will run an IPMI command to determine if IPMI is available. - -### Example - -```yaml -connector: - detection: - criteria: - - type: ipmi -``` diff --git a/metricshub-doc/src/site/markdown/develop/detection/process.md b/metricshub-doc/src/site/markdown/develop/detection/process.md deleted file mode 100644 index 17576e9df..000000000 --- a/metricshub-doc/src/site/markdown/develop/detection/process.md +++ /dev/null @@ -1,32 +0,0 @@ -keywords: develop, connector, criteria -description: This page defines the detection’s criteria that are defined in a connector. - -## Process (Detection) - -The goal of this part is to see how to define process criteria. - -```yaml -connector: - # ... - detection: # - # ... - criteria: # - - type: process - commandLine: # -``` - -### Input Properties - -| Input Property | Description | -| -------------- | ----------- | -| `commandLine` | Regular expression that should match the command line of a process currently running on the monitored system | - -### Example - -```yaml -connector: - detection: - criteria: - - type: process - processCommandLine: naviseccli -help -``` diff --git a/metricshub-doc/src/site/markdown/develop/detection/resource-type.md b/metricshub-doc/src/site/markdown/develop/detection/resource-type.md deleted file mode 100644 index 4ec506faa..000000000 --- a/metricshub-doc/src/site/markdown/develop/detection/resource-type.md +++ /dev/null @@ -1,49 +0,0 @@ -keywords: develop, connector, criteria -description: This page defines the detection’s criteria that are defined in a connector. - -# Device Type (Detection) - -The goal of this part is to see how to define Device Type criteria. - -```yaml -connector: - # ... - detection: # - # ... - criteria: # - - type: deviceType - keep: # | possible values: [ vms, osf1, hp, rs6000, linux, oob, nt, network, storage, solaris, sunos ] - exclude: # | possible values: [ vms, osf1, hp, rs6000, linux, oob, nt, network, storage, solaris, sunos ] -``` - -### Input Properties - -| Input Property | Description | -| -------------- | ----------- | -| `exclude` | List of operating systems, separated by commas, that should not match the monitored system | -| `keep` | List of operating systems, separated by commas. The monitored system's OS must match one of the listed item | - -### Supported OS List - -| Operating System | OS Type | -| -------------- | ------------------ | -| HP OpenVMS | `VMS` | -| HP Tru64 UNIX | `OSF1`, `tru64` | -| HP-UX | `HP`, `hpux` | -| IBM AIX | `RS600` | -| Linux (RedHat, SuSe, ESX) | `Linux` | -| Management Card/Chip, Blade Chassis, ESXi | `OOB` (Out-of Band) | -| Network | `Network` | -| Storage | `Storage` | -| Sun Solaris | `Solaris` | -| Microsoft Windows | `NT`, `win` | - -### Example - -```yaml -connector: - detection: - criteria: - - type: deviceTYpe - keep: [ vms, osf1, hp, rs6000, linux, oob, nt, network, storage, solaris, sunos ] -``` diff --git a/metricshub-doc/src/site/markdown/develop/detection/service.md b/metricshub-doc/src/site/markdown/develop/detection/service.md deleted file mode 100644 index 5bc111b2c..000000000 --- a/metricshub-doc/src/site/markdown/develop/detection/service.md +++ /dev/null @@ -1,32 +0,0 @@ -keywords: develop, connector, criteria -description: This page defines the detection’s criteria that are defined in a connector. - -# Service (Detection) - -The goal of this part is to see how to define service criteria. - -```yaml -connector: - # ... - detection: # - # ... - criteria: # - - type: service - name: # -``` - -### Input Properties - -| Input Property | Description | -| -------------- | ----------- | -| `name` | Regular expression that must match the name of a service currently running on the monitored system | - -### Example - -```yaml -connector: - detection: - criteria: - - type: service - name: TWGIPC -``` diff --git a/metricshub-doc/src/site/markdown/develop/detection/snmp-get.md b/metricshub-doc/src/site/markdown/develop/detection/snmp-get.md deleted file mode 100644 index 8f4362abc..000000000 --- a/metricshub-doc/src/site/markdown/develop/detection/snmp-get.md +++ /dev/null @@ -1,35 +0,0 @@ -keywords: develop, connector, criteria -description: This page defines the detection’s criteria that are defined in a connector. - -# SNMP Get (Detection) - -The goal of this part is to see how to define SNMP Get criteria. - -```yaml -connector: - # ... - detection: # - # ... - criteria: # - - type: snmpGet - oid: # - expectedResult: # -``` - -### Input Properties - -| Input Property | Description | -| -------------- | ----------- | -| `oid` | Object Identifier (OID) used to perform the SNMP request. The request must be successful | -| `expectedResult` | Regular expression that is expected to match the result of the SNMP request. If not specified, a successful SNMP request will be sufficient for the criteria to be met | - -### Example - -```yaml -connector: - detection: - criteria: - - type: snmpGet - oid: 1.3.6.1.4.1.318.1.1.26.2.1.3.1 - expectedResult: PDU -``` diff --git a/metricshub-doc/src/site/markdown/develop/detection/snmp-getnext.md b/metricshub-doc/src/site/markdown/develop/detection/snmp-getnext.md deleted file mode 100644 index 0dd20c920..000000000 --- a/metricshub-doc/src/site/markdown/develop/detection/snmp-getnext.md +++ /dev/null @@ -1,34 +0,0 @@ -keywords: develop, connector, criteria -description: This page defines the detection’s criteria that are defined in a connector. - -# SNMP GetNext (Detection) - -The goal of this part is to see how to define SNMP GetNext criteria. - -```yaml -connector: - # ... - detection: # - # ... - criteria: # - - type: snmpGetNext - oid: # - expectedResult: # -``` - -## Input Properties - -| Input Property | Description | -| -------------- | ----------- | -| `oid` | Object Identifier (OID) used to perform the SNMP get next request. The value returned is the content of the variable that is lexicographically next in the MIB. The request must be successful and the result OID must be a child of the provided OID. | -| `expectedResult` | Regular expression that is expected to match the result of the SNMP request . If not specified, a successful SNMP request will be sufficient for the criteria to be met | - -### Example - -```yaml -connector: - detection: - criteria: - - type: snmpGetNext - oid: 1.3.6.1.4.1.674.10892.5.5.1.20.130.4 -``` diff --git a/metricshub-doc/src/site/markdown/develop/detection/wbem.md b/metricshub-doc/src/site/markdown/develop/detection/wbem.md deleted file mode 100644 index ff4bf4219..000000000 --- a/metricshub-doc/src/site/markdown/develop/detection/wbem.md +++ /dev/null @@ -1,38 +0,0 @@ -keywords: develop, connector, criteria -description: This page defines the detection’s criteria that are defined in a connector. - -# WBEM (Detection) - -The goal of this part is to see how to define WBEM criteria. - -```yaml -connector: - # ... - detection: # - # ... - criteria: # - - type: wbem - query: # - namespace: # - expectedResult: # -``` - -### Input Properties - -| Input Property | Description | -| -------------- | ----------- | -| `query` | WBEM query to be executed | -| `namespace` | WBEM namespace providing the context for the WBEM query. Use `automatic` so that the namespace automatically determined | -| `expectedResult` | Regular expression that is expected to match the result of the WBEM Query | - -### Example - -```yaml -connector: - detection: - criteria: - - type: wbem - query: SELECT Name,Dedicated FROM EMC_StorageSystem - namespace: root/emc - expectedResult: [;|]3|[0-9|]*;$ -``` diff --git a/metricshub-doc/src/site/markdown/develop/detection/wmi.md b/metricshub-doc/src/site/markdown/develop/detection/wmi.md deleted file mode 100644 index 0592fe25a..000000000 --- a/metricshub-doc/src/site/markdown/develop/detection/wmi.md +++ /dev/null @@ -1,37 +0,0 @@ -keywords: develop, connector, criteria -description: This page defines the detection’s criteria that are defined in a connector. - -# WMI (Detection) - -The goal of this part is to see how to define WMI criteria. - -```yaml -connector: - # ... - detection: # - # ... - criteria: # - - type: wmi - query: # - namespace: # - expectedResult: # -``` - -## Input Properties - -| Input Property | Description | -| -------------- | ----------- | -| `query` | WMI query to be executed | -| `namespace` | WMI namespace providing the context for the WMI query. Use `automatic` so that the namespace is automatically determined | -| `expectedResult` | Regular expression that is expected to match the result of the WMI query | - -### Example - -```yaml -connector: - detection: - criteria: - - type: wmi - query: SELECT Name FROM WMINET_InstrumentedAssembly - namespace: root\LibreHardwareMonitor -``` diff --git a/metricshub-doc/src/site/markdown/develop/index.md b/metricshub-doc/src/site/markdown/develop/index.md deleted file mode 100644 index cbcbb270b..000000000 --- a/metricshub-doc/src/site/markdown/develop/index.md +++ /dev/null @@ -1,49 +0,0 @@ -keywords: develop, connector, yaml, syntax, community, custom -description: Master connector creation for MetricsHub. Dive into monitoring, from basic to advanced concepts. Perfect for MetricsHub enthusiasts and community contributors. - -# Connector Design Guide - -
Documentation under construction...
- - - -## Introduction - -This guide is designed to empower developers with the knowledge and best practices necessary to create effective connectors for **MetricsHub**, leveraging OpenTelemetry to monitor resources efficiently. - -## Target Audience - -This guide is intended for advanced users of **MetricsHub** and contributors to the [MetricsHub Community Connectors](https://github.com/sentrysoftware/metricshub-community-connectors) project. Readers are expected to have a foundational understanding of monitoring concepts and YAML syntax. The content is tailored for those looking to extend **MetricsHub**'s monitoring capabilities to resources not covered by its built-in connectors. - -## What is a Connector? - -A connector is a `YAML` file that defines the necessary parameters and logic to monitor specific resources, whether in infrastructure or any environment reachable via the network. It specifies how to collect data, what data to collect, and how to process that data. Through connectors, **MetricsHub** can be extended to support new resources, enriching the monitoring landscape. - -## Purpose of a Connector - -The primary purposes of a connector are to: - -* Accurately identify and detect the resources to be monitored, such as Operating Systems, Hosts, Devices, Containers, Kubernetes clusters, and more. -* Outline the techniques for data collection from these resources, utilizing local commands, network queries, or other relevant methods. -* Establish the format of the gathered data, including metrics and attributes, and detail the processes for transforming this data prior to submission to OpenTelemetry. - -## Key Components of a Connector - -A connector `YAML` file comprises several sections, each serving a distinct purpose: - -* Metadata: Includes information like display name, version, platforms, and dependencies. -* Detection: Defines how to identify the target resource and includes criteria for detection. -* Monitors: Details the monitoring jobs, their types, and how they collect or compute data. -* Sources and Computes: Describe the data sources and computations performed on the collected data. -* Mapping: Describes how to create attributes and metrics -![Connector Overview](../images/connector-overview.png) - -## Developing a Connector - -The process of developing a connector encompasses several key steps: - -* **Resource Identification**: Determining the specific resource and its components you intend to monitor. -* **Protocol Selection**: Opting for the appropriate data collection method from a range of supported protocols such as `HTTP`, `SNMP`, `IPMI`, `WinRM`, `WMI`, `WBEM`, and `SSH`. -* **Connector Configuration**: Creating the YAML file to specify the detection logic, metrics to be collected, and the data processing approach. - -By the end of this guide, developers will be equipped with the knowledge to create connectors for **MetricsHub**, enabling the monitoring of a wider range of resources and contributing to the **MetricsHub** community. diff --git a/metricshub-doc/src/site/markdown/develop/monitors.md b/metricshub-doc/src/site/markdown/develop/monitors.md deleted file mode 100644 index 9be91b87f..000000000 --- a/metricshub-doc/src/site/markdown/develop/monitors.md +++ /dev/null @@ -1,85 +0,0 @@ -keywords: develop, connector, monitors -description: This page describes how to specify the monitor to discovery and collect in a connector file. - -# Monitors - -
Documentation under construction...
- -This page describes how to specify the monitor to discovery and collect in a connector file. - -## Format - -```yaml -connector: - # ... -monitors: - : # - discovery: # - sources: # - collect: # - type: # | possible values [ multiInstance, monoInstance ] - keys: # | Only for collect with multiInstance type | Default: [ id ] - executionOrder: # | Optional - sources: # - simple: # - executionOrder: # | Optional - sources: # -``` - -Each source is defined in the [Sources](sources.md) page. - -## Mapping - -This page describes how to map metrics and attributes in a connector file. - -### Format - -```yaml -connector: - # ... - -monitors: - : # - : # - # ... - mapping: - source: $monitors.enclosure.discovery.sources.Source(7) - attributes: - : # - metrics: - : # - conditionalCollection: - : # -``` - -### Metric Categories - -Metrics are separated in different categories: - -* Attributes: They are the intrinsic values of your monitor, like its name, identifier number, serial number... -* Metrics: They are the performance data of your monitor at the time of collect. -* ConditionalCollection: The monitor will be collected only if all its conditional collections have value. - -### Mapping Functions - -* fakeCounter: Execute a fake counter operation based on the value which is expressed as a rate -* rate: Calculate a rate from counter values - -## Metrics - -This page shows how to defines in a connector the OpenTelemetry metrics that this connector will collect and report. - -### Format - -```yaml -connector: - # ... - -metrics: - : # - unit: # - description: # - type: # oneOf [ , ] | possible values for [ Gauge, Counter, UpDownCounter ] - stateSet: # - output: # | possible values [ Gauge, Counter, UpDownCounter ] | Optional | Default: UpDownCounter -``` diff --git a/metricshub-doc/src/site/markdown/develop/references.md b/metricshub-doc/src/site/markdown/develop/references.md deleted file mode 100644 index 4c51fcf9a..000000000 --- a/metricshub-doc/src/site/markdown/develop/references.md +++ /dev/null @@ -1,165 +0,0 @@ -keywords: develop, connector, source, reference -description: This page shows how to reference connector objects such as sources, entries, columns and files, etc. inside the YAML document. - -# Connector Object References - -
Documentation under construction...
- - - -This page shows how to reference connector objects such as sources, entries, columns and files, etc. inside the YAML document. - -## Source Reference - -### Format - -A Source can be referenced either with its full path or its relative path. A relative path can be used only if the referenced source is in the same monitor and same job as the current source. - -### Example - -```yaml - mapping: - source: ${esc.d}{source::monitors.disk_controller.discovery.sources.source_discovery} -``` - -```yaml - sourceDiscovery: - type: tableJoin - leftTable: ${esc.d}{source::monitors.enclosure.collect.sources.source_chassis} # full path for a source in another monitor - rightTable: ${esc.d}{source::source_enclosure} # relative path - leftKeyColumn: 1 - rightKeyColumn: 1 -``` - -## Entry Reference - -### Format - -```yaml -$ -``` - -### Example - -```yaml - source(3): - type: http - method: GET - executeForEachEntryOf: - source: ${esc.d}{source::monitors.enclosure.discovery.sources.source(2)} - concatMethod: list - path: /api/rest/StorageCenter/ScChassis/$2/PowerSupplyList -``` - -## Column Reference - -### Format - -```yaml -$ -``` - -### Example - -```yaml - mapping: - # PowerSupply - # tableID;ID;DisplayName;objectType;enclosure/controllerID;deviceType - source: ${esc.d}{source::monitors.power_supply.discovery.sources.source(4)} - attributes: - id: $2 - __display_id: $3 - hw.parent.type: $6 - hw.parent.id: $5 - name: $3 -``` - -## File Reference - -### Format - -```yaml -${esc.d}{file::} -``` - -### Example - -```yaml - criteria: - - type: osCommand - commandLine: /bin/sh ${esc.d}{file::storman-drives.sh} - expectedResult: Hard drive - errorMessage: No Adaptec Controller with Physical Disks attached or not enough rights to execute arcconf. -``` - -## Mono-Instance Reference - -### Format - -```yaml -${esc.d}{attribute::} -``` - -### Example - -```yaml - collect: - # Collect type is multi-instance - type: monoInstance - sources: - source(1): - type: osCommand - commandLine: /bin/sh ${esc.d}{file::script.sh} ${esc.d}{attribute::id} - keep: ^MSHW; - separators: ; - selectColumns: "2,3,4,5,6,7,8,9" -``` - -## Translation Table Reference - -### Format - -```yaml -${esc.d}{translation::} -``` - -### Example - -```yaml - collect: - # Collect type = multi-instance - type: multiInstance - sources: - source(1): - # Source(1) = connUnitSensorTable SNMP Table - # ID;Status;Value; - type: snmpTable - oid: 1.3.6.1.4.1.1588.2.1.1.1.1.22.1 - selectColumns: "ID,3,4" - computes: - # Translate the first column status into a PATROLStatus - # ID;PatrolStatus;Value; - - type: translate - column: 2 - translationTable: ${esc.d}{translation::SensorStatusTranslationTable} -``` - -## Awk Script Reference - -### Format - -```yaml -${esc.d}{awk::