Skip to content

Commit 8a2ed76

Browse files
authored
[Metricbeat] Make Oracle module GA (#16833)
1 parent 2e09734 commit 8a2ed76

17 files changed

+34
-27
lines changed

CHANGELOG.next.asciidoc

+1
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
260260
- Release Zookeeper/connection module as GA. {issue}14281[14281] {pull}17043[17043]
261261
- Add support for CouchDB v2 {issue}16352[16352] {pull}16455[16455]
262262
- Replace vpc metricset into vpn, transitgateway and natgateway metricsets. {pull}16892[16892]
263+
- Release Oracle module as GA. {issue}14279[14279] {pull}16833[16833]
263264

264265
*Packetbeat*
265266

Jenkinsfile

+2
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,8 @@ def withBeatsEnv(Closure body){
574574
"TEST_COVERAGE=true",
575575
"RACE_DETECTOR=true",
576576
"PYTHON_ENV=${WORKSPACE}/python-env",
577+
"TEST_TAGS=oracle",
578+
"DOCKER_PULL=0",
577579
]){
578580
deleteDir()
579581
unstash 'source'

metricbeat/docs/modules/oracle.asciidoc

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ This file is generated! See scripts/mage/docs_collector.go
66
[role="xpack"]
77
== Oracle module
88

9-
beta[]
10-
119
This is the https://www.oracle.com[Oracle] module for Metricbeat. It is under active development with feedback from the community. A single Metricset for Tablespace monitoring is added so the community can start gathering metrics from their nodes and contributing to the module.
1210

1311
[float]

metricbeat/docs/modules/oracle/performance.asciidoc

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ This file is generated! See scripts/mage/docs_collector.go
55
[[metricbeat-metricset-oracle-performance]]
66
=== Oracle performance metricset
77

8-
beta[]
9-
108
include::../../../../x-pack/metricbeat/module/oracle/performance/_meta/docs.asciidoc[]
119

1210

metricbeat/docs/modules/oracle/tablespace.asciidoc

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ This file is generated! See scripts/mage/docs_collector.go
55
[[metricbeat-metricset-oracle-tablespace]]
66
=== Oracle tablespace metricset
77

8-
beta[]
9-
108
include::../../../../x-pack/metricbeat/module/oracle/tablespace/_meta/docs.asciidoc[]
119

1210

metricbeat/docs/modules_list.asciidoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ This file is generated! See scripts/mage/docs_collector.go
195195
.1+| .1+| |<<metricbeat-metricset-nginx-stubstatus,stubstatus>>
196196
|<<metricbeat-module-openmetrics,Openmetrics>> beta[] |image:./images/icon-no.png[No prebuilt dashboards] |
197197
.1+| .1+| |<<metricbeat-metricset-openmetrics-collector,collector>> beta[]
198-
|<<metricbeat-module-oracle,Oracle>> beta[] |image:./images/icon-yes.png[Prebuilt dashboards are available] |
199-
.2+| .2+| |<<metricbeat-metricset-oracle-performance,performance>> beta[]
200-
|<<metricbeat-metricset-oracle-tablespace,tablespace>> beta[]
198+
|<<metricbeat-module-oracle,Oracle>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
199+
.2+| .2+| |<<metricbeat-metricset-oracle-performance,performance>>
200+
|<<metricbeat-metricset-oracle-tablespace,tablespace>>
201201
|<<metricbeat-module-php_fpm,PHP_FPM>> |image:./images/icon-no.png[No prebuilt dashboards] |
202202
.2+| .2+| |<<metricbeat-metricset-php_fpm-pool,pool>>
203203
|<<metricbeat-metricset-php_fpm-process,process>>
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM store/oracle/database-enterprise:12.2.0.1
1+
FROM docker.elastic.co/observability-ci/database-enterprise:12.2.0.1
22

3-
HEALTHCHECK --interval=1s --retries=90 CMD /usr/bin/echo 'select 1' | sqlplus sys/Oradoc_db1@localhost:1521/ORCLPDB1.localdomain AS SYSDBA
3+
HEALTHCHECK --interval=1s --retries=90 CMD /usr/bin/echo 'select 1' | /u01/app/oracle/product/12.2.0/dbhome_1/bin/sqlplus sys/Oradoc_db1@localhost:1521/ORCLPDB1.localdomain AS SYSDBA

x-pack/metricbeat/module/oracle/_meta/fields.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Oracle"
33
description: Oracle database module
44
short_config: false
5-
release: beta
5+
release: ga
66
fields:
77
- name: oracle
88
type: group
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
variants:
2+
- ORACLE_VERSION: 12.2.0.1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '2.3'
2+
3+
services:
4+
oracle:
5+
image: docker.elastic.co/observability-ci/database-enterprise:${ORACLE_VERSION:-12.2.0.1}-1
6+
build:
7+
context: ./_meta
8+
args:
9+
ORACLE_VERSION: ${ORACLE_VERSION:-12.2.0.1}
10+
ports:
11+
- 1521
12+
- 5500

x-pack/metricbeat/module/oracle/fields.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/metricbeat/module/oracle/performance/_meta/fields.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- name: performance
22
type: group
33
description: Performance related metrics on a single database instance
4-
release: beta
4+
release: ga
55
fields:
66
- name: machine
77
type: keyword

x-pack/metricbeat/module/oracle/performance/metricset.go

-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
"github.com/pkg/errors"
1111

12-
"github.com/elastic/beats/v7/libbeat/common/cfgwarn"
1312
"github.com/elastic/beats/v7/metricbeat/mb"
1413
"github.com/elastic/beats/v7/x-pack/metricbeat/module/oracle"
1514
)
@@ -35,8 +34,6 @@ type MetricSet struct {
3534
// New creates a new instance of the MetricSet. New is responsible for unpacking
3635
// any MetricSet specific configuration options if there are any.
3736
func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
38-
cfgwarn.Beta("The oracle 'performance' metricset is beta.")
39-
4037
config := oracle.ConnectionDetails{}
4138
if err := base.Module().UnpackConfig(&config); err != nil {
4239
return nil, errors.Wrap(err, "error parsing config file")

x-pack/metricbeat/module/oracle/performance/metricset_test.go

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
22
// or more contributor license agreements. Licensed under the Elastic License;
33
// you may not use this file except in compliance with the Elastic License.
4-
54
// +build integration
5+
// +build oracle
66

77
package performance
88

@@ -12,13 +12,15 @@ import (
1212
_ "github.com/godror/godror"
1313

1414
"github.com/elastic/beats/v7/libbeat/common"
15+
"github.com/elastic/beats/v7/libbeat/tests/compose"
1516
mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing"
1617
"github.com/elastic/beats/v7/x-pack/metricbeat/module/oracle"
1718
)
1819

1920
func TestData(t *testing.T) {
20-
t.Skip("Skip until a proper Docker image is setup for Metricbeat")
21-
f := mbtest.NewReportingMetricSetV2WithContext(t, getConfig())
21+
r := compose.EnsureUp(t, "oracle")
22+
23+
f := mbtest.NewReportingMetricSetV2WithContext(t, getConfig(r.Host()))
2224

2325
findKey := func(key string) func(common.MapStr) bool {
2426
return func(in common.MapStr) bool {
@@ -54,11 +56,11 @@ func TestData(t *testing.T) {
5456
}
5557
}
5658

57-
func getConfig() map[string]interface{} {
59+
func getConfig(host string) map[string]interface{} {
5860
return map[string]interface{}{
5961
"module": "oracle",
6062
"metricsets": []string{"performance"},
61-
"hosts": []string{oracle.GetOracleConnectionDetails("localhost")},
63+
"hosts": []string{oracle.GetOracleConnectionDetails(host)},
6264
"username": "sys",
6365
"password": "Oradoc_db1",
6466
}

x-pack/metricbeat/module/oracle/tablespace/_meta/fields.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- name: tablespace
22
type: group
33
description: tablespace
4-
release: beta
4+
release: ga
55
fields:
66
- name: name
77
type: keyword

x-pack/metricbeat/module/oracle/tablespace/metricset.go

-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
"github.com/pkg/errors"
1111

12-
"github.com/elastic/beats/v7/libbeat/common/cfgwarn"
1312
"github.com/elastic/beats/v7/metricbeat/mb"
1413
"github.com/elastic/beats/v7/x-pack/metricbeat/module/oracle"
1514
)
@@ -35,8 +34,6 @@ type MetricSet struct {
3534
// New creates a new instance of the MetricSet. New is responsible for unpacking
3635
// any MetricSet specific configuration options if there are any.
3736
func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
38-
cfgwarn.Beta("The oracle 'tablespace' metricset is beta.")
39-
4037
config := oracle.ConnectionDetails{}
4138
if err := base.Module().UnpackConfig(&config); err != nil {
4239
return nil, errors.Wrap(err, "error parsing config file")

x-pack/metricbeat/module/oracle/tablespace/metricset_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// you may not use this file except in compliance with the Elastic License.
44

55
// +build integration
6+
// +build oracle
67

78
package tablespace
89

@@ -17,7 +18,6 @@ import (
1718
)
1819

1920
func TestData(t *testing.T) {
20-
t.Skip("Skip until a proper Docker image is setup for Metricbeat")
2121
r := compose.EnsureUp(t, "oracle")
2222

2323
f := mbtest.NewReportingMetricSetV2WithContext(t, getConfig(r.Host()))

0 commit comments

Comments
 (0)