go build -ldflags "-X github.com/prometheus/common/version.Version=0.8.1 -X github.com/prometheus/common/version.Revision=91693a054d7316ba635deadf855f5cd9eab57a9e -X github.com/prometheus/common/version.Branch=multidb_devs -X github.com/prometheus/common/version.BuildDate=20230904-09:03:15 -X github.com/prometheus/common/version.BuildUser=peekjef72@pc_collab" -tags "netgo,usergo,static,mssql" -o "mssql_exporter" .
build an environment definition file with :
- mssql tag enabled
e.g.: .env_mssql
GO111MODULE=on
GOSUMDB=off
GOFLAGS="-tags=mssql"
load env and play make to build mssql_exporter
. .env_mssql
export GOENV=.env_mssql
make build-mssql
requirement: oracle instant client v19 downloaded on oracle site (rpm or pkg).
- oracle-instantclient19.6-basiclite
build an environment definition file with :
- oracle tag enabled
- CGO_CGLAGS set to oracle include stand
- CGO_LDFLAGS set to oracle dynamic libraries stand
- PKG_CONFIG_PATH set to where oci8.pc stands
e.g.: .env_oracle
GO111MODULE=on
GOSUMDB=off
GOFLAGS="-tags=oracle"
CGO_CFLAGS=-I/usr/include/oracle/19.16/client64/
CGO_LDFLAGS=-L/usr/lib/oracle/19.16/client64/lib
PKG_CONFIG_PATH=/home/users/XXXXX/go/src/sql_exporter
load env and play make to build oracle_exporter
. .env_oracle
export GOENV=.env_oracle
make build-ora
Pre-requirements: clibdrivers
build an environment definition file with :
- db2 tag enabled
- CGO_CGLAGS set to db2 include stand
- CGO_LDFLAGS set to db2 dynamic libraries stand
e.g.: .env_db2
GO111MODULE=on
GOSUMDB=off
GOFLAGS="-tags=db2"
CGO_CFLAGS=-I/opt/db2_exporter/lib/clidriver/include
CGO_LDFLAGS=-L/opt/db2_exporter/lib/clidriver/lib
load env and play make to build db2_exporter
. .env_db2
export GOENV=.env_db2
make build-db2
build an environment definition file with :
- hana tag enabled
e.g.: .env_hana
GO111MODULE=on
GOSUMDB=off
GOFLAGS="-tags=hana"
load env and play make to build hanasql_exporter
. .env_hana
export GOENV=.env_hana
make build-hana