Skip to content

Commit 1d4091b

Browse files
authored
update documentation according to internal requirements (#33)
* Update README.md * Add files via upload
1 parent 7930be2 commit 1d4091b

File tree

2 files changed

+67
-48
lines changed

2 files changed

+67
-48
lines changed

README.md

+48-33
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ Contributions are welcome - please see [contributing](CONTRIBUTING.md).
2323
- [Developer notes](#developer-notes)
2424

2525

26-
# Roadmap
26+
## Roadmap
2727

28-
## Version 1.0
28+
### Version 1.0
2929

3030
The first production release, v1.0, includes the following features:
3131

@@ -41,7 +41,7 @@ Note that this exporter uses a different Oracle Database driver which in turn us
4141

4242
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.
4343

44-
## Plans
44+
### Plans
4545

4646
We always welcome input on features you would like to see supported. Please open an issue in this repository with your suggestions.
4747

@@ -59,7 +59,7 @@ Currently, we plan to address the following key features:
5959
- Provide additional documentation and samples, and
6060
- Integrate with the Oracle Database Operator for Kubernetes.
6161

62-
# Standard metrics
62+
## Standard metrics
6363

6464
The following metrics are exposed currently.
6565

@@ -89,7 +89,7 @@ The following metrics are exposed currently.
8989
- oracledb_resource_current_utilization
9090
- oracledb_resource_limit_value
9191

92-
# Database permissions required
92+
## Database permissions required
9393

9494
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.
9595

@@ -104,7 +104,7 @@ For the built-in default metrics, the database user that the exporter uses to co
104104
- v$session
105105
- v$resource_limit
106106

107-
# Installation
107+
## Installation
108108

109109
There are a number of ways to run the exporter. In this section you will find information on running the exporter:
110110

@@ -113,11 +113,11 @@ There are a number of ways to run the exporter. In this section you will find i
113113
- In [Kubernetes](#kubernetes)
114114
- As a [standalone binary](#standalone-binary)
115115

116-
## Docker, Podman, etc.
116+
### Docker, Podman, etc.
117117

118118
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.
119119

120-
### Oracle Database
120+
#### Oracle Database
121121

122122
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.
123123

@@ -152,11 +152,11 @@ docker inspect free23c | grep IPA
152152
"IPAddress": "172.17.0.2",
153153
```
154154

155-
### Exporter
155+
#### Exporter
156156

157157
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.
158158

159-
#### Simple connection
159+
##### Simple connection
160160

161161
For a simple connection, you will provide the details using these variables:
162162

@@ -175,7 +175,7 @@ docker run -it --rm \
175175
container-registry.oracle.com/database/observability-exporter:1.0.0
176176
```
177177

178-
#### Using a wallet
178+
##### Using a wallet
179179

180180
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.
181181

@@ -202,7 +202,7 @@ docker run -it --rm \
202202
```
203203

204204

205-
## Test/demo environment with Docker Compose
205+
### Test/demo environment with Docker Compose
206206

207207
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.
208208

@@ -219,11 +219,11 @@ Once the containers are all running, you can access the services using these URL
219219
- [Prometheus](http://localhost:9000) - try a query for "oracle".
220220
- [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.
221221

222-
## Kubernetes
222+
### Kubernetes
223223

224224
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.
225225

226-
### Create a secret with credentials for connecting to the Oracle Database
226+
#### Create a secret with credentials for connecting to the Oracle Database
227227

228228
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:
229229

@@ -234,7 +234,7 @@ kubectl create secret generic db-secret \
234234
-n exporter
235235
```
236236

237-
### Create a config map for the wallet (optional)
237+
#### Create a config map for the wallet (optional)
238238

239239
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.
240240

@@ -251,7 +251,7 @@ kubectl create cm db-metrics-tns-admin \
251251
-n exporter
252252
```
253253

254-
### Create a config map for you metrics definition file (optional)
254+
#### Create a config map for you metrics definition file (optional)
255255

256256
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:
257257

@@ -261,7 +261,7 @@ kubectl create cm db-metrics-txeventq-exporter-config \
261261
-n exporter
262262
```
263263

264-
### Deploy the Oracle Database Observability exporter
264+
#### Deploy the Oracle Database Observability exporter
265265

266266
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.
267267

@@ -283,7 +283,7 @@ You can view the exporter's logs with this command:
283283
kubectl logs -f svc/metrics-exporter -n exporter
284284
```
285285

286-
### Create a Kubernetes service for the exporter
286+
#### Create a Kubernetes service for the exporter
287287

288288
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.
289289

@@ -293,7 +293,7 @@ Once you have made any necessary udpates, apply the file to your cluster using t
293293
kubectl aspply -f metrics-exporter-service.yaml
294294
```
295295

296-
### Create a Kubernetes service monitor
296+
#### Create a Kubernetes service monitor
297297

298298
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.
299299

@@ -303,7 +303,7 @@ Once you have made any necessary udpates, apply the file to your cluster using t
303303
kubectl aspply -f metrics-service-monitor.yaml
304304
```
305305

306-
### Configure a Prometheus target (optional)
306+
#### Configure a Prometheus target (optional)
307307

308308
You may need to update your Prometheus configuration to add a target. If so, you can use this example job definition as a guide:
309309

@@ -317,12 +317,12 @@ You may need to update your Prometheus configuration to add a target. If so, yo
317317
- metrics-exporter.exporter.svc.cluster.local:9161
318318
```
319319
320-
### Import Grafana dashboard definition(s) (optional)
320+
#### Import Grafana dashboard definition(s) (optional)
321321
322322
See [Grafana dashboards](#grafana-dashboards) below.
323323
324324
325-
## Standalone binary
325+
### Standalone binary
326326
327327
Pre-compiled versions for Linux 64 bit can be found under [releases](https://github.com/oracle/oracle-db-appdev-monitoring/releases).
328328
@@ -355,7 +355,7 @@ Usage of oracledb_exporter:
355355
Path to configuration file that can enable TLS or authentication.
356356
```
357357

358-
# Custom metrics
358+
## Custom metrics
359359

360360
The exporter allows definition of arbitrary custom metrics in a TOML file. To specify this file to the
361361
exporter, you can:
@@ -448,7 +448,7 @@ oracledb_test_value_2 2
448448
You can find [working examples](./custom-metrics-example/custom-metrics.toml) of custom metrics for slow queries, big queries and top 100 tables.
449449
An exmaple of [custom metrics for Transacational Event Queues](./custom-metrics-example/txeventq-metrics.toml) is also provided.
450450

451-
## Customize metrics in a container image
451+
### Customize metrics in a container image
452452

453453
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:
454454

@@ -458,7 +458,7 @@ COPY custom-metrics.toml /
458458
ENTRYPOINT ["/oracledb_exporter", "--custom.metrics", "/custom-metrics.toml"]
459459
```
460460

461-
# Grafana dashboards
461+
## Grafana dashboards
462462

463463
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.
464464

@@ -467,7 +467,7 @@ The dashboard shows some basic information, as shown below:
467467
![](doc/oracledb-dashboard.png)
468468

469469

470-
# Monitoring Transactional Event Queues
470+
## Monitoring Transactional Event Queues
471471

472472
[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.
473473

@@ -477,7 +477,7 @@ The exporter includes a set of metrics for monitoring TxEventQ and a pre-built G
477477

478478
> Note: The metrics are written for Oracle Database 21c or later.
479479
480-
## How to create a topic
480+
### How to create a topic
481481

482482
If you need to create a topic to monitor, you can use these statements to create and start a topic, and create a subscriber:
483483

@@ -538,11 +538,11 @@ begin
538538
end;
539539
```
540540

541-
## Metrics definitions
541+
### Metrics definitions
542542

543543
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.
544544

545-
## Additional database permissions
545+
### Additional database permissions
546546

547547
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":
548548

@@ -558,7 +558,7 @@ grant select on sys.aq$_queue_shards to exporter;
558558
grant select on user_queue_partition_assignment_table to exporter;
559559
```
560560

561-
## Grafana dashboard
561+
### Grafana dashboard
562562

563563
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.
564564

@@ -568,7 +568,7 @@ The dashboard will look like this:
568568

569569
![](./doc/txeventq-dashboard.png)
570570

571-
# Developer notes
571+
## Developer notes
572572

573573
The exporter itself is fairly simple. The initialization is done as follows:
574574

@@ -590,7 +590,7 @@ For each element (of `Metric` type), a call to the `ScrapeMetric` function will
590590
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.
591591

592592

593-
## Docker/container build
593+
### Docker/container build
594594

595595
To build a container image, run the following command:
596596

@@ -599,7 +599,7 @@ make docker
599599
```
600600

601601

602-
## Building Binaries
602+
### Building Binaries
603603

604604
Run build:
605605

@@ -609,3 +609,18 @@ make go-build
609609

610610
This will create binaries and archives inside the `dist` folder for the building operating system.
611611

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
625+
<https://oss.oracle.com/licenses/upl/>
626+
and the MIT License (MIT)

SECURITY.md

+19-15
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,36 @@
1-
# Reporting Security Vulnerabilities
1+
# Reporting security vulnerabilities
22

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.
66

77
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
99
[[email protected]][1] preferably with a proof of concept. Please review
1010
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
1212
[our encryption key][3].
1313

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
1515
directly.
1616

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 features are welcome on GitHub Issues.
1919

20-
## Security Updates, Alerts and Bulletins
20+
## Security updates, alerts and bulletins
2121

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]
2426
page.
2527

26-
## Security-Related Information
28+
## Security-related information
2729

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
33+
sufficiently hardened for production use.
3034

3135
[1]: mailto:[email protected]
3236
[2]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html

0 commit comments

Comments
 (0)