oracledb_exporter
oracledb_exporter copied to clipboard
Error log with metricsDesc as unsupported value type
I'm submitting a ...
- [X] bug report
- [ ] feature request
What is the current behavior?
After update the oracle exporter version, metricsDesc shows always the message "unsupported value type"
level=debug metricsDesc="unsupported value type"
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
$ docker run -d --name oracle -p 1521:1521 wnameless/oracle-xe-11g-r2:18.04-apex
$ docker run -d --name oracledb_exporter -v /opt/oracle_exporter/metrics/default-metrics.toml:/opt/oracle_exporter/metrics/default-metrics.toml --link=oracle -p 9161:9161 -e DATA_SOURCE_NAME=system/oracle@oracle/xe ghcr.io/iamseth/oracledb_exporter:0.4.3 --log.level debug --default.metrics /opt/oracle_exporter/metrics/default-metrics.toml --web.listen-address 0.0.0.0:9161 --scrape.interval 30s
What is the expected behavior?
metricsDesc with the correct string from the configuration.
level=debug metricsDesc="{"value_1":"Simple example returning always 1."}"
What is the motivation / use case for changing the behavior?
Loggin of Metric Description.
Please tell us about your environment:
Custom metric:
$ cat /opt/oracle_exporter/metrics/default-metrics.toml
# Simple metric used by molecule tests
[[metric]]
context = "test"
request = "SELECT 1 as value_1 FROM DUAL"
metricsdesc = { value_1 = "Simple example returning always 1." }
Debug log:
ts=2023-04-14T10:59:38.227Z caller=main.go:278 level=debug context=test
ts=2023-04-14T10:59:38.227Z caller=main.go:279 level=debug metricsType="unsupported value type"
ts=2023-04-14T10:59:38.227Z caller=main.go:280 level=debug metricsBuckets="unsupported value type"
ts=2023-04-14T10:59:38.227Z caller=main.go:281 level=debug labels="unsupported value type"
ts=2023-04-14T10:59:38.227Z caller=main.go:282 level=debug fieldToAppend=
ts=2023-04-14T10:59:38.227Z caller=main.go:283 level=debug ignoreZeroResult=false
ts=2023-04-14T10:59:38.227Z caller=main.go:284 level=debug request="SELECT 1 as value_1, 2 as value_2 FROM DUAL"
ts=2023-04-14T10:59:38.227Z caller=main.go:338 level=debug msg="Calling function ScrapeGenericValues()"
ts=2023-04-14T10:59:38.227Z caller=main.go:438 level=debug msg="Calling function GeneratePrometheusMetrics()"
ts=2023-04-14T10:59:38.228Z caller=main.go:276 level=debug msg="About to scrape metric"
ts=2023-04-14T10:59:38.229Z caller=main.go:277 level=debug metricsDesc="unsupported value type"
Version: 0.4.3
With errors there is the same problem:
ts=2023-04-19T12:03:26.894Z caller=main.go:308 level=error msg="Error scraping for" context=test metricsDesc="unsupported value type" since=15m37.979415606s err="Oracle query timed out"
The timeout error was forced to check the log.