Skip to content

Commit c5596cc

Browse files
1.5.2 (#157)
* upgrade godror * revert to instant client 21 * update the query used to get tablespace free, used, etc., to properly handle temp tablespaces * introduce externalAuth * do not set OH --------- Signed-off-by: Mark Nelson <[email protected]> Co-authored-by: John Lathouwers <[email protected]>
1 parent 0b6946e commit c5596cc

File tree

8 files changed

+47
-15
lines changed

8 files changed

+47
-15
lines changed

Diff for: Dockerfile

+6-4
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ ENV GOARCH=${GOARCH:-amd64}
3838
# note: the 23ai arm drivers are not in yum yet, when they are can switch this to just use yum and not need
3939
# to wget the driver for arm. also note that the permalink for otn download of drivers does not have version
4040
# in it, and does not appear to be a link vith version in it, so that link is very brittle and could break build
41+
42+
# second note: moved back to 21c drivers due to adb-s non-root connection issue. for 23ai, change rpm to
43+
# oracle-instantclient-release-23ai-el8 and paths below s/21/23/
4144
RUN if [ "$GOARCH" = "amd64" ]; then \
42-
microdnf install -y oracle-instantclient-release-23ai-el8 && microdnf install -y oracle-instantclient-basic && \
45+
microdnf install -y oracle-instantclient-release-el8 && microdnf install -y oracle-instantclient-basic && \
4346
microdnf install glibc-2.28-251.0.2.el8_10.4 \
4447
; else \
4548
microdnf install wget libaio && \
@@ -49,9 +52,8 @@ RUN if [ "$GOARCH" = "amd64" ]; then \
4952
microdnf install glibc-2.28-251.0.2.el8_10.4 \
5053
; fi
5154

52-
ENV LD_LIBRARY_PATH=/usr/lib/oracle/23/client64/lib:usr/lib/oracle/19.24/client64/lib
53-
ENV PATH=$PATH:/usr/lib/oracle/23/client64/bin:usr/lib/oracle/19.24/client64/bin
54-
ENV ORACLE_HOME=/usr/lib/oracle/23/client64
55+
ENV LD_LIBRARY_PATH=/usr/lib/oracle/21/client64/lib:usr/lib/oracle/19.24/client64/lib
56+
ENV PATH=$PATH:/usr/lib/oracle/21/client64/bin:usr/lib/oracle/19.24/client64/bin
5557

5658
COPY --from=build /go/src/oracledb_exporter/oracle-db-appdev-monitoring /oracledb_exporter
5759
ADD ./default-metrics.toml /default-metrics.toml

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ OS_TYPE ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
33
ARCH_TYPE ?= $(subst x86_64,amd64,$(patsubst i%86,386,$(ARCH)))
44
GOOS ?= $(shell go env GOOS)
55
GOARCH ?= $(shell go env GOARCH)
6-
VERSION ?= 1.5.1
6+
VERSION ?= 1.5.2
77
LDFLAGS := -X main.Version=$(VERSION)
88
GOFLAGS := -ldflags "$(LDFLAGS) -s -w"
99
BUILD_ARGS = --build-arg VERSION=$(VERSION)

Diff for: README.md

+18-4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ Contributions are welcome - please see [contributing](CONTRIBUTING.md).
2727

2828
## Release Notes
2929

30+
### Version 1.5.2, December 2, 2024
31+
32+
This release includes the following changes:
33+
34+
- Update the metric defintion for tablespace usage to report more accurate temp space usage.
35+
- Revert InstantClient to 21c version due to ADB connectivity issue.
36+
- Update documentation to explain how to obtain credentials from a wallet.
37+
- Fix race condition on err variable in scrape() func (by @valrusu).
38+
- Updated some third-party dependencies.
39+
40+
Thank you to the following people for their suggestions and contributions:
41+
42+
- [@aureliocirella](https://github.com/aureliocirella)
43+
- [@mitoeth](https://github.com/mitoeth)
44+
- [@valrusu](https://github.com/valrusu)
45+
3046
### Version 1.5.1, October 28, 2024
3147

3248
This release includes the following changes:
@@ -147,12 +163,10 @@ Currently, we plan to address the following key features:
147163
- Implement connection storm protection - prevent the exporter from repeatedly connecting when the credentials fail, to prevent a storm of connections causing accounts to be locked across a large number of databases,
148164
- Provide the option to have the Oracle client outside of the container image, e.g., on a shared volume,
149165
- Implement the ability to update the configuration dynamically, i.e., without a restart,
150-
- Implement support for exporting logs, including audit logs for example, from the database,
151166
- Implement support for tracing within the database, e.g., using an execution context ID provide by an external caller,
152167
- Provide additional pre-built Grafana dashboards,
153-
- Integration with Spring Observability, e.g., Micrometer,
154-
- Provide additional documentation and samples, and
155-
- Integrate with the Oracle Database Operator for Kubernetes.
168+
- Integration with Spring Observability, e.g., Micrometer, and
169+
- Provide additional documentation and samples.
156170

157171
## Standard metrics
158172

Diff for: collector/collector.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type Exporter struct {
3636
password string
3737
connectString string
3838
configDir string
39-
externalAuth bool
39+
externalAuth bool
4040
duration, error prometheus.Gauge
4141
totalScrapes prometheus.Counter
4242
scrapeErrors *prometheus.CounterVec
@@ -56,7 +56,7 @@ type Config struct {
5656
ConnectString string
5757
DbRole string
5858
ConfigDir string
59-
ExternalAuth bool
59+
ExternalAuth bool
6060
MaxIdleConns int
6161
MaxOpenConns int
6262
CustomMetrics string

Diff for: default-metrics.toml

+11-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,17 @@ SELECT
6262
dtum.used_percent
6363
FROM dba_tablespace_usage_metrics dtum, dba_tablespaces dt
6464
WHERE dtum.tablespace_name = dt.tablespace_name
65-
ORDER by tablespace
65+
and dt.contents != 'TEMPORARY'
66+
union
67+
SELECT
68+
dt.tablespace_name as tablespace,
69+
'TEMPORARY' as type,
70+
dt.tablespace_size - dt.free_space as bytes,
71+
dt.tablespace_size as max_bytes,
72+
dt.free_space as free,
73+
((dt.tablespace_size - dt.free_space) / dt.tablespace_size)
74+
FROM dba_temp_free_space dt
75+
order by tablespace
6676
'''
6777

6878
[[metric]]

Diff for: docker-compose/compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ services:
4343
start_period: 30s
4444

4545
exporter:
46-
image: container-registry.oracle.com/database/observability-exporter:1.5.1
46+
image: container-registry.oracle.com/database/observability-exporter:1.5.2
4747
container_name: exporter
4848
ports:
4949
- 9161:9161

Diff for: go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ require (
88
github.com/BurntSushi/toml v1.4.0
99
github.com/alecthomas/kingpin/v2 v2.4.0
1010
github.com/go-kit/log v0.2.1
11-
github.com/godror/godror v0.44.8
12-
github.com/oracle/oci-go-sdk/v65 v65.77.1
11+
github.com/godror/godror v0.45.2
12+
github.com/oracle/oci-go-sdk/v65 v65.79.0
1313
github.com/prometheus/client_golang v1.20.5
1414
github.com/prometheus/common v0.60.1
1515
github.com/prometheus/exporter-toolkit v0.12.0

Diff for: go.sum

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ github.com/godror/godror v0.44.7 h1:fGxtxozidwBR3C1FVTrMiH77maOnMA4HqltDS/YM7O0=
2828
github.com/godror/godror v0.44.7/go.mod h1:KJwMtQpK9o3WdEiNw7qvgSk827YDLj9MV/bXSzvUzlo=
2929
github.com/godror/godror v0.44.8 h1:20AAK8BWZasXuRkX/vhbSpnAqBMXB9fngsdfMJ4pNgU=
3030
github.com/godror/godror v0.44.8/go.mod h1:KJwMtQpK9o3WdEiNw7qvgSk827YDLj9MV/bXSzvUzlo=
31+
github.com/godror/godror v0.45.1 h1:MnnUcU9/9rpLV3/Amv6kiT82pAlR0v5MFk/EXdKrblU=
32+
github.com/godror/godror v0.45.1/go.mod h1:44hxVDzvFSwc+yGyRM+riCLNAY5SwZkUfLzVTh5MXCg=
33+
github.com/godror/godror v0.45.2 h1:rkXxmD+/QdKz0PTOuSfEmWNFCHnKpWS8b8HUl+5V7us=
34+
github.com/godror/godror v0.45.2/go.mod h1:44hxVDzvFSwc+yGyRM+riCLNAY5SwZkUfLzVTh5MXCg=
3135
github.com/godror/knownpb v0.1.2 h1:icMyYsYVpGmzhoVA01xyd0o4EaubR31JPK1UxQWe4kM=
3236
github.com/godror/knownpb v0.1.2/go.mod h1:zs9hH+lwj7mnPHPnKCcxdOGz38Axa9uT+97Ng+Nnu5s=
3337
github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
@@ -60,6 +64,8 @@ github.com/oracle/oci-go-sdk/v65 v65.75.0 h1:tifYRSqCjxANJb0xnMSZ6N2bF2xGyqcCIMg
6064
github.com/oracle/oci-go-sdk/v65 v65.75.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
6165
github.com/oracle/oci-go-sdk/v65 v65.77.1 h1:gqjTXIUWvTihkn470AclxSAMcR1JecqjD2IUtp+sDIU=
6266
github.com/oracle/oci-go-sdk/v65 v65.77.1/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
67+
github.com/oracle/oci-go-sdk/v65 v65.79.0 h1:Tv9L1XTKWkdXtSViMbP+dA93WunquvW++/2s5pOvOgU=
68+
github.com/oracle/oci-go-sdk/v65 v65.79.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
6369
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
6470
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
6571
github.com/prometheus/client_golang v1.20.2 h1:5ctymQzZlyOON1666svgwn3s6IKWgfbjsejTMiXIyjg=

0 commit comments

Comments
 (0)