Project

General

Profile

Feature #43973

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

Added by Sebastian Wagner 9 months ago. Updated 9 months 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.

History

#1 Updated by Michael Fritch 9 months 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

#2 Updated by Sebastian Wagner 9 months ago

  • Affected Versions v15.0.0 added

#3 Updated by Michael Fritch 9 months ago

  • Pull request ID set to 33089

#4 Updated by Michael Fritch 9 months ago

  • Assignee set to Michael Fritch

#5 Updated by Sebastian Wagner 9 months ago

  • Status changed from New to In Progress

#6 Updated by Sage Weil 9 months ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF