Skip to content

1.5.2 #157

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

Merged
merged 18 commits into from
Dec 3, 2024
Merged

1.5.2 #157

Show file tree
Hide file tree
Changes from all 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
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ ENV GOARCH=${GOARCH:-amd64}
# note: the 23ai arm drivers are not in yum yet, when they are can switch this to just use yum and not need
# to wget the driver for arm. also note that the permalink for otn download of drivers does not have version
# in it, and does not appear to be a link vith version in it, so that link is very brittle and could break build

# second note: moved back to 21c drivers due to adb-s non-root connection issue. for 23ai, change rpm to
# oracle-instantclient-release-23ai-el8 and paths below s/21/23/
RUN if [ "$GOARCH" = "amd64" ]; then \
microdnf install -y oracle-instantclient-release-23ai-el8 && microdnf install -y oracle-instantclient-basic && \
microdnf install -y oracle-instantclient-release-el8 && microdnf install -y oracle-instantclient-basic && \
microdnf install glibc-2.28-251.0.2.el8_10.4 \
; else \
microdnf install wget libaio && \
Expand All @@ -49,9 +52,8 @@ RUN if [ "$GOARCH" = "amd64" ]; then \
microdnf install glibc-2.28-251.0.2.el8_10.4 \
; fi

ENV LD_LIBRARY_PATH=/usr/lib/oracle/23/client64/lib:usr/lib/oracle/19.24/client64/lib
ENV PATH=$PATH:/usr/lib/oracle/23/client64/bin:usr/lib/oracle/19.24/client64/bin
ENV ORACLE_HOME=/usr/lib/oracle/23/client64
ENV LD_LIBRARY_PATH=/usr/lib/oracle/21/client64/lib:usr/lib/oracle/19.24/client64/lib
ENV PATH=$PATH:/usr/lib/oracle/21/client64/bin:usr/lib/oracle/19.24/client64/bin

COPY --from=build /go/src/oracledb_exporter/oracle-db-appdev-monitoring /oracledb_exporter
ADD ./default-metrics.toml /default-metrics.toml
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ OS_TYPE ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
ARCH_TYPE ?= $(subst x86_64,amd64,$(patsubst i%86,386,$(ARCH)))
GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
VERSION ?= 1.5.1
VERSION ?= 1.5.2
LDFLAGS := -X main.Version=$(VERSION)
GOFLAGS := -ldflags "$(LDFLAGS) -s -w"
BUILD_ARGS = --build-arg VERSION=$(VERSION)
Expand Down
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ Contributions are welcome - please see [contributing](CONTRIBUTING.md).

## Release Notes

### Version 1.5.2, December 2, 2024

This release includes the following changes:

- Update the metric defintion for tablespace usage to report more accurate temp space usage.
- Revert InstantClient to 21c version due to ADB connectivity issue.
- Update documentation to explain how to obtain credentials from a wallet.
- Fix race condition on err variable in scrape() func (by @valrusu).
- Updated some third-party dependencies.

Thank you to the following people for their suggestions and contributions:

- [@aureliocirella](https://github.com/aureliocirella)
- [@mitoeth](https://github.com/mitoeth)
- [@valrusu](https://github.com/valrusu)

### Version 1.5.1, October 28, 2024

This release includes the following changes:
Expand Down Expand Up @@ -147,12 +163,10 @@ Currently, we plan to address the following key features:
- 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,
- Provide the option to have the Oracle client outside of the container image, e.g., on a shared volume,
- Implement the ability to update the configuration dynamically, i.e., without a restart,
- Implement support for exporting logs, including audit logs for example, from the database,
- Implement support for tracing within the database, e.g., using an execution context ID provide by an external caller,
- Provide additional pre-built Grafana dashboards,
- Integration with Spring Observability, e.g., Micrometer,
- Provide additional documentation and samples, and
- Integrate with the Oracle Database Operator for Kubernetes.
- Integration with Spring Observability, e.g., Micrometer, and
- Provide additional documentation and samples.

## Standard metrics

Expand Down
4 changes: 2 additions & 2 deletions collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Exporter struct {
password string
connectString string
configDir string
externalAuth bool
externalAuth bool
duration, error prometheus.Gauge
totalScrapes prometheus.Counter
scrapeErrors *prometheus.CounterVec
Expand All @@ -56,7 +56,7 @@ type Config struct {
ConnectString string
DbRole string
ConfigDir string
ExternalAuth bool
ExternalAuth bool
MaxIdleConns int
MaxOpenConns int
CustomMetrics string
Expand Down
12 changes: 11 additions & 1 deletion default-metrics.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,17 @@ SELECT
dtum.used_percent
FROM dba_tablespace_usage_metrics dtum, dba_tablespaces dt
WHERE dtum.tablespace_name = dt.tablespace_name
ORDER by tablespace
and dt.contents != 'TEMPORARY'
union
SELECT
dt.tablespace_name as tablespace,
'TEMPORARY' as type,
dt.tablespace_size - dt.free_space as bytes,
dt.tablespace_size as max_bytes,
dt.free_space as free,
((dt.tablespace_size - dt.free_space) / dt.tablespace_size)
FROM dba_temp_free_space dt
order by tablespace
'''

[[metric]]
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:
start_period: 30s

exporter:
image: container-registry.oracle.com/database/observability-exporter:1.5.1
image: container-registry.oracle.com/database/observability-exporter:1.5.2
container_name: exporter
ports:
- 9161:9161
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ require (
github.com/BurntSushi/toml v1.4.0
github.com/alecthomas/kingpin/v2 v2.4.0
github.com/go-kit/log v0.2.1
github.com/godror/godror v0.44.8
github.com/oracle/oci-go-sdk/v65 v65.77.1
github.com/godror/godror v0.45.2
github.com/oracle/oci-go-sdk/v65 v65.79.0
github.com/prometheus/client_golang v1.20.5
github.com/prometheus/common v0.60.1
github.com/prometheus/exporter-toolkit v0.12.0
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ github.com/godror/godror v0.44.7 h1:fGxtxozidwBR3C1FVTrMiH77maOnMA4HqltDS/YM7O0=
github.com/godror/godror v0.44.7/go.mod h1:KJwMtQpK9o3WdEiNw7qvgSk827YDLj9MV/bXSzvUzlo=
github.com/godror/godror v0.44.8 h1:20AAK8BWZasXuRkX/vhbSpnAqBMXB9fngsdfMJ4pNgU=
github.com/godror/godror v0.44.8/go.mod h1:KJwMtQpK9o3WdEiNw7qvgSk827YDLj9MV/bXSzvUzlo=
github.com/godror/godror v0.45.1 h1:MnnUcU9/9rpLV3/Amv6kiT82pAlR0v5MFk/EXdKrblU=
github.com/godror/godror v0.45.1/go.mod h1:44hxVDzvFSwc+yGyRM+riCLNAY5SwZkUfLzVTh5MXCg=
github.com/godror/godror v0.45.2 h1:rkXxmD+/QdKz0PTOuSfEmWNFCHnKpWS8b8HUl+5V7us=
github.com/godror/godror v0.45.2/go.mod h1:44hxVDzvFSwc+yGyRM+riCLNAY5SwZkUfLzVTh5MXCg=
github.com/godror/knownpb v0.1.2 h1:icMyYsYVpGmzhoVA01xyd0o4EaubR31JPK1UxQWe4kM=
github.com/godror/knownpb v0.1.2/go.mod h1:zs9hH+lwj7mnPHPnKCcxdOGz38Axa9uT+97Ng+Nnu5s=
github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
Expand Down Expand Up @@ -60,6 +64,8 @@ github.com/oracle/oci-go-sdk/v65 v65.75.0 h1:tifYRSqCjxANJb0xnMSZ6N2bF2xGyqcCIMg
github.com/oracle/oci-go-sdk/v65 v65.75.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
github.com/oracle/oci-go-sdk/v65 v65.77.1 h1:gqjTXIUWvTihkn470AclxSAMcR1JecqjD2IUtp+sDIU=
github.com/oracle/oci-go-sdk/v65 v65.77.1/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
github.com/oracle/oci-go-sdk/v65 v65.79.0 h1:Tv9L1XTKWkdXtSViMbP+dA93WunquvW++/2s5pOvOgU=
github.com/oracle/oci-go-sdk/v65 v65.79.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.20.2 h1:5ctymQzZlyOON1666svgwn3s6IKWgfbjsejTMiXIyjg=
Expand Down