# AUDIT.VERIFY

> Check every entry of the audit log for tampering.

URL: https://docs.hotkv.com/commands/audit-verify/

```
AUDIT.VERIFY
```

- Group: Audit
- Complexity: O(N) where N is the number of entries
- HotKV Cloud: Scale plan
- On-Premise: requires the audit-log license feature

`AUDIT.VERIFY` reads the whole current audit log file and checks that no
entry was edited, deleted or inserted after it was written. Run it on a
schedule, or before you hand the log to an auditor. The result is also what
[AUDIT.INFO](https://docs.hotkv.com/commands/audit-info/index.md) reports as `chain_valid` for a large
log.

The check reads the full file, so on a very large log it takes a while.

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| The log is intact (or empty) | Simple string `OK chain verified` | Simple string |
| An entry was changed, removed or inserted | Error `ERR audit chain verification failed - tampering detected` | Same error |

The server log names the first entry that fails. Without a license that
includes `audit-log`, the reply is
`NOLICENSE audit-log requires a HotKV license. Contact sales@hotkv.com`.

## Examples

```
127.0.0.1:6379> AUDIT.VERIFY
OK chain verified
```

## Compatibility

HotKV-only command.

## See also

[AUDIT.INFO](https://docs.hotkv.com/commands/audit-info/index.md), [AUDIT.EXPORT](https://docs.hotkv.com/commands/audit-export/index.md)