@@ -352,7 +352,7 @@ An unbound growth of those maximums could indicate that the flush operation is t
Similarly to flush statistics, immudb exposes the same set of values for full compaction.
-*Note: these values are gathered for overall compaction that fully rewrites the btree structure. immudb 1.2.3 introduced a new online compaction mode that gradually removes unused btree data during flush operation. This new compaction mode is not included in those charts.*
+_Note: these values are gathered for overall compaction that fully rewrites the btree structure. immudb 1.2.3 introduced a new online compaction mode that gradually removes unused btree data during flush operation. This new compaction mode is not included in those charts._
@@ -497,19 +497,19 @@ the health check tool you can find in the [immudb-tools](https://github.com/code
This simple tool periodically polls immudb, checking the state of every loaded database, and exposes a simple REST endpoint
that can be used by docker or kubernetes probes. You simply have to configure it to talk to immudb, by providing its address
-and some credentials.
+and some credentials.
Then you can poll endpoint `/immustatus` on port 8085. If immudb is operating normally and all databases are responsive, you will get a 200 HTTP return code, and the string "OK". You will get a 500 HTTP code instead, and the string "FAIL" if immudb is not responding.
This configuration snippet shows how to use the `/immustatus` endpoint on kubernetes:
```yaml
- livenessProbe:
- httpGet:
- path: /immustatus
- port: 8085
- failureThreshold: 5
- periodSeconds: 60
+livenessProbe:
+ httpGet:
+ path: /immustatus
+ port: 8085
+ failureThreshold: 5
+ periodSeconds: 60
```
You can find more information about it on its [README](https://github.com/codenotary/immudb-tools/tree/main/immuguard) page.
diff --git a/src/master/production/request-metadata.md b/src/master/production/request-metadata.md
new file mode 100644
index 0000000000..22eb8d6235
--- /dev/null
+++ b/src/master/production/request-metadata.md
@@ -0,0 +1,26 @@
+# Request Metadata
+
+To enhance the auditing process, immudb can be configured to inject request information - such as user identifiers, IP addresses, and other relevant details - into transaction metadata.
+
+
+
+## Enabling request metadata logging
+
+Request metadata logging can be enabled by enabling the `--log-request-metdata` flag of the immudb command (or by setting
+the corresponding `IMMUDB_LOG_REQUEST_METADATA` env var to `TRUE`).
+
+For example, when running the immudb docker image:
+
+```bash
+$ docker run -e IMMUDB_LOG_REQUEST_METADATA=TRUE -d --net host --name immudb codenotary/immudb:latest
+```
+
+### Why should I enable request metadata?
+
+When this functionality is enabled, each transaction includes comprehensive metadata that provides context for the request executed by the immudb server. This metadata allows auditors and administrators to easily retrieve detailed information about the context of each transaction (see how to retrieve transaction metadata from an [SQL table](../develop/sql/querying.md#transaction-metadata)).
+
+Specifically, it enables the identification of who initiated the transaction, from which IP address, and any other pertinent request details. For example, if there is a need to investigate suspicious activity or trace the source of a particular change, this request metadata offers a clear and concise trail of the relevant data.
+
+Note that despite the extra information can increase the storage overhead, the benefits of enhanced transparency and accountability often outweigh the extra storage cost, ensuring that all actions within the database can be thoroughly examined and verified.
+
+
diff --git a/src/master/running/configuration.md b/src/master/running/configuration.md
index a7feda8ab5..1f39db841c 100644
--- a/src/master/running/configuration.md
+++ b/src/master/running/configuration.md
@@ -1,4 +1,3 @@
-
# Configuration
@@ -13,66 +12,67 @@ Settings can be specified as command line options to immudb (see `immudb -h`), i
### Settings
-| Parameter | Default | Description |
-|---------------------------------|------------|------------------------------------------------------------------------------------------------------|
-| `address` | `0.0.0.0` | bind address |
-| `admin-password` | `immudb` | admin password as plain-text or base64 encoded (must be prefixed with 'enc:' if it is encoded) |
-| `auth` | `true` | enable auth |
-| `certificate` | `` | server certificate file path |
-| `clientcas` | `` | clients certificates list. Aka certificate authority |
-| `config` | `` | config file (default path are configs or $HOME. Default filename is immudb. |
-| `detached` | `false` | run immudb in background |
-| `devmode` | `false` | enable dev mode: accept remote connections without auth |
-| `dir` | `./data` | data folder |
-| `force-admin-password` | `false` | if true, reset the admin password to the one passed through admin-password option upon startup |
-| `grpc-reflection` | `true` | GRPC reflection server enabled |
-| `logfile` | `` | log path with filename. E.g. /tmp/immudb/immudb.log |
-| `logformat` | `text` | log format e.g. text/json |
-| `maintenance` | `false` | override the authentication flag |
-| `max-recv-msg-size` | `33554432` | max message size in bytes the server can receive |
-| `max-session-age-time` | infinity | max session age time is a duration after which session will be forcibly closed |
-| `max-session-inactivity-time` | `3m0s` | max session inactivity time is a duration after which an active session is declared inactive by the server. A session is kept active if server is still receiving requests from client (keep-alive or other methods) |
-| `max-sessions` | `100` | maximum number of simultaneously opened sessions |
-| `metrics-server` | `true` | enable or disable Prometheus endpoint |
-| `metrics-server-port` | `9477` | Prometheus endpoint port |
-| `mtls` | `false` | enable mutual tls |
-| `no-histograms` | `false` | disable collection of histogram metrics like query durations |
-| `pgsql-server` | `true` | enable or disable pgsql server |
-| `pgsql-server-port` | `5432` | pgsql server port |
-| `pidfile` | `` | pid path with filename. E.g. /var/run/immudb.pid |
-| `pkey` | `` | server private key path |
-| `port` | `3322` | port number |
-| `pprof` | `false` | add pprof profiling endpoint on the metrics server |
-| `replication-allow-tx-discarding` | `false` | allow precommitted transactions to be discarded if the replica diverges from the primary |
-| `replication-commit-concurrency` | `10` | number of concurrent replications |
-| `replication-is-replica` | `false` | set systemdb and defaultdb as replica |
-| `replication-prefetch-tx-buffer-size` | `100`| maximum number of prefeched transactions |
-| `replication-primary-host` | `` | primary database host (if replica=true) |
-| `replication-primary-password` | `` | password in the primary database used for replication of systemdb and defaultdb |
-| `replication-primary-port` | `3322` | primary database port (if replica=true) (default 3322) |
-| `replication-primary-username` | `` | username in the primary database used for replication of systemdb and defaultdb |
-| `replication-skip-integrity-check` | `false` | disable integrity check when reading data during replication |
-| `replication-sync-acks` | `0` | set a minimum number of replica acknowledgements required before transactions can be committed |
-| `replication-sync-enabled` | `false` | enable synchronous replication |
-| `replication-wait-for-indexing` | `false` | wait for indexing to be up to date during replication |
-| `s3-access-key-id` | `` | s3 access key id |
-| `s3-bucket-name` | `` | s3 bucket name |
-| `s3-endpoint` | `` | s3 endpoint |
-| `s3-external-identifier` | `` | use the remote identifier if there is no local identifier |
-| `s3-instance-metadata-url` | `http://169.254.169.254` | s3 instance metadata url |
-| `s3-location` | `` | s3 location (region) |
-| `s3-path-prefix` | `` | s3 path prefix (multiple immudb instances can share the same bucket if they have different prefixes) |
-| `s3-role` | `` | role name for role-based authentication attempt for s3 storage |
-| `s3-role-enabled` | `false` | enable role-based authentication for s3 storage |
-| `s3-secret-key` | `` | s3 secret access key |
-| `s3-storage` | `false` | enable or disable s3 storage |
-| `session-timeout` | `2m0s` | session timeout is a duration after which an inactive session is forcibly closed by the server |
-| `signingKey` | `` | signature private key path. If a valid one is provided, it enables the cryptographic signature of the root. E.g. "./../test/signer/ec3.key" |
-| `swaggerui` | `true` | Swagger UI enabled |
-| `synced` | `true` | synced mode prevents data lost under unexpected crashes but affects performance |
-| `token-expiry-time` | `1440` | client authentication token expiration time. Minutes |
-| `web-server` | `true` | enable or disable web/console server |
-| `web-server-port` | `8080` | web/console server port |
+| Parameter | Default | Description |
+| ------------------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `address` | `0.0.0.0` | bind address |
+| `admin-password` | `immudb` | admin password as plain-text or base64 encoded (must be prefixed with 'enc:' if it is encoded) |
+| `auth` | `true` | enable auth |
+| `certificate` | `` | server certificate file path |
+| `clientcas` | `` | clients certificates list. Aka certificate authority |
+| `config` | `` | config file (default path are configs or $HOME. Default filename is immudb. |
+| `detached` | `false` | run immudb in background |
+| `devmode` | `false` | enable dev mode: accept remote connections without auth |
+| `dir` | `./data` | data folder |
+| `force-admin-password` | `false` | if true, reset the admin password to the one passed through admin-password option upon startup |
+| `log-request-metadata` | `false` | log request information in transaction metadata |
+| `grpc-reflection` | `true` | GRPC reflection server enabled |
+| `logfile` | `` | log path with filename. E.g. /tmp/immudb/immudb.log |
+| `logformat` | `text` | log format e.g. text/json |
+| `maintenance` | `false` | override the authentication flag |
+| `max-recv-msg-size` | `33554432` | max message size in bytes the server can receive |
+| `max-session-age-time` | infinity | max session age time is a duration after which session will be forcibly closed |
+| `max-session-inactivity-time` | `3m0s` | max session inactivity time is a duration after which an active session is declared inactive by the server. A session is kept active if server is still receiving requests from client (keep-alive or other methods) |
+| `max-sessions` | `100` | maximum number of simultaneously opened sessions |
+| `metrics-server` | `true` | enable or disable Prometheus endpoint |
+| `metrics-server-port` | `9477` | Prometheus endpoint port |
+| `mtls` | `false` | enable mutual tls |
+| `no-histograms` | `false` | disable collection of histogram metrics like query durations |
+| `pgsql-server` | `true` | enable or disable pgsql server |
+| `pgsql-server-port` | `5432` | pgsql server port |
+| `pidfile` | `` | pid path with filename. E.g. /var/run/immudb.pid |
+| `pkey` | `` | server private key path |
+| `port` | `3322` | port number |
+| `pprof` | `false` | add pprof profiling endpoint on the metrics server |
+| `replication-allow-tx-discarding` | `false` | allow precommitted transactions to be discarded if the replica diverges from the primary |
+| `replication-commit-concurrency` | `10` | number of concurrent replications |
+| `replication-is-replica` | `false` | set systemdb and defaultdb as replica |
+| `replication-prefetch-tx-buffer-size` | `100` | maximum number of prefeched transactions |
+| `replication-primary-host` | `` | primary database host (if replica=true) |
+| `replication-primary-password` | `` | password in the primary database used for replication of systemdb and defaultdb |
+| `replication-primary-port` | `3322` | primary database port (if replica=true) (default 3322) |
+| `replication-primary-username` | `` | username in the primary database used for replication of systemdb and defaultdb |
+| `replication-skip-integrity-check` | `false` | disable integrity check when reading data during replication |
+| `replication-sync-acks` | `0` | set a minimum number of replica acknowledgements required before transactions can be committed |
+| `replication-sync-enabled` | `false` | enable synchronous replication |
+| `replication-wait-for-indexing` | `false` | wait for indexing to be up to date during replication |
+| `s3-access-key-id` | `` | s3 access key id |
+| `s3-bucket-name` | `` | s3 bucket name |
+| `s3-endpoint` | `` | s3 endpoint |
+| `s3-external-identifier` | `` | use the remote identifier if there is no local identifier |
+| `s3-instance-metadata-url` | `http://169.254.169.254` | s3 instance metadata url |
+| `s3-location` | `` | s3 location (region) |
+| `s3-path-prefix` | `` | s3 path prefix (multiple immudb instances can share the same bucket if they have different prefixes) |
+| `s3-role` | `` | role name for role-based authentication attempt for s3 storage |
+| `s3-role-enabled` | `false` | enable role-based authentication for s3 storage |
+| `s3-secret-key` | `` | s3 secret access key |
+| `s3-storage` | `false` | enable or disable s3 storage |
+| `session-timeout` | `2m0s` | session timeout is a duration after which an inactive session is forcibly closed by the server |
+| `signingKey` | `` | signature private key path. If a valid one is provided, it enables the cryptographic signature of the root. E.g. "./../test/signer/ec3.key" |
+| `swaggerui` | `true` | Swagger UI enabled |
+| `synced` | `true` | synced mode prevents data lost under unexpected crashes but affects performance |
+| `token-expiry-time` | `1440` | client authentication token expiration time. Minutes |
+| `web-server` | `true` | enable or disable web/console server |
+| `web-server-port` | `8080` | web/console server port |
@@ -164,5 +164,4 @@ immudb 2022/11/17 14:30:02 INFO: Index 'data/systemdb/index' {ts=0, cleanup_perc
{"caller":"codenotary/immudb/embedded/tbtree/tbtree.go:669","component":"github.com/codenotary/immudb/embedded/tbtree.OpenWith","level":"info","message":"Index 'data/systemdb/index' {ts=2, discarded_snapshots=0} successfully loaded","module":"immudb","timestamp":"2022-11-17T14:32:28.904722+05:30"}
```
-