Project

General

Profile

Actions

Feature #43973

closed

There is a need for a wrapper to fetch the journald logs

Added by Sebastian Wagner about 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
High
Category:
cephadm (binary)
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

fsid="$(cephadm run ceph fsid)" 
for name in $(cephadm ls | jq -r '.[].name') ; do
  journalctl -u "ceph-$fsid@$name.service" > $name;
done

or

journalctl --field _SYSTEMD_UNIT | grep ceph | xargs -n 1 journalctl -u

is too complex. We should allow users to fetch the logs with a single command.

Actions #1

Updated by Michael Fritch about 4 years ago

What if we re-introduce the `cephadm logs` command, only this time we rely on `journald` only (and avoid `podman logs`)?

Likewise, we could allow for arbitrary `journalctl` args to be passed through:

cephadm logs --name <name> -- <journalctl args...>

For example to get output in json format:

cephadm logs --name <name> -- -n2 -o json

Actions #2

Updated by Sebastian Wagner about 4 years ago

  • Affected Versions v15.0.0 added
Actions #3

Updated by Michael Fritch about 4 years ago

  • Pull request ID set to 33089
Actions #4

Updated by Michael Fritch about 4 years ago

  • Assignee set to Michael Fritch
Actions #5

Updated by Sebastian Wagner about 4 years ago

  • Status changed from New to In Progress
Actions #6

Updated by Sage Weil about 4 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF