Comments (12)
Is it unsolved mystery?
_
from prometheus_oracle_exporter.
After extensive testing, i have managed to reproduce your error.
It seemes have something to do how the exporter connects to the database.
When i use direct connect instead of TNS i get this error.
You are using direct connection instead of TNSNAMES.ora.
MONITORING/ORACLE_EXPORTER@pele5:1521/armsdev2
So please, configure your connections via TNSNAMES.ora
TNSNAMES.ora:
pele5_tns =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = pele5)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = armsdev2)
)
)
MONITORING/ORACLE_EXPORTER@pele5_tns
from prometheus_oracle_exporter.
Thanks for assistant.
I was able to connect with TNS setting.
Now I have another problem, logs in attach.
logs.zip
time="2018-11-06T14:47:34+03:00" level=info msg="Starting Prometheus Oracle exporter 1.1.0" source="main.go:938"
time="2018-11-06T14:47:34+03:00" level=info msg="Config loaded: /home/monitoring/monitoring/conf/oracle_exporter/oracle_exporter.yml" source="main.go:940"
time="2018-11-06T14:47:34+03:00" level=info msg="Listening on :9161" source="main.go:948"
Errors in file :
ORA-21500: internal error code, arguments: [17147], [0x7FBC80050CC0], [], [], [], [], [], []
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
-------------------- -------- -------------------- ----------------------------
skgudmp()+188 call kgdsdst() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgeriv_int()+199 call skgudmp() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgeric1()+142 call kgeriv_int() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgherror()+368 call kgeric1() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kghfrmrg()+2886 call kgherror() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kghrsp()+703 call kghfrmrg() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kpuhhrsm()+239 call kghrsp() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kpufhndl0()+853 call kpuhhrsm() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
_cgo_071d400d4b2a_C call kpufhndl0() 000000000 ? 000000000 ?
func_OCIHandleFree( 000000000 ? 000000000 ?
)+26 cgo-gcc-prolog 000000000 ? 000000000 ?
:237
github.com/mattn/go call _cgo_071d400d4b2a_C 000000000 ? 000000000 ?
-oci8._Cfunc_OCIHan func_OCIHandleFree( 000000000 ? 000000000 ?
dleFree()+77 _cgo_g ) 000000000 ? 000000000 ?
otypes.go:505
github.com/mattn/go call github.com/mattn/go 000000000 ? 000000000 ?
-oci8.(*OCI8Stmt).C -oci8._Cfunc_OCIHan 000000000 ? 000000000 ?
lose.func1()+94 oci dleFree() 000000000 ? 000000000 ?
8.go:942
github.com/mattn/go call github.com/mattn/go 000000000 ? 000000000 ?
-oci8.(*OCI8Stmt).C -oci8.(*OCI8Stmt).C 000000000 ? 000000000 ?
lose()+109 oci8.go: lose.func1() 000000000 ? 000000000 ?
942
runtime.call32()+59 call github.com/mattn/go 000000000 ? 000000000 ?
-oci8.(*OCI8Stmt).C 000000000 ? 000000000 ?
lose() 000000000 ? 000000000 ?
runtime.runfinq()+4 call runtime.call32() 000000000 ? 000000000 ?
91 mfinal.go:223 000000000 ? 000000000 ?
000000000 ? 000000000 ?
runtime.goexit()+1 call runtime.runfinq() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
Call stack signature: 0x8685d3eaa595fa4d
call stack performance statistics:
total : 0.020000 sec
setup : 0.000000 sec
stack unwind : 0.000000 sec
symbol translation : 0.020000 sec
printing the call stack: 0.000000 sec
printing frame data : 0.000000 sec
printing argument data : 0.000000 sec
----- End of Call Stack Trace -----
from prometheus_oracle_exporter.
Hello.
i tried to compile the sourcecode one more time for ver. 11.2.0.4.0 and everything is working now.
Thank You so much!
from prometheus_oracle_exporter.
Strange.....Do you already scrape the exporter with prometheus?
Can you give me your prometheus config?
How big is your Database?
Do not use "tablerows, lobbytes, tablebytes, indexbytes" for testing.
The Exporter need only "SELECT ANY DICTIONARY, SELECT ANY TABLE"....
from prometheus_oracle_exporter.
Yes, we are receiving data.
Prometheus config:
global:
scrape_interval: 1m
scrape_timeout: 20s
evaluation_interval: 20s
external_labels:
monitor: lhpm01-01
alerting:
alertmanagers:
- static_configs:
- targets:
- lhpm01-01:19093
scheme: http
path_prefix: /alertmanager
timeout: 10s
rule_files:
- /home/monitoring/monitoring/conf/prometheus/rules/*.yml
scrape_configs:
- job_name: automatique
scrape_interval: 1m
scrape_timeout: 20s
metrics_path: /metrics
scheme: http
file_sd_configs:
- files:
- /home/monitoring/monitoring/conf/prometheus/files_sd/auto_*.yml
refresh_interval: 1m
relabel_configs:
- source_labels: [__address__]
separator: ;
regex: '[A-Za-z0-9-]+:[0-9]+([/a-z]+)(#[a-z0-9]+)?'
target_label: __metrics_path__
replacement: $1
action: replace
- source_labels: [__address__]
separator: ;
regex: '[A-Za-z0-9-]+:[0-9]+[/a-z]+(#([a-z0-9]+))?'
target_label: team
replacement: $2
action: replace
- source_labels: [__address__]
separator: ;
regex: ([A-Za-z0-9-]+):[0-9]+[/a-z]+(#[a-z0-9]+)?
target_label: node
replacement: $1
action: replace
- source_labels: [__address__]
separator: ;
regex: ([A-Za-z0-9-]+:[0-9]+)[/a-z]+(#[a-z0-9]+)?
target_label: __address__
replacement: $1
action: replace
metric_relabel_configs:
- source_labels: [mountpoint]
separator: ;
regex: .+
target_label: system
replacement: env
action: replace
- source_labels: [mountpoint]
separator: ;
regex: /home/([a-z]+)_.+
target_label: team
replacement: $1
action: replace
- source_labels: [mountpoint]
separator: ;
regex: /home/ora[a-z0-9]+
target_label: system
replacement: oracle
action: replace
- source_labels: [mountpoint]
separator: ;
regex: /home/jenkins
target_label: system
replacement: jenkins
action: replace
- source_labels: [mountpoint]
separator: ;
regex: /home/nexus
target_label: system
replacement: nexus
action: replace
- source_labels: [mountpoint]
separator: ;
regex: /([a-z0-9_]+)?
target_label: system
replacement: infra
action: replace
- source_labels: [mountpoint]
separator: ;
regex: /home/([a-z0-9_-]+)
target_label: env_name
replacement: $1
action: replace
from prometheus_oracle_exporter.
My Database size: 303Gb.
I used:
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
from prometheus_oracle_exporter.
I use only /metrics .
In Prometheus targets: http://pele5:9161/metrics . I didn't modify configuration Exporter.
from prometheus_oracle_exporter.
Long time no see. I have undecided problem.
I do the following actions.
ORALCE TNS:
[oracle@pele5 /home/oracle]# lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 25-OCT-2018 13:41:16
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pele5)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 26-MAY-2017 13:01:21
Uptime 19 days 22 hr. 12 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /oracle/diag/tnslsnr/pele5/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pele5)(PORT=1521)))
Services Summary...
Service "armsdev2" has 1 instance(s).
Instance "armsdev2", status READY, has 1 handler(s) for this service...
Service "armsdev2XDB" has 1 instance(s).
Instance "armsdev2", status READY, has 1 handler(s) for this service...
The command completed successfully
I created file: /home/monitoring/tns/TNSNAMES.ora
pele5_tns =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = pele5)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = armsdev2)
)
)
Edit run script Exporter:
#!/bin/sh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/monitoring/monitoring/data/oracle_exporter ORACLE_HOME=/oracle/product/11.2.0/db_1 TNS_ADMIN=/home/monitoring/tns
Edit config Exporter:
connections:
- connection: MONITORING/ORACLE_EXPORTER@pele5:1521/pele5_tns
database: armsdev2
instance: armsdev2
alertlog:
- file: /data/oracle/diag/rdbms/develop/DEVELOP/trace/alert_DEVELOP.log
ignoreora:
- ORA-00001
- ORA-01033
- ORA-01041
- ORA-01089
- ORA-01555
- ORA-28
- ORA-235
- ORA-609
- ORA-3136
queries:
- name: sample1
sql: select 1 from dual
Try to srart, Exporter log:
[monitoring@pele5 /home/monitoring]# tailf monitoring/log/oracle_exporter.log
time="2018-10-25T14:40:34+03:00" level=info msg="Connect OK, Inital query failed: MONITORING/ORACLE_EXPORTER@pele5:1521/pele5_tns" source="main.go:789"
time="2018-10-25T14:40:34+03:00" level=info msg="open /data/oracle/diag/rdbms/develop/DEVELOP/trace/alert_DEVELOP.log: no such file or directory" source="alertlog.go:120"
time="2018-10-25T14:40:37+03:00" level=info msg="Starting Prometheus Oracle exporter 1.1.0" source="main.go:938"
time="2018-10-25T14:40:37+03:00" level=info msg="Config loaded: /home/monitoring/monitoring/conf/oracle_exporter/oracle_exporter.yml" source="main.go:940"
time="2018-10-25T14:40:37+03:00" level=info msg="Listening on :9161" source="main.go:948"
time="2018-10-25T14:40:58+03:00" level=info msg="Connect OK, Inital query failed: MONITORING/ORACLE_EXPORTER@pele5:1521/pele5_tns" source="main.go:789"
time="2018-10-25T14:40:58+03:00" level=info msg="open /data/oracle/diag/rdbms/develop/DEVELOP/trace/alert_DEVELOP.log: no such file or directory" source="alertlog.go:120"
time="2018-10-25T14:41:01+03:00" level=info msg="Connect OK, Inital query failed: MONITORING/ORACLE_EXPORTER@pele5:1521/pele5_tns" source="main.go:789"
time="2018-10-25T14:41:01+03:00" level=info msg="open /data/oracle/diag/rdbms/develop/DEVELOP/trace/alert_DEVELOP.log: no such file or directory" source="alertlog.go:120"
time="2018-10-25T14:41:34+03:00" level=info msg="Connect OK, Inital query failed: MONITORING/ORACLE_EXPORTER@pele5:1521/pele5_tns" source="main.go:789"
time="2018-10-25T14:41:34+03:00" level=info msg="open /data/oracle/diag/rdbms/develop/DEVELOP/trace/alert_DEVELOP.log: no such file or directory" source="alertlog.go:120"
time="2018-10-25T14:42:01+03:00" level=info msg="Connect OK, Inital query failed: MONITORING/ORACLE_EXPORTER@pele5:1521/pele5_tns" source="main.go:789"
time="2018-10-25T14:42:01+03:00" level=info msg="open /data/oracle/diag/rdbms/develop/DEVELOP/trace/alert_DEVELOP.log: no such file or directory" source="alertlog.go:120"
ORACLE listener log:
[oracle@pele5 /home/oracle]# less /oracle/diag/tnslsnr/pele5/listener/alert/log.xml
<msg time='2018-10-25T14:41:01.845+03:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='pele5'
host_addr='172.30.168.25'>
<txt>25-OCT-2018 14:41:01 * (CONNECT_DATA=(SERVICE_NAME=pele5_tns)(CID=(PROGRAM=oracle_exporter)(HOST=pele5)(USER=monitoring))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.30.168.25)(PORT=26073)) * establish * pele5_tns * 12514
</txt>
</msg>
<msg time='2018-10-25T14:41:01.845+03:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='pele5'
host_addr='172.30.168.25'>
<txt>TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
</txt>
</msg>
<msg time='2018-10-25T14:41:01.854+03:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='pele5'
host_addr='172.30.168.25'>
<txt>25-OCT-2018 14:41:01 * (CONNECT_DATA=(SERVICE_NAME=pele5_tns)(CID=(PROGRAM=oracle_exporter)(HOST=pele5)(USER=monitoring))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.30.168.25)(PORT=26075)) * establish * pele5_tns * 12514
</txt>
</msg>
<msg time='2018-10-25T14:41:01.854+03:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='pele5'
host_addr='172.30.168.25'>
<txt>TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
</txt>
</msg>
Looking forward to your reply!
from prometheus_oracle_exporter.
You are still using OCI Connect string:
connections:
- connection: MONITORING/ORACLE_EXPORTER@pele5:1521/pele5_tns
database: armsdev2
This does not work, please use this:
connections:
- connection: MONITORING/ORACLE_EXPORTER@pele5_tns
database: armsdev2
You can test propper TNS settings with:
$ sqlplus MONITORING/ORACLE_EXPORTER@pele5_tns
from prometheus_oracle_exporter.
Sorry for the late response. This is a realy weired problem. It seems more a oracle Problem. So some questions:
Did you apply all patches PSU/CPU for your release?
You could try to compile the sourcecode with your specific libraries. I have used for the binaries the latest instantclient from oracle (12.2). We are using in our company 12.1....without any issue!!!
When i have some time i will do it myself. you have 11.2, right?
from prometheus_oracle_exporter.
Hello, thank you for Your responds.
Did you apply all patches PSU/CPU for your release? no, i did not. should i?
you have 11.2, right? yes, my ver. is 11.2.0.4.0
i tried to compile the sourcecode with our specific libraries. below, you can find a picture 'what i did and what happened after that'
yum install go
mkdir -p ~/go ~/gocode ~/Devel/go ~/Projects/go
export GOPATH=~/go
export GOPATH=~/gocode
export GOPATH=~/Devel/go
export GOPATH=~/Projects/go
echo "export GOPATH=~/go" >> ~/.bash_profile
echo "export PATH=$PATH:$GOPATH/bin" >> ~/.bash_profile
go get github.com/freenetdigital/prometheus_oracle_exporter
# pkg-config --cflags oci8
Package oci8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `oci8.pc'
to the PKG_CONFIG_PATH environment variable
No package 'oci8' found
pkg-config: exit status 1
from prometheus_oracle_exporter.
Related Issues (20)
- Custom query doesn't work how described in doc HOT 1
- document missing the below details HOT 3
- tried running the exporter on oracle vm but getting the attached error message HOT 1
- alertlog usage HOT 2
- Oracle exporter installation issues HOT 1
- oracledb_alert metric are not working HOT 8
- Missing columns in output HOT 3
- Labels are missing in metrics HOT 3
- Timeout needed on connection level
- Limiting the scrape scope per database or instance
- custom scrape interval HOT 1
- grafana dashboard HOT 1
- Compile error in alertlog.go HOT 3
- In Custom metrics include the value in the result
- go get is failing because of change in the folder format in prometheus/common HOT 2
- Database name in configuration has no effect other than labeling the scrape output HOT 1
- Auditing events from Prometheus monitoring
- static listener and dynamic listener HOT 1
- possible to create a docker container
- Unsupported type value error occurs for a custom metric query which checks alertlog of pdb database
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 prometheus_oracle_exporter.