Skip to content

Commit

Permalink
Merge pull request #154 from sentrysoftware/feature/issue-129-replace…
Browse files Browse the repository at this point in the history
…-all-references-to-sql-with-internaldbquery-in-the-documentation

Issue #129: Rename sql type to internalDbQuery
  • Loading branch information
NassimBtk authored Dec 5, 2024
2 parents 2fd49ea + 51fc4b6 commit fc53278
Show file tree
Hide file tree
Showing 60 changed files with 215 additions and 118 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<plugin>
<groupId>org.sentrysoftware.maven</groupId>
<artifactId>metricshub-connector-maven-plugin</artifactId>
<version>1.0.06</version>
<version>1.0.07</version>
</plugin>

</plugins>
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `value` can be a number, or a reference to another column of the same table,
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/and.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The `value` can be a number, or a reference to another column of the same table,
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
4 changes: 2 additions & 2 deletions src/site/markdown/develop/computes/append.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
keywords: append, string, concat, right
description: Use the "append" compute operation to append a specified string to a source.

# `append` (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.
Expand All @@ -10,7 +10,7 @@ Since the data is converted from a CSV to a Table, you can add columns by adding
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/array-translate.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The `resultSeparator` value can be used to define how to separate the values aft
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/awk.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Eg: ```yaml script: ${esc.d}{file::my-script.awk}``` for a script named `my-scri
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/convert.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `convert` compute allows make to convert a column from a hexadecimal value t
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/divide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `value` can be a number other than '0', or a reference to another column of
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/duplicate-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `duplicateColumn` compute allows to duplicate a column. The added column wil
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `excludeMatchingLines` compute allows to remove the lines of your table wher
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `ExtractPropertyFromWbemPath` compute allows to extract the specified proper
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/extract.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `subSeparators` value is used to split the original column into an array and
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
4 changes: 2 additions & 2 deletions src/site/markdown/develop/computes/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, compute
keywords: develop, compute
description: This page describes all the compute formats support by the connector

# Computes
Expand All @@ -12,7 +12,7 @@ This page describes all the compute formats support by the connector.
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/json2csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The `properties` value is the list of strings specifying the properties of the e
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/keep-columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `keepColumns` compute allows to keep only the selected columns from a table.
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `KeepOnlyMatchingLines` compute allows to keep only the lines of your table
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/multiply.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `value` can be a number, or a reference to another column of the same table,
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/prepend.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Since the data is converted from a CSV to a Table, you can add columns by adding
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/replace.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `Replace` compute allows to replace a specific value in a column by another
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/substring.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `Substring` compute allows to extract a String from a column.
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/subtract.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `value` can be a number, or a reference to another column of the same table,
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/translate-per-bit.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `BitList` is the list of bits to be taken into account.
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/translate.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `Translate` compute allows to translate values from specified column followi
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/computes/xml2csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `xml2Csv` compute allows to convert a XML source to a character-separated ta
```yaml
connector:
# ...
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>

monitors:
Expand Down
14 changes: 7 additions & 7 deletions src/site/markdown/develop/connector.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector
keywords: develop
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
Expand Down Expand Up @@ -132,8 +132,8 @@ connector:
- type: deviceType
keep: # <enum-array> | possible values: [ vms, osf1, hp, rs6000, linux, oob, nt, network, storage, solaris, sunos ]
exclude: # <enum-array> | possible values: [ vms, osf1, hp, rs6000, linux, oob, nt, network, storage, solaris, sunos ]
# OsCommand criterion
- type: osCommand
# CommandLine criterion
- type: commandLine
commandLine: # <string>
errorMessage: # <string>
expectedResult: # <string>
Expand Down Expand Up @@ -199,7 +199,7 @@ metrics:
constants: # <object>
<constantName>: # <string>
pre: # <object>
beforeAll: # <object>
<sourceKey>: # <source-object>
monitors:
Expand Down Expand Up @@ -230,9 +230,9 @@ monitors:
type: ipmi
forceSerialization: <boolean>
computes: # <compute-object-array>
# OsCommand Source
<osCommand-sourceKey>: # <source-object>
type: osCommand
# CommandLine Source
<commandLine-sourceKey>: # <source-object>
type: commandLine
commandLine: # <string>
timeout: # <number>
executeLocally: # <boolean>
Expand Down
6 changes: 3 additions & 3 deletions src/site/markdown/develop/detection/command-line.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, criteria
keywords: develop, criteria
description: This page defines the detection’s criteria that are defined in a connector.

## Command Line (Detection)
Expand All @@ -11,7 +11,7 @@ connector:
detection: # <object>
# ...
criteria: # <object-array>
- type: osCommand
- type: commandLine
commandLine: # <string>
errorMessage: # <string>
expectedResult: # <string>
Expand All @@ -35,7 +35,7 @@ connector:
connector:
detection:
criteria:
- type: osCommand
- type: commandLine
commandLine: naviseccli -help
expectedResult: Navisphere
executeLocally: true
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/detection/engine-requirements.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, criteria
keywords: develop, criteria
description: This page defines the detection’s criteria that are defined in a connector.

# Product Requirements (Detection)
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/detection/http.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, criteria
keywords: develop, criteria
description: This page defines the detection’s criteria that are defined in a connector.

# HTTP (Detection)
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/detection/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, detection
keywords: develop, detection
description: This page defines the connector’s detection section.

# Detection
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/detection/ipmi.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, criteria
keywords: develop, criteria
description: This page defines the detection’s criteria that are defined in a connector.

## IPMI (Detection)
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/detection/process.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, criteria
keywords: develop, criteria
description: This page defines the detection’s criteria that are defined in a connector.

## Process (Detection)
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/detection/resource-type.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, criteria
keywords: develop, criteria
description: This page defines the detection’s criteria that are defined in a connector.

# Device Type (Detection)
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/detection/service.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, criteria
keywords: develop, criteria
description: This page defines the detection’s criteria that are defined in a connector.

# Service (Detection)
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/detection/snmp-get.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, criteria
keywords: develop, criteria
description: This page defines the detection’s criteria that are defined in a connector.

# SNMP Get (Detection)
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/detection/snmp-getnext.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, criteria
keywords: develop, criteria
description: This page defines the detection’s criteria that are defined in a connector.

# SNMP GetNext (Detection)
Expand Down
38 changes: 38 additions & 0 deletions src/site/markdown/develop/detection/sql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
keywords: develop, sql, criteria
description: This page defines the detection’s criteria that are defined in a connector.

# SQL (Detection)

The goal of this part is to see how to define SQL criteria.

```yaml
connector:
# ...
detection: # <object>
# ...
criteria: # <object-array>
- type: sql
query: # <string>
expectedResult: # <string>
errorMessage: # <string>
```
## Input Properties
| Input Property | Description |
| ---------------- | ------------------------------------------------------------------------ |
| `query` | SQL query to be executed |
| `expectedResult` | Regular expression that is expected to match the result of the SQL query |
| `errorMessage` | The message to display if the detection criterion fails |

### Example

```yaml
connector:
detection:
criteria:
- type: sql
query: SELECT @@version_comment REGEXP 'mysql' AS is_mysql;
expectedResult: 1
errorMessage: Not a MySQL Server
```
2 changes: 1 addition & 1 deletion src/site/markdown/develop/detection/wbem.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, criteria
keywords: develop, criteria
description: This page defines the detection’s criteria that are defined in a connector.

# WBEM (Detection)
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/develop/detection/wmi.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
keywords: develop, connector, criteria
keywords: develop, criteria
description: This page defines the detection’s criteria that are defined in a connector.

# WMI (Detection)
Expand Down
Loading

0 comments on commit fc53278

Please sign in to comment.