Skip to content

Commit

Permalink
archive and download logs (feature)
Browse files Browse the repository at this point in the history
* docs - initial
* part three, prev. commit: c5891ae

Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Jul 22, 2023
1 parent 27512d6 commit 27c6328
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ Following is a brief summary (that's non-exhaustive and slightly outdated):
| [`ais object`](/docs/cli/object.md) | PUT and GET (write and read), APPEND, archive, concat, list (buckets, objects), move, evict, promote, ... |
| [`ais search`](/docs/cli/search.md) | Search `ais` commands. |
| [`ais show`](/docs/cli/show.md) | Monitor anything and everything: performance (all aspects), buckets, jobs, remote clusters, and more. |
| [`ais log`](/docs/cli/log.md) | Download ais nodes' logs or view the logs in real time. |
| [`ais storage`](/docs/cli/storage.md) | Show capacity usage on a per bucket basis (num objects and sizes), attach/detach mountpaths (disks). |
{: .nobreak}

Expand Down
68 changes: 68 additions & 0 deletions docs/cli/log.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
layout: post
title: LOG
permalink: /docs/cli/log
redirect_from:
- /cli/log.md/
- /docs/cli/log.md/
---

# Table of Contents
- [Download log or all logs (including history)](#ais-log-get-command)
- [View current log](#ais-log-show-command)

# `ais log get` command

```console
$ ais log get --help
NAME:
ais log get - download log (or all logs including history) from selected node or all nodes in the cluster, e.g.:
- 'ais log get NODE_ID /tmp' - download the specified node's current log; save the result to the specified directory;
- 'ais log get NODE_ID /tmp/out --refresh 10' - download the current log as /tmp/out
keep updating (ie., appending) the latter every 10s;
- 'ais log get cluster /tmp' - download TAR.GZ archived logs from _all_ nodes in the cluster
('cluster' implies '--all') and save the result to the specified destination;
- 'ais log get NODE_ID --all' - download the node's TAR.GZ log archive
- 'ais log get NODE_ID --all --severity e' - TAR.GZ archive of (only) logged errors and warnings

USAGE:
ais log get [command options] NODE_ID [OUT_FILE|OUT_DIR|-]

OPTIONS:
--refresh value interval for continuous monitoring;
valid time units: ns, us (or µs), ms, s (default), m, h
--count value used together with '--refresh' to limit the number of generated reports, e.g.:
'--refresh 10 --count 5' - run 5 times with 10s interval (default: 0)
--severity value log severity is either 'info' (default) or 'error', whereby error logs contain both errors and warnings, e.g.:
- 'ais show log NODE_ID'
- 'ais log show NODE_ID --severity i' - same as above
- 'ais show log NODE_ID --severity error' - errors and warnings only
- 'ais show log NODE_ID --severity w' - same as above
--yes, -y assume 'yes' to all questions
--all download all logs
--help, -h show help
```

# `ais log show` command

```console
$ ais log show --help
NAME:
ais log show - for a given node: show its current log (use '--refresh' to update, '--help' for details)

USAGE:
ais log show [command options] NODE_ID

OPTIONS:
--refresh value interval for continuous monitoring;
valid time units: ns, us (or µs), ms, s (default), m, h
--count value used together with '--refresh' to limit the number of generated reports, e.g.:
'--refresh 10 --count 5' - run 5 times with 10s interval (default: 0)
--severity value log severity is either 'info' (default) or 'error', whereby error logs contain both errors and warnings, e.g.:
- 'ais show log NODE_ID'
- 'ais log show NODE_ID --severity i' - same as above
- 'ais show log NODE_ID --severity error' - errors and warnings only
- 'ais show log NODE_ID --severity w' - same as above
--log-flush value can be used in combination with '--refresh' to override configured 'log.flush_time'
--help, -h show help
```

0 comments on commit 27c6328

Please sign in to comment.