You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+48-33
Original file line number
Diff line number
Diff line change
@@ -23,9 +23,9 @@ Contributions are welcome - please see [contributing](CONTRIBUTING.md).
23
23
-[Developer notes](#developer-notes)
24
24
25
25
26
-
# Roadmap
26
+
##Roadmap
27
27
28
-
## Version 1.0
28
+
###Version 1.0
29
29
30
30
The first production release, v1.0, includes the following features:
31
31
@@ -41,7 +41,7 @@ Note that this exporter uses a different Oracle Database driver which in turn us
41
41
42
42
The interfaces for this version have been kept as close as possible to those of earlier alpha releases in this repository to assist with migration. However, it should be expected that there may be breaking changes in future releases.
43
43
44
-
## Plans
44
+
###Plans
45
45
46
46
We always welcome input on features you would like to see supported. Please open an issue in this repository with your suggestions.
47
47
@@ -59,7 +59,7 @@ Currently, we plan to address the following key features:
59
59
- Provide additional documentation and samples, and
60
60
- Integrate with the Oracle Database Operator for Kubernetes.
61
61
62
-
# Standard metrics
62
+
##Standard metrics
63
63
64
64
The following metrics are exposed currently.
65
65
@@ -89,7 +89,7 @@ The following metrics are exposed currently.
89
89
- oracledb_resource_current_utilization
90
90
- oracledb_resource_limit_value
91
91
92
-
# Database permissions required
92
+
##Database permissions required
93
93
94
94
For the built-in default metrics, the database user that the exporter uses to connect to the Oracle Database instance must have the `SELECT_CATALOG_ROLE` privilege and/or `SELECT` permission on the following tables.
95
95
@@ -104,7 +104,7 @@ For the built-in default metrics, the database user that the exporter uses to co
104
104
- v$session
105
105
- v$resource_limit
106
106
107
-
# Installation
107
+
##Installation
108
108
109
109
There are a number of ways to run the exporter. In this section you will find information on running the exporter:
110
110
@@ -113,11 +113,11 @@ There are a number of ways to run the exporter. In this section you will find i
113
113
- In [Kubernetes](#kubernetes)
114
114
- As a [standalone binary](#standalone-binary)
115
115
116
-
## Docker, Podman, etc.
116
+
###Docker, Podman, etc.
117
117
118
118
You can run the exporter in a local container using a conatiner image from [Oracle Container Registry](https://container-registry.oracle.com). The container image is available in the "observability-exporter" repository in the "Database" category. No authentication or license presentment/acceptance are required to pull this image from the registry.
119
119
120
-
### Oracle Database
120
+
####Oracle Database
121
121
122
122
If you need an Oracle Database to test the exporter, you can use this command to start up an instance of [Oracle Database 23c Free](https://www.oracle.com/database/free/) which also requires no authentication or license presentment/acceptance to pull the image.
You need to give the exporter the connection details for the Oracle Database that you want it to run against. You can use a simple connection, or a wallet.
158
158
159
-
#### Simple connection
159
+
#####Simple connection
160
160
161
161
For a simple connection, you will provide the details using these variables:
For a wallet connection, you must first set up the wallet. If you are using Oracle Autonomous Database, for example, you can download the wallet from the Oracle Cloud Infrastructure (OCI) console.
181
181
@@ -202,7 +202,7 @@ docker run -it --rm \
202
202
```
203
203
204
204
205
-
## Test/demo environment with Docker Compose
205
+
###Test/demo environment with Docker Compose
206
206
207
207
If you would like to set up a test environment with the exporter, you can use the provided "Docker Compose" file in this repository which will start an Oracle Database instance, the exporter, Prometheus and Grafana.
208
208
@@ -219,11 +219,11 @@ Once the containers are all running, you can access the services using these URL
219
219
-[Prometheus](http://localhost:9000) - try a query for "oracle".
220
220
-[Grafana](http://localhost:3000) - username is "admin" and password is "grafana". An Oracle Database dashboard is provisioned and configured to use data from the exporter.
221
221
222
-
## Kubernetes
222
+
###Kubernetes
223
223
224
224
To run the exporter in Kubernetes, you need to complete the following steps. All steps must be completed in the same Kunernetes namespace. The examples below assume you want to use a namespace called `exporter`, you must change the commands if you wish to use a different namespace.
225
225
226
-
### Create a secret with credentials for connecting to the Oracle Database
226
+
####Create a secret with credentials for connecting to the Oracle Database
227
227
228
228
Create a secret with the Oracle database user and password that the exporter should use to connect to the database using this command. You must specify the correct user and password for your environment. This example uses `pdbadmin` as the user and `Welcome12345` as the password:
Create a config map with the wallet (if you are using one) using this command. Run this command in the `wallet` directory you created earlier.
240
240
@@ -251,7 +251,7 @@ kubectl create cm db-metrics-tns-admin \
251
251
-n exporter
252
252
```
253
253
254
-
### Create a config map for you metrics definition file (optional)
254
+
####Create a config map for you metrics definition file (optional)
255
255
256
256
If you have defined any [custom metrics](#custom-metrics), you must create a config map for the metrics definition file. For example, if you created a configuration file called `txeventq-metrics.toml`, then create the config map with this command:
257
257
@@ -261,7 +261,7 @@ kubectl create cm db-metrics-txeventq-exporter-config \
261
261
-n exporter
262
262
```
263
263
264
-
### Deploy the Oracle Database Observability exporter
264
+
####Deploy the Oracle Database Observability exporter
265
265
266
266
A sample Kubernetes manifest is provided [here](/kubernetes/metrics-exporter-deployment.yaml). You must edit this file to set the namespace you wish to use, the database connect string to use, and if you have any custom metrics, you will need to uncomment and customize some sections in this file.
267
267
@@ -283,7 +283,7 @@ You can view the exporter's logs with this command:
283
283
kubectl logs -f svc/metrics-exporter -n exporter
284
284
```
285
285
286
-
### Create a Kubernetes service for the exporter
286
+
####Create a Kubernetes service for the exporter
287
287
288
288
Create a Kubernetes service to allow access to the exporter pod(s). A sample Kubernetes manifest is provided [here](/kubernetes/metrics-exporter-service.yaml). You may need to customize this file to update the namespace.
289
289
@@ -293,7 +293,7 @@ Once you have made any necessary udpates, apply the file to your cluster using t
293
293
kubectl aspply -f metrics-exporter-service.yaml
294
294
```
295
295
296
-
### Create a Kubernetes service monitor
296
+
####Create a Kubernetes service monitor
297
297
298
298
Create a Kubernetes service monitor to tell Prometheus (for example) to collect metrics from the exporter. A sample Kubernetes manifest is provided [here](/kubernetes/metrics-service-monitor.yaml). You may need to customize this file to update the namespace.
299
299
@@ -303,7 +303,7 @@ Once you have made any necessary udpates, apply the file to your cluster using t
303
303
kubectl aspply -f metrics-service-monitor.yaml
304
304
```
305
305
306
-
### Configure a Prometheus target (optional)
306
+
####Configure a Prometheus target (optional)
307
307
308
308
You may need to update your Prometheus configuration to add a target. If so, you can use this example job definition as a guide:
309
309
@@ -317,12 +317,12 @@ You may need to update your Prometheus configuration to add a target. If so, yo
See [Grafana dashboards](#grafana-dashboards) below.
323
323
324
324
325
-
## Standalone binary
325
+
### Standalone binary
326
326
327
327
Pre-compiled versions for Linux 64 bit can be found under [releases](https://github.com/oracle/oracle-db-appdev-monitoring/releases).
328
328
@@ -355,7 +355,7 @@ Usage of oracledb_exporter:
355
355
Path to configuration file that can enable TLS or authentication.
356
356
```
357
357
358
-
# Custom metrics
358
+
##Custom metrics
359
359
360
360
The exporter allows definition of arbitrary custom metrics in a TOML file. To specify this file to the
361
361
exporter, you can:
@@ -448,7 +448,7 @@ oracledb_test_value_2 2
448
448
You can find [working examples](./custom-metrics-example/custom-metrics.toml) of custom metrics for slow queries, big queries and top 100 tables.
449
449
An exmaple of [custom metrics for Transacational Event Queues](./custom-metrics-example/txeventq-metrics.toml) is also provided.
450
450
451
-
## Customize metrics in a container image
451
+
###Customize metrics in a container image
452
452
453
453
If you run the exporter as a container image and want to include your custom metrics in the image itself, you can use the following example `Dockerfile` to create a new image:
A sample Grafana dashboard definition is provided [in this directory](/docker-compose/grafana/dashboards). You can import this into your Grafana instance, and set it to use the Prometheus datasource that you have defined for the Prometheus instance that is collecting metrics from the exporter.
464
464
@@ -467,7 +467,7 @@ The dashboard shows some basic information, as shown below:
467
467

468
468
469
469
470
-
# Monitoring Transactional Event Queues
470
+
##Monitoring Transactional Event Queues
471
471
472
472
[Oracle Transactional Event Queues](https://docs.oracle.com/en/database/oracle/oracle-database/21/adque/index.html) ("TxEventQ") is a fault-tolerant, scalable, real-time messaging backbone offered by converged Oracle Database that allows you to build an enterprise-class event-driven architectures.
473
473
@@ -477,7 +477,7 @@ The exporter includes a set of metrics for monitoring TxEventQ and a pre-built G
477
477
478
478
> Note: The metrics are written for Oracle Database 21c or later.
479
479
480
-
## How to create a topic
480
+
###How to create a topic
481
481
482
482
If you need to create a topic to monitor, you can use these statements to create and start a topic, and create a subscriber:
483
483
@@ -538,11 +538,11 @@ begin
538
538
end;
539
539
```
540
540
541
-
## Metrics definitions
541
+
###Metrics definitions
542
542
543
543
The metrics definitions are provided in [this file](./custom-metrics-example/txeventq-metrics.toml). You need to provide this file to the exporter, e.g., by adding it to your container image, or creating a Kubernetes config map containing the file and mounting that config map as a volume in your deployment. You also need to set the `CUSTOM_METRICS` environment variable to the location of this file.
544
544
545
-
## Additional database permissions
545
+
###Additional database permissions
546
546
547
547
The database user that the exporter uses to connect to the database will also need additional permissions, which can be granted with these statements. This example assumes the exporter connects with the username "exporter":
548
548
@@ -558,7 +558,7 @@ grant select on sys.aq$_queue_shards to exporter;
558
558
grantselecton user_queue_partition_assignment_table to exporter;
559
559
```
560
560
561
-
## Grafana dashboard
561
+
###Grafana dashboard
562
562
563
563
A Grafana dashboard for Transactional Event Queues is provided [in this file](./docker-compose/grafana/dashboards/txeventq.json). This can be imported into your Grafana environment. Choose the Prometheus datasource that is collecting metrics from the exporter.
564
564
@@ -568,7 +568,7 @@ The dashboard will look like this:
568
568
569
569

570
570
571
-
# Developer notes
571
+
##Developer notes
572
572
573
573
The exporter itself is fairly simple. The initialization is done as follows:
574
574
@@ -590,7 +590,7 @@ For each element (of `Metric` type), a call to the `ScrapeMetric` function will
590
590
The `ScrapeGenericValues` function will read the information from the `Metric` structure and, depending on the parameters, will generate the metrics to return. In particular, it will use the `GeneratePrometheusMetrics` function which will make SQL calls to the database.
591
591
592
592
593
-
## Docker/container build
593
+
###Docker/container build
594
594
595
595
To build a container image, run the following command:
596
596
@@ -599,7 +599,7 @@ make docker
599
599
```
600
600
601
601
602
-
## Building Binaries
602
+
###Building Binaries
603
603
604
604
Run build:
605
605
@@ -609,3 +609,18 @@ make go-build
609
609
610
610
This will create binaries and archives inside the `dist` folder for the building operating system.
611
611
612
+
## Contributing
613
+
614
+
This project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md)
615
+
616
+
## Security
617
+
618
+
Please consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process
619
+
620
+
## License
621
+
622
+
Copyright (c) 2016, 2023 Oracle and/or its affiliates.
623
+
624
+
Released under the Universal Permissive License v1.0 as shown at
Copy file name to clipboardExpand all lines: SECURITY.md
+19-15
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,36 @@
1
-
# Reporting Security Vulnerabilities
1
+
# Reporting security vulnerabilities
2
2
3
-
Oracle values the independent security research community, and believes that
4
-
responsible disclosure of security vulnerabilities helps us to ensure the security
5
-
and privacy of all of our users.
3
+
Oracle values the independent security research community and believes that
4
+
responsible disclosure of security vulnerabilities helps us ensure the security
5
+
and privacy of all our users.
6
6
7
7
Please do NOT raise a GitHub Issue to report a security vulnerability. If you
8
-
believe you have found a security vulnerability, then please submit a report to
8
+
believe you have found a security vulnerability, please submit a report to
9
9
[[email protected]][1] preferably with a proof of concept. Please review
10
10
some additional information on [how to report security vulnerabilities to Oracle][2].
11
-
Oracle encourages anyone who contacts Oracle Security to use email encryption, using
11
+
We encourage people who contact Oracle Security to use email encryption using
12
12
[our encryption key][3].
13
13
14
-
Please do not use other channels, or contact the project maintainers
14
+
We ask that you do not use other channels or contact the project maintainers
15
15
directly.
16
16
17
-
For non-vulnerability related security issues, including ideas for new or improved
18
-
security features, you are welcome to post these as GitHub Issues.
17
+
Non-vulnerability related security issues including ideas for new or improved
18
+
security featuresare welcome on GitHub Issues.
19
19
20
-
## Security Updates, Alerts and Bulletins
20
+
## Security updates, alerts and bulletins
21
21
22
-
Oracle issues security updates on a regular cadence. Many of our projects typically include release security fixes in conjunction with the [Oracle Critical Patch Update][3] program. Security updates are released on the
23
-
Tuesday closest to the 17th day of January, April, July and October. A pre-release announcement will be published on the Thursday preceding each release. Additional information, including past advisories, is available on our [security alerts][4]
22
+
Security updates will be released on a regular cadence. Many of our projects
23
+
will typically release security fixes in conjunction with the
24
+
Oracle Critical Patch Update program. Additional
25
+
information, including past advisories, is available on our [security alerts][4]
24
26
page.
25
27
26
-
## Security-Related Information
28
+
## Security-related information
27
29
28
-
Oracle will provide security-related information in our documentation. The information can be a threat model, best practices for secure use, or any known security issues. Please note
29
-
that labs and example code are intended to demonstrate a concept. These examples should not be used for production use without ensuring that the code is hardened, and in compliance with common security practices.
30
+
We will provide security related information such as a threat model, considerations
31
+
for secure use, or any known security issues in our documentation. Please note
32
+
that labs and sample code are intended to demonstrate a concept and may not be
0 commit comments