Skip to content

Commit

Permalink
Merge pull request #650 from vmarmol/events
Browse files Browse the repository at this point in the history
Add oom_kill_events parameter to API
  • Loading branch information
rjnagal committed Apr 15, 2015
2 parents 0971262 + a45d396 commit 6c284ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ func getEventRequest(r *http.Request) (*events.Request, bool, error) {
query.EventType[info.EventOom] = newBool
}
}
if val, ok := urlMap["oom_kill_events"]; ok {
newBool, err := strconv.ParseBool(val[0])
if err == nil {
query.EventType[info.EventOomKill] = newBool
}
}
if val, ok := urlMap["creation_events"]; ok {
newBool, err := strconv.ParseBool(val[0])
if err == nil {
Expand Down
1 change: 1 addition & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The endpoint accepts a certain number of query parameters:
| `subcontainers` | Whether to also return events for all subcontainers | false |
| `max_events` | The max number of events to return (for stream=false) | 10 |
| `oom_events` | Whether to include OOM events | false |
| `oom_kill_events` | Whether to include OOM kill events | false |
| `creation_events` | Whether to include container creation events | false |
| `deletion_events` | Whether to include container deletion events | false |

Expand Down

0 comments on commit 6c284ef

Please sign in to comment.