Git Product home page Git Product logo

Comments (6)

wbh1 avatar wbh1 commented on May 30, 2024

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.

Yannig avatar Yannig commented on May 30, 2024

Hi wbh1. Thanks for your feedback. I'm looking after your PR.

from oracledb_exporter.

Yannig avatar Yannig commented on May 30, 2024

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.

wbh1 avatar wbh1 commented on May 30, 2024

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.

wbh1 avatar wbh1 commented on May 30, 2024

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.

vschandra avatar vschandra commented on May 30, 2024

Posted workaround on
#33

from oracledb_exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.