Comments (6)
I was able to remedy the issue by recompiling the binary off of the 0.2.0 tag. I had to make some changes to get it to compile. Specifically, this in main.go
:
m := make(map[string]string)
for i, colName := range cols {
val := columnPointers[i].(*interface{})
switch (*val).(type) {
case float64:
m[strings.ToLower(colName)] = strconv.FormatFloat((*val).(float64), 'f', -1, 64)
default:
m[strings.ToLower(colName)] = (*val).(string)
}
}
I had to add a switch statement for the type assertions because it would panic otherwise. I doubt that it's related, though.
If the maintainers are open to it, could we leave this issue open and I'll submit a PR against it in the next few weeks?
from oracledb_exporter.
Hi wbh1. Thanks for your feedback. I'm looking after your PR.
from oracledb_exporter.
After watching your request, I saw that you used a date without specifying the expected format and it could come from there. Could you try explain the date format in your request?
from oracledb_exporter.
The where sample_time >= sysdate - (1/24/60)
part of the query limits the SELECT to the most recent 1 minute of data, if that is what you are referring to.
from oracledb_exporter.
Closing this since my issue is no longer present after building from master.
If anyone in the future wishes to use Vagrant to build this repo (since CGO cross compilation can be a nightmare), here's my Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "centos/7"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder ".", "/oracledb_exporter"
config.vm.synced_folder ".", "/vagrant", disabled: true
# IMPORTANT:
# Download the Oracle Instant Client Basic & Devel RPMs, and place them in the ./ora directory
# in order for this to work
config.vm.provision "file", source: "./ora", destination: "/tmp/"
config.vm.provision "shell", inline: <<-SHELL
# Install Go
curl -Os https://dl.google.com/go/go1.12.4.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.12.4.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" > /etc/profile.d/go.sh
source /etc/profile
yum install -y git
cd /vagrant && go get -d ./...
# Install Oracle
yum -y install /tmp/ora/oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm
yum -y install /tmp/ora/oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm
echo /usr/lib/oracle/12.2/client64/lib > /etc/ld.so.conf.d/oracle-instantclient.conf
ldconfig
# Set ENV variables
echo "export PKG_CONFIG_PATH=/vagrant" > /etc/profile.d/pkgconfig.sh
SHELL
end
from oracledb_exporter.
Posted workaround on
#33
from oracledb_exporter.
Related Issues (20)
- Multiple remote source (DB oracle), one instance oracledb_exporter
- Oracle binaries in docker image too old for autonomous DB with TLS HOT 1
- caller=collector.go:262 level=error errorpingingoracle:="unknown URL option: wallet_location" HOT 6
- Data is not coming from prometheus to grafana
- panic: runtime error: invalid memory address or nil pointer dereference HOT 2
- Some sql queries are taking time to execute, cause of which none of the queries are scraping data in time.
- Requesting queries with different execution intervals HOT 1
- level=error errorpingingoracle:="missing port in address" HOT 7
- Where is the actual queries that are running from the default metrics? HOT 1
- docker hub version is too old (iamseth/oracledb_exporter)
- Allow using multiple environment variables like DATA_SOURCE_NAME to query different databases HOT 1
- ASM sysdba DATA_SOURCE_NAME wrong example in README.md
- Read data source from file (Docker secrets)
- Incorrect Tablespace values HOT 3
- Release 0.6.0 not satrt HOT 5
- Unable to use custom metrics configuration file HOT 1
- Publish Docker images based on the "scratch" base image
- Unable to obtain oracle version or status info as value
- "advanced negotiation error: during receive service header: network excpetion: ora-12269"
- How to use Multi-Target Support? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oracledb_exporter.