Basic Usage
Flags
Searching
-n reads back the tail of the journal, so an error from a while ago falls off
the end. -g searches the whole journal instead: it returns the last -n
entries that match, however far back they are.
- The pattern is a regex (PCRE), matched against the message text —
error|fatal,5\d\d,user_id=42all work. Quote it so your shell doesn’t expand it first. - Case follows the pattern. An all-lowercase pattern matches
case-insensitively; one uppercase character makes it case-sensitive. So
-g errorfindsErrorandERROR, while-g Errorfinds onlyError. - Matches print newest first, the opposite order to an unfiltered read.
instapods logs my-app on a Node.js pod reads
the app unit, but the kernel’s OOM-killer lines and nginx’s 502s live in other
units — exactly the things you search for because you can’t see them. Add -s
to scope a search to one service.
-- No entries -- means the search ran and nothing matched.
Examples
Service Filters
The available service filters depend on the pod’s preset:
If you’ve installed database services, their logs are also available: