Skip to content

Commit c738c09

Browse files
committed
no default severity in post_event()
1 parent 8036f2e commit c738c09

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,14 @@ A dictionary showing the updated details of the capture. Use the `status` field
281281
**Example**
282282
[examples/create_sysdig_capture.py](examples/create_sysdig_capture.py).
283283

284-
#### `post_event(self, name, description=None, severity=6, event_filter=None, tags=None)`
284+
#### `post_event(self, name, description=None, severity=None, event_filter=None, tags=None)`
285285
**Description**
286286
You can use this method you use to send an event to Sysdig Cloud. The events you post are available in the Events tab in the Sysdig Cloud UI and can be overlied to charts.
287287
**Arguments**
288288
- **name**: the name of the new event.
289289
- **description**: a longer description offering detailed information about the event.
290-
- **severity**: severity, syslog style (from 0 to 7).
291-
- **event_filter**: a Sysdig Cloud filter thet can be used for filtering/segmenting purposes in Sysdig Cloud, e.g. `host.hostName = 'ip-10-1-1-1'`.
290+
- **severity**: syslog style from 0 (high) to 7 (low).
291+
- **event_filter**: metadata, in Sysdig Cloud format, of nodes to associate with the event, e.g. `host.hostName = 'ip-10-1-1-1' and container.name = 'foo'`.
292292
- **tags**: a list of key-value dictionaries that can be used to tag the event. Can be used for filtering/segmenting purposes in Sysdig Cloud.
293293

294294
**Success Return Value**

sdcclient/_client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,16 +514,18 @@ def delete_dashboard(self, dashboard):
514514

515515
return [True, None]
516516

517-
def post_event(self, name, description=None, severity=6, event_filter=None, tags=None):
517+
def post_event(self, name, description=None, severity=None, event_filter=None, tags=None):
518518
edata = {
519519
'event': {
520-
'name': name,
521-
'severity': severity
520+
'name': name
522521
}
523522
}
524523

525524
if description is not None:
526525
edata['event']['description'] = description
526+
527+
if severity is not None:
528+
edata['event']['severity'] = severity
527529

528530
if event_filter is not None:
529531
edata['event']['filter'] = event_filter

0 commit comments

Comments
 (0)