1podman-events(1) General Commands Manual podman-events(1)
2
3
4
6 podman-events - Monitor Podman events
7
8
10 podman events [options]
11
12
13 podman system events [options]
14
15
17 Monitor and print events that occur in Podman. Each event includes a
18 timestamp, a type, a status, name (if applicable), and image (if appli‐
19 cable). The default logging mechanism is journald. This can be changed
20 in containers.conf by changing the events_logger value to file. Only
21 file and journald are accepted. A none logger is also available, but
22 this logging mechanism completely disables events; nothing is reported
23 by podman events.
24
25
26 By default, streaming mode is used, printing new events as they occur.
27 Previous events can be listed via --since and --until.
28
29
30 The container event type reports the follow statuses:
31 * attach
32 * checkpoint
33 * cleanup
34 * commit
35 * connect
36 * create
37 * died
38 * disconnect
39 * exec
40 * exec_died
41 * exited
42 * export
43 * import
44 * init
45 * kill
46 * mount
47 * pause
48 * prune
49 * remove
50 * rename
51 * restart
52 * restore
53 * start
54 * stop
55 * sync
56 * unmount
57 * unpause
58
59
60 The pod event type reports the follow statuses:
61 * create
62 * kill
63 * pause
64 * remove
65 * start
66 * stop
67 * unpause
68
69
70 The image event type reports the following statuses:
71 * loadFromArchive,
72 * mount
73 * pull
74 * push
75 * remove
76 * save
77 * tag
78 * unmount
79 * untag
80
81
82 The system type reports the following statuses:
83 * refresh
84 * renumber
85
86
87 The volume type reports the following statuses:
88 * create
89 * prune
90 * remove
91
92
93 Verbose Create Events
94 Setting events_container_create_inspect_data=true in containers.conf(5)
95 instructs Podman to create more verbose container-create events which
96 include a JSON payload with detailed information about the containers.
97 The JSON payload is identical to the one of podman-container-in‐
98 spect(1). The associated field in journald is named PODMAN_CON‐
99 TAINER_INSPECT_DATA.
100
101
103 --filter, -f=filter
104 Filter events that are displayed. They must be in the format of "fil‐
105 ter=value". The following filters are supported:
106 * container=name_or_id
107 * event=event_status (described above)
108 * image=name_or_id
109 * label=key=value
110 * pod=name_or_id
111 * volume=name_or_id
112 * type=event_type (described above)
113
114
115 In the case where an ID is used, the ID may be in its full or shortened
116 form. The "die" event is mapped to "died" for Docker compatibility.
117
118
119 --format
120 Format the output to JSON Lines or using the given Go template.
121
122
123 ┌──────────────────────┬────────────────────────────────┐
124 │Placeholder │ Description │
125 ├──────────────────────┼────────────────────────────────┤
126 │.Attributes │ created_at, _by, labels, and │
127 │ │ more (map[]) │
128 ├──────────────────────┼────────────────────────────────┤
129 │.ContainerExitCode │ Exit code (int) │
130 ├──────────────────────┼────────────────────────────────┤
131 │.ContainerInspectData │ Payload of the container's in‐ │
132 │ │ spect │
133 ├──────────────────────┼────────────────────────────────┤
134 │.HealthStatus │ Health Status (string) │
135 ├──────────────────────┼────────────────────────────────┤
136 │.ID │ Container ID (full 64-bit SHA) │
137 ├──────────────────────┼────────────────────────────────┤
138 │.Image │ Name of image being run │
139 │ │ (string) │
140 ├──────────────────────┼────────────────────────────────┤
141 │.Name │ Container name (string) │
142 ├──────────────────────┼────────────────────────────────┤
143 │.Network │ Name of network being used │
144 │ │ (string) │
145 ├──────────────────────┼────────────────────────────────┤
146 │.PodID │ ID of pod associated with con‐ │
147 │ │ tainer, if any │
148 ├──────────────────────┼────────────────────────────────┤
149 │.Status │ Event status (e.g., create, │
150 │ │ start, died, ...) │
151 ├──────────────────────┼────────────────────────────────┤
152 │.Time │ Event timestamp (string) │
153 ├──────────────────────┼────────────────────────────────┤
154 │.Type │ Event type (e.g., image, con‐ │
155 │ │ tainer, pod, ...) │
156 └──────────────────────┴────────────────────────────────┘
157
158 --help
159 Print usage statement.
160
161
162 --no-trunc
163 Do not truncate the output (default true).
164
165
166 --since=timestamp
167 Show all events created since the given timestamp
168
169
170 --stream
171 Stream events and do not exit after reading the last known event (de‐
172 fault true).
173
174
175 --until=timestamp
176 Show all events created until the given timestamp
177
178
179 The since and until values can be RFC3339Nano time stamps or a Go dura‐
180 tion string such as 10m, 5h. If no since or until values are provided,
181 only new events are shown.
182
183
185 The journald events-backend of Podman uses the following journald iden‐
186 tifiers. You can use the identifiers to filter Podman events directly
187 with journalctl.
188
189
190 ┌──────────────────────────────┬───────────────────────────────────────────────────────┐
191 │Identifier │ Description │
192 ├──────────────────────────────┼───────────────────────────────────────────────────────┤
193 │SYSLOG_IDENTIFIER │ Always set to "podman" │
194 ├──────────────────────────────┼───────────────────────────────────────────────────────┤
195 │PODMAN_EVENT │ The event status as described above │
196 ├──────────────────────────────┼───────────────────────────────────────────────────────┤
197 │PODMAN_TYPE │ The event type as described above │
198 ├──────────────────────────────┼───────────────────────────────────────────────────────┤
199 │PODMAN_TIME │ The time stamp when the event was written │
200 ├──────────────────────────────┼───────────────────────────────────────────────────────┤
201 │PODMAN_NAME │ Name of the event object (e.g., container, image) │
202 ├──────────────────────────────┼───────────────────────────────────────────────────────┤
203 │PODMAN_ID │ ID of the event object (e.g., container, image) │
204 ├──────────────────────────────┼───────────────────────────────────────────────────────┤
205 │PODMAN_EXIT_CODE │ Exit code of the container │
206 ├──────────────────────────────┼───────────────────────────────────────────────────────┤
207 │PODMAN_POD_ID │ Pod ID of the container │
208 ├──────────────────────────────┼───────────────────────────────────────────────────────┤
209 │PODMAN_LABELS │ Labels of the container │
210 ├──────────────────────────────┼───────────────────────────────────────────────────────┤
211 │PODMAN_HEALTH_STATUS │ Health status of the container │
212 ├──────────────────────────────┼───────────────────────────────────────────────────────┤
213 │PODMAN_CONTAINER_INSPECT_DATA │ The JSON payload of podman-inspect as described above │
214 ├──────────────────────────────┼───────────────────────────────────────────────────────┤
215 │PODMAN_NETWORK_NAME │ The name of the network │
216 └──────────────────────────────┴───────────────────────────────────────────────────────┘
217
219 Showing Podman events
220
221
222 $ podman events
223 2019-03-02 10:33:42.312377447 -0600 CST container create 34503c192940 (image=docker.io/library/alpine:latest, name=friendly_allen)
224 2019-03-02 10:33:46.958768077 -0600 CST container init 34503c192940 (image=docker.io/library/alpine:latest, name=friendly_allen)
225 2019-03-02 10:33:46.973661968 -0600 CST container start 34503c192940 (image=docker.io/library/alpine:latest, name=friendly_allen)
226 2019-03-02 10:33:50.833761479 -0600 CST container stop 34503c192940 (image=docker.io/library/alpine:latest, name=friendly_allen)
227 2019-03-02 10:33:51.047104966 -0600 CST container cleanup 34503c192940 (image=docker.io/library/alpine:latest, name=friendly_allen)
228
229
230
231 Show only Podman create events
232
233
234 $ podman events -f event=create
235 2019-03-02 10:36:01.375685062 -0600 CST container create 20dc581f6fbf (image=docker.io/library/alpine:latest, name=sharp_morse)
236 2019-03-02 10:36:08.561188337 -0600 CST container create 58e7e002344c (image=registry.k8s.io/pause:3.1, name=3e701f270d54-infra)
237 2019-03-02 10:36:13.146899437 -0600 CST volume create cad6dc50e087 (image=, name=cad6dc50e0879568e7d656bd004bd343d6035e7fc4024e1711506fe2fd459e6f)
238 2019-03-02 10:36:29.978806894 -0600 CST container create d81e30f1310f (image=docker.io/library/busybox:latest, name=musing_newton)
239
240
241
242 Show only Podman pod create events
243
244
245 $ podman events --filter event=create --filter type=pod
246 2019-03-02 10:44:29.601746633 -0600 CST pod create 1df5ebca7b44 (image=, name=confident_hawking)
247 2019-03-02 10:44:42.374637304 -0600 CST pod create ca731231718e (image=, name=webapp)
248 2019-03-02 10:44:47.486759133 -0600 CST pod create 71e807fc3a8e (image=, name=reverent_swanson)
249
250
251
252 Show only Podman events created in the last five minutes:
253
254
255 $ sudo podman events --since 5m
256 2019-03-02 10:44:29.598835409 -0600 CST container create b629d10d3831 (image=registry.k8s.io/pause:3.1, name=1df5ebca7b44-infra)
257 2019-03-02 10:44:29.601746633 -0600 CST pod create 1df5ebca7b44 (image=, name=confident_hawking)
258 2019-03-02 10:44:42.371100253 -0600 CST container create 170a0f457d00 (image=registry.k8s.io/pause:3.1, name=ca731231718e-infra)
259 2019-03-02 10:44:42.374637304 -0600 CST pod create ca731231718e (image=, name=webapp)
260
261
262
263 Show Podman events in JSON Lines format
264
265
266 $ podman events --format json
267 {"ID":"683b0909d556a9c02fa8cd2b61c3531a965db42158627622d1a67b391964d519","Image":"localhost/myshdemo:latest","Name":"agitated_diffie","Status":"cleanup","Time":"2019-04-27T22:47:00.849932843-04:00","Type":"container"}
268 {"ID":"a0f8ab051bfd43f9c5141a8a2502139707e4b38d98ac0872e57c5315381e88ad","Image":"docker.io/library/alpine:latest","Name":"friendly_tereshkova","Status":"unmount","Time":"2019-04-28T13:43:38.063017276-04:00","Type":"container"}
269
270
271
273 podman(1), containers.conf(5)
274
275
277 March 2019, Originally compiled by Brent Baude bbaude@redhat.com
278 ⟨mailto:bbaude@redhat.com⟩
279
280
281
282 podman-events(1)