Skip to content

Commit 7ef98cc

Browse files
sort
1 parent e463faa commit 7ef98cc

File tree

1 file changed

+48
-48
lines changed

1 file changed

+48
-48
lines changed

README.md

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,16 @@ For an example on how to parse this output, take a look at a simple example like
3636

3737
Methods
3838
-------
39-
#### `get_user_info(self)`
40-
**Description**
41-
Get details about the current user.
42-
**Success Return Value**
43-
A dictionary containing information about the user, for example its email and the maximum number of agents it can install.
44-
**Example**
45-
[examples/print_user_info.py](examples/print_user_info.py).
46-
47-
#### `get_n_connected_agents(self)`
39+
#### `add_email_notification_recipient(self, email)`
4840
**Description**
49-
Return the number of agents currently connected to Sysdig Cloud for the current user.
50-
**Success Return Value**
51-
An integer number.
52-
**Example**
53-
[examples/print_user_info.py](examples/print_user_info.py).
41+
Add a new recipient for email alert notifications.
42+
**Arguments**
43+
- **email**: the email target to add.
5444

55-
#### `get_alerts(self)`
56-
**Description**
57-
Retrieve the list of alerts configured by the user.
5845
**Success Return Value**
59-
An array of alert json objects, with the format described at [this link](https://app.sysdigcloud.com/apidocs/#!/Alerts/get_api_alerts).
46+
A dictionary showing the updated user notifications configuration.
6047
**Example**
61-
[examples/list_alerts.py](examples/list_alerts.py).
48+
[examples/add_notification_email.py](examples/add_notification_email.py).
6249

6350
#### `create_alert(self, name, description, severity, for_atleast_s, condition, segmentby = [], segment_condition = 'ANY', filter = '', notify='', enabled=True, annotations={})`
6451
**Description**
@@ -81,16 +68,18 @@ A dictionary describing the just created alert, with the format described at [th
8168
**Example**
8269
[examples/create_alert.py](examples/create_alert.py).
8370

84-
#### `add_email_notification_recipient(self, email)`
71+
#### `create_dashboard_from_dashboard(self, newdashname, templatename, filter)`
8572
**Description**
86-
Add a new recipient for email alert notifications.
73+
Create a new dasboard using one of the existing dashboards as a template. You will be able to define the scope of the new dasboard.
8774
**Arguments**
88-
- **email**: the email target to add.
75+
- **newdashname**: the name of the dashboard that will be created.
76+
- **viewname**: the name of the dasboard to use as the template, as it appears in the Sysdig Cloud dashboard page.
77+
- **filter**: a boolean expression combining Sysdig Cloud segmentation criteria defines what the new dasboard will be applied to. For example: _kubernetes.namespace.name='production' and container.image='nginx'_.
8978

9079
**Success Return Value**
91-
A dictionary showing the updated user notifications configuration.
80+
A dictionary showing the details of the new dashboard.
9281
**Example**
93-
[examples/add_notification_email.py](examples/add_notification_email.py).
82+
[examples/create_dashboard.py](examples/create_dashboard.py).
9483

9584
#### `create_dashboard_from_view(self, newdashname, viewname, filter)`
9685
**Description**
@@ -105,18 +94,21 @@ A dictionary showing the details of the new dashboard.
10594
**Example**
10695
[examples/create_dashboard.py](examples/create_dashboard.py).
10796

108-
#### `create_dashboard_from_dashboard(self, newdashname, templatename, filter)`
97+
#### `delete_dashboards(self, dashname))`
10998
**Description**
110-
Create a new dasboard using one of the existing dashboards as a template. You will be able to define the scope of the new dasboard.
111-
**Arguments**
112-
- **newdashname**: the name of the dashboard that will be created.
113-
- **viewname**: the name of the dasboard to use as the template, as it appears in the Sysdig Cloud dashboard page.
114-
- **filter**: a boolean expression combining Sysdig Cloud segmentation criteria defines what the new dasboard will be applied to. For example: _kubernetes.namespace.name='production' and container.image='nginx'_.
99+
Deletes a dashboard given its name.
100+
**Success Return Value**
101+
A boolean with the status of the operation.
102+
**Example**
103+
[examples/delete_dashboard.py](examples/delete_dashboard.py).
115104

105+
#### `get_alerts(self)`
106+
**Description**
107+
Retrieve the list of alerts configured by the user.
116108
**Success Return Value**
117-
A dictionary showing the details of the new dashboard.
109+
An array of alert json objects, with the format described at [this link](https://app.sysdigcloud.com/apidocs/#!/Alerts/get_api_alerts).
118110
**Example**
119-
[examples/create_dashboard.py](examples/create_dashboard.py).
111+
[examples/list_alerts.py](examples/list_alerts.py).
120112

121113
#### `get_data(self, metrics, start_ts, end_ts=0, sampling_s = 0, filter='', datasource_type='host')`
122114
**Description**
@@ -150,14 +142,6 @@ A dictionary containing the list of available sampling intervals.
150142
**Example**
151143
[examples/list_dashboards.py](examples/list_dashboards.py).
152144

153-
#### `delete_dashboards(self, dashname))`
154-
**Description**
155-
Deletes a dashboard given its name.
156-
**Success Return Value**
157-
A boolean with the status of the operation.
158-
**Example**
159-
[examples/delete_dashboard.py](examples/delete_dashboard.py).
160-
161145
#### `get_explore_grouping_hierarchy(self)`
162146
**Description**
163147
Return the user's current Explore gourping hierarchy.
@@ -166,6 +150,30 @@ A list containing the list of the user's Explore grouping criteria.
166150
**Example**
167151
[examples/print_explore_grouping.py](examples/print_explore_grouping.py).
168152

153+
#### `get_metrics(self)`
154+
**Description**
155+
Return the metric list that can be used for data requests/alerts/dashboards.
156+
**Success Return Value**
157+
A dictionary containing the list of available metrics.
158+
**Example**
159+
[examples/list_metrics.py](examples/list_metrics.py).
160+
161+
#### `get_n_connected_agents(self)`
162+
**Description**
163+
Return the number of agents currently connected to Sysdig Cloud for the current user.
164+
**Success Return Value**
165+
An integer number.
166+
**Example**
167+
[examples/print_user_info.py](examples/print_user_info.py).
168+
169+
#### `get_user_info(self)`
170+
**Description**
171+
Get details about the current user.
172+
**Success Return Value**
173+
A dictionary containing information about the user, for example its email and the maximum number of agents it can install.
174+
**Example**
175+
[examples/print_user_info.py](examples/print_user_info.py).
176+
169177
#### `post_event(self, name, description='', severity=6, host='', tags={})`
170178
**Description**
171179
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.
@@ -180,11 +188,3 @@ You can use this method you use to send an event to Sysdig Cloud. The events you
180188
A dictionary describing the new event.
181189
**Example**
182190
[examples/post_event.py](examples/post_event.py).
183-
184-
#### `get_metrics(self)`
185-
**Description**
186-
Return the metric list that can be used for data requests/alerts/dashboards.
187-
**Success Return Value**
188-
A dictionary containing the list of available metrics.
189-
**Example**
190-
[examples/list_metrics.py](examples/list_metrics.py).

0 commit comments

Comments
 (0)