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