-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update SQL and Oracle module docs regarding Oracle DSNs (#37590)
- Add 'oracle://' URL format. - Add note about encoding of special characters in URLs. - Align the SQL module and the Oracle module documentation.
- Loading branch information
1 parent
6d3239a
commit 5a9613e
Showing
5 changed files
with
47 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,19 +60,24 @@ Then, Metricbeat can be launched. | |
|
||
*Host Configuration* | ||
|
||
The following two types of host configurations are supported: | ||
The following types of host configuration are supported: | ||
|
||
1. Old style host configuration for backwards compatibility: | ||
1. An old-style Oracle connection string, for backwards compatibility: | ||
a. `hosts: ["user/[email protected]:1521/ORCLPDB1.localdomain"]` | ||
b. `hosts: ["user/[email protected]:1521/ORCLPDB1.localdomain as sysdba"]` | ||
|
||
2. DSN host configuration: | ||
2. DSN configuration as a URL: | ||
a. `hosts: ["oracle://user:[email protected]:1521/ORCLPDB1.localdomain?sysdba=1"]` | ||
|
||
3. DSN configuration as a logfmt-encoded parameter list: | ||
a. `hosts: ['user="user" password="pass" connectString="0.0.0.0:1521/ORCLPDB1.localdomain"']` | ||
b. `hosts: ['user="user" password="password" connectString="host:port/service_name" sysdba=true']` | ||
|
||
DSN host configuration is the recommended way to configure the Oracle Metricbeat Module as it supports the usage of special characters in the password. | ||
DSN host configuration is the recommended configuration type as it supports the use of special characters in the password. | ||
|
||
In a URL any special characters should be URL encoded. | ||
|
||
Note: If the password contains the backslash (`\`) character, it must be escaped with a backslash. For example, if the password is `my\_password`, it should be written as `my\\_password`. | ||
In the logfmt-encoded DSN format, if the password contains a backslash character (`\`), it must be escaped with another backslash. For example, if the password is `my\_password`, it must be written as `my\\_password`. | ||
|
||
[float] | ||
== Metricsets | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -871,19 +871,26 @@ Then, Metricbeat can be launched. | |
|
||
===== Host Configuration for Oracle | ||
|
||
The following two types of host configurations are supported: | ||
The following types of host configuration are supported: | ||
|
||
1. DSN host configuration as URL: | ||
1. An old-style Oracle connection string, for backwards compatibility: | ||
a. `hosts: ["user/[email protected]:1521/ORCLPDB1.localdomain"]` | ||
b. `hosts: ["user/[email protected]:1521/ORCLPDB1.localdomain as sysdba"]` | ||
|
||
2. DSN host configuration: | ||
2. DSN configuration as a URL: | ||
a. `hosts: ["oracle://user:[email protected]:1521/ORCLPDB1.localdomain?sysdba=1"]` | ||
|
||
3. DSN configuration as a logfmt-encoded parameter list: | ||
a. `hosts: ['user="user" password="pass" connectString="0.0.0.0:1521/ORCLPDB1.localdomain"']` | ||
b. `hosts: ['user="user" password="password" connectString="host:port/service_name" sysdba=true']` | ||
|
||
Note: If the password contains the backslash (`\`) character, it must be escaped with a backslash. For example, if the password is `my\_password`, it should be written as `my\\_password`. | ||
DSN host configuration is the recommended configuration type as it supports the use of special characters in the password. | ||
|
||
In a URL any special characters should be URL encoded. | ||
|
||
The username and password to connect to the database can be provided as values to `username` and `password` keys of `sql.yml`. | ||
In the logfmt-encoded DSN format, if the password contains a backslash character (`\`), it must be escaped with another backslash. For example, if the password is `my\_password`, it must be written as `my\\_password`. | ||
|
||
The username and password to connect to the database can be provided as values to the `username` and `password` keys of `sql.yml`. | ||
|
||
[source,yml] | ||
---- | ||
|
@@ -901,6 +908,7 @@ The username and password to connect to the database can be provided as values t | |
response_format: variables | ||
---- | ||
|
||
|
||
:edit_url: | ||
|
||
[float] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,19 +48,24 @@ Then, Metricbeat can be launched. | |
|
||
*Host Configuration* | ||
|
||
The following two types of host configurations are supported: | ||
The following types of host configuration are supported: | ||
|
||
1. Old style host configuration for backwards compatibility: | ||
1. An old-style Oracle connection string, for backwards compatibility: | ||
a. `hosts: ["user/[email protected]:1521/ORCLPDB1.localdomain"]` | ||
b. `hosts: ["user/[email protected]:1521/ORCLPDB1.localdomain as sysdba"]` | ||
|
||
2. DSN host configuration: | ||
2. DSN configuration as a URL: | ||
a. `hosts: ["oracle://user:[email protected]:1521/ORCLPDB1.localdomain?sysdba=1"]` | ||
|
||
3. DSN configuration as a logfmt-encoded parameter list: | ||
a. `hosts: ['user="user" password="pass" connectString="0.0.0.0:1521/ORCLPDB1.localdomain"']` | ||
b. `hosts: ['user="user" password="password" connectString="host:port/service_name" sysdba=true']` | ||
|
||
DSN host configuration is the recommended way to configure the Oracle Metricbeat Module as it supports the usage of special characters in the password. | ||
DSN host configuration is the recommended configuration type as it supports the use of special characters in the password. | ||
|
||
In a URL any special characters should be URL encoded. | ||
|
||
Note: If the password contains the backslash (`\`) character, it must be escaped with a backslash. For example, if the password is `my\_password`, it should be written as `my\\_password`. | ||
In the logfmt-encoded DSN format, if the password contains a backslash character (`\`), it must be escaped with another backslash. For example, if the password is `my\_password`, it must be written as `my\\_password`. | ||
|
||
[float] | ||
== Metricsets | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -859,19 +859,26 @@ Then, Metricbeat can be launched. | |
|
||
===== Host Configuration for Oracle | ||
|
||
The following two types of host configurations are supported: | ||
The following types of host configuration are supported: | ||
|
||
1. DSN host configuration as URL: | ||
1. An old-style Oracle connection string, for backwards compatibility: | ||
a. `hosts: ["user/[email protected]:1521/ORCLPDB1.localdomain"]` | ||
b. `hosts: ["user/[email protected]:1521/ORCLPDB1.localdomain as sysdba"]` | ||
|
||
2. DSN host configuration: | ||
2. DSN configuration as a URL: | ||
a. `hosts: ["oracle://user:[email protected]:1521/ORCLPDB1.localdomain?sysdba=1"]` | ||
|
||
3. DSN configuration as a logfmt-encoded parameter list: | ||
a. `hosts: ['user="user" password="pass" connectString="0.0.0.0:1521/ORCLPDB1.localdomain"']` | ||
b. `hosts: ['user="user" password="password" connectString="host:port/service_name" sysdba=true']` | ||
|
||
Note: If the password contains the backslash (`\`) character, it must be escaped with a backslash. For example, if the password is `my\_password`, it should be written as `my\\_password`. | ||
DSN host configuration is the recommended configuration type as it supports the use of special characters in the password. | ||
|
||
In a URL any special characters should be URL encoded. | ||
|
||
The username and password to connect to the database can be provided as values to `username` and `password` keys of `sql.yml`. | ||
In the logfmt-encoded DSN format, if the password contains a backslash character (`\`), it must be escaped with another backslash. For example, if the password is `my\_password`, it must be written as `my\\_password`. | ||
|
||
The username and password to connect to the database can be provided as values to the `username` and `password` keys of `sql.yml`. | ||
|
||
[source,yml] | ||
---- | ||
|
@@ -887,4 +894,4 @@ The username and password to connect to the database can be provided as values t | |
sql_queries: | ||
- query: SELECT METRIC_NAME, VALUE FROM V$SYSMETRIC WHERE GROUP_ID = 2 and METRIC_NAME LIKE '%' | ||
response_format: variables | ||
---- | ||
---- |