-
Notifications
You must be signed in to change notification settings - Fork 121
/
Copy pathoracle-database-example.yml
64 lines (64 loc) · 3.12 KB
/
oracle-database-example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# NOTE: 'database' is an experimental API at this time
# ref: /~https://github.com/newrelic/nri-flex/blob/master/docs/experimental/db.md
# You can run multiple queries by adding queries in apis block, as below
# Below example has multiple nri-flex blocks to demonstrate multiple queries with different intervals.
---
integrations:
- name: nri-flex
interval: 60s
config:
name: OracleDbFlex
secrets:
login:
kind: local # Use Flex local/internal decryption function
key: N3wR3lic! # Your pass_phrase to encrypt/decrypt the database access credentials info
data: <==YOUR ENCRYPTED LOGIN INFO from the command below==>
# Run the following command to generate a encrypted login info, paste it to the above -> data
# nri-flex -encrypt_pass 'username=<YOUR USERNAME>,password=<YOUR PASSWORD>' -pass_phrase 'N3wR3lic!'
# The decrypted username and password will be used to exchange for access_token
type: equal
apis:
- database: oracle
db_conn: oracle://${secret.login:username}:${secret.login:password}@rds-name.region.rds.amazonaws.com:1521/db-name
logging:
open: true
custom_attributes: # applies to all queries
host: OracleDB
db_async: true # process queries async
db_queries:
- name: OracleDBProcesses
run: SELECT sess.process FROM v$session sess, v$sql sql WHERE sql.sql_id(+) = sess.sql_id AND sess.type = 'USER' # grab all processes from OracleDB
custom_attributes: # can apply additional at a nested level
attype: show processes
host: OracleDB
- database: oracle
db_conn: oracle://${secret.login:username}:${secret.login:password}@rds-name.region.rds.amazonaws.com:1521/db-name
logging:
open: true
custom_attributes: # applies to all queries
host: OracleDB
db_async: true # process queries async
db_queries:
- name: OracleDBProcessesTest2
run: SELECT sess.process FROM v$session sess, v$sql sql WHERE sql.sql_id(+) = sess.sql_id AND sess.type = 'USER' # grab all processes related information from OracleDB
custom_attributes: # can apply additional at a nested level
attype: show processes
host: OracleDB
- name: nri-flex
interval: 90s
config:
name: OracleDbFlex
apis:
- database: oracle
db_conn: oracle://${secret.login:username}:${secret.login:password}@rds-name.region.rds.amazonaws.com:1521/db-name
logging:
open: true
custom_attributes: # applies to all queries
host: OracleDB
db_async: true # process queries async
db_queries:
- name: OracleDBProcessesIds
run: SELECT sess.process FROM v$session sess, v$sql sql WHERE sql.sql_id(+) = sess.sql_id AND sess.type = 'USER' # grab all processes ids from OracleDB
custom_attributes: # can apply additional at a nested level
attype: show processes
host: OracleDB