Skip to content

Commit 8478ca5

Browse files
Update post_event()
1 parent b7ae27e commit 8478ca5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 2 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, host=None, tags=None)`
284+
#### `post_event(self, name, description=None, severity=6, 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.
290290
- **severity**: severity, syslog style (from 0 to 7).
291-
- **host**: the host generating the event. Can be used for filtering/segmenting purposes in Sysdig Cloud.
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'`.
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def delete_dashboard(self, dashboard):
514514

515515
return [True, None]
516516

517-
def post_event(self, name, description=None, severity=6, host=None, tags=None):
517+
def post_event(self, name, description=None, severity=6, event_filter=None, tags=None):
518518
edata = {
519519
'event': {
520520
'name': name,
@@ -525,8 +525,8 @@ def post_event(self, name, description=None, severity=6, host=None, tags=None):
525525
if description is not None:
526526
edata['event']['description'] = description
527527

528-
if host is not None:
529-
edata['event']['host'] = host
528+
if filter is not None:
529+
edata['event']['filter'] = event_filter
530530

531531
if tags is not None:
532532
edata['event']['tags'] = tags

0 commit comments

Comments
 (0)