Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Metricbeat] Remove requirement of connect as sysdba in Oracle #18182

Merged
merged 5 commits into from
May 5, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add aggregation aligner as a config parameter for googlecloud stackdriver metricset. {issue}17141[[17141] {pull}17719[17719]
- Move the perfmon metricset to GA. {issue}16608[16608] {pull}17879[17879]
- Add static mapping for metricsets under aws module. {pull}17614[17614] {pull}17650[17650]
- Remove requirement to connect as sysdba in Oracle module {issue}15846[15846] {pull}18182[18182]

*Packetbeat*

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/oracle.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ metricbeat.modules:
metricsets: ["tablespace", "performance"]
enabled: true
period: 10s
hosts: ["oracle://user:pass@localhost:1521/ORCLPDB1.localdomain?sysdba=1"]
hosts: ["user:pass@0.0.0.0:1521/ORCLPDB1.localdomain"]

# username: ""
# password: ""
Expand Down
2 changes: 1 addition & 1 deletion x-pack/metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ metricbeat.modules:
metricsets: ["tablespace", "performance"]
enabled: true
period: 10s
hosts: ["oracle://user:pass@localhost:1521/ORCLPDB1.localdomain?sysdba=1"]
hosts: ["user:pass@0.0.0.0:1521/ORCLPDB1.localdomain"]

# username: ""
# password: ""
Expand Down
2 changes: 1 addition & 1 deletion x-pack/metricbeat/module/oracle/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
metricsets: ["tablespace", "performance"]
enabled: true
period: 10s
hosts: ["oracle://user:pass@localhost:1521/ORCLPDB1.localdomain?sysdba=1"]
hosts: ["user:pass@0.0.0.0:1521/ORCLPDB1.localdomain"]

# username: ""
# password: ""
Expand Down
4 changes: 0 additions & 4 deletions x-pack/metricbeat/module/oracle/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ func NewConnection(c *ConnectionDetails) (*sql.DB, error) {
params.Password = c.Password
}

if params.IsSysDBA == false {
return nil, errors.New("a user with DBA permissions are required, check your connection details on field `hosts`")
}

db, err := sql.Open("godror", params.StringWithPassword())
if err != nil {
return nil, errors.Wrap(err, "could not open database")
Expand Down
2 changes: 1 addition & 1 deletion x-pack/metricbeat/module/oracle/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func GetOracleEnvServiceName() string {
serviceName := os.Getenv("ORACLE_SERVICE_NAME")

if len(serviceName) == 0 {
serviceName = "ORCLPDB1.localdomain"
serviceName = "ORCLCDB.localdomain"
}
return serviceName
}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/metricbeat/modules.d/oracle.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
metricsets: ["tablespace", "performance"]
enabled: true
period: 10s
hosts: ["oracle://user:pass@localhost:1521/ORCLPDB1.localdomain?sysdba=1"]
hosts: ["user:pass@0.0.0.0:1521/ORCLPDB1.localdomain"]

# username: ""
# password: ""
Expand Down