Merge pull request #9246 from estesp/add-oom-event

Proposal: Add "OOM killed" event based on OOM state information
This commit is contained in:
James Turnbull 2014-12-26 22:54:02 -05:00
commit 8722b6db4b
3 changed files with 8 additions and 2 deletions

View File

@ -154,6 +154,9 @@ func (m *containerMonitor) Start() error {
if m.shouldRestart(exitStatus.ExitCode) {
m.container.SetRestarting(&exitStatus)
if exitStatus.OOMKilled {
m.container.LogEvent("oom")
}
m.container.LogEvent("die")
m.resetContainer(true)
@ -170,6 +173,9 @@ func (m *containerMonitor) Start() error {
continue
}
m.container.ExitCode = exitStatus.ExitCode
if exitStatus.OOMKilled {
m.container.LogEvent("oom")
}
m.container.LogEvent("die")
m.resetContainer(true)
return err

View File

@ -1375,7 +1375,7 @@ polling (using since).
Docker containers will report the following events:
create, destroy, die, export, kill, pause, restart, start, stop, unpause
create, destroy, die, export, kill, oom, pause, restart, start, stop, unpause
and Docker images will report:

View File

@ -761,7 +761,7 @@ For example:
Docker containers will report the following events:
create, destroy, die, export, kill, pause, restart, start, stop, unpause
create, destroy, die, export, kill, oom, pause, restart, start, stop, unpause
and Docker images will report: