Skip to content

Commit d361db5

Browse files
author
Davide Schiera
committed
Changed function links and formatting.
1 parent 51f296d commit d361db5

File tree

1 file changed

+81
-27
lines changed

1 file changed

+81
-27
lines changed

README.md

Lines changed: 81 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ For an example on how to parse this output, take a look at a simple example like
5252

5353
Methods
5454
-------
55-
#### `add_dashboard_panel(self, dashboard, name, type, metrics, scope=None, layout=None, sort_by=None, paging=None)`
55+
#### `add_dashboard_panel`
56+
**`(self, dashboard, name, type, metrics, scope=None, layout=None, sort_by=None, paging=None)`**
57+
5658
**Description**
5759
Adds a panel to the dashboard. A panel can be a time series, or a top chart (i.e. bar chart), or a number panel.
5860

@@ -72,7 +74,9 @@ A dictionary showing the details of the edited dashboard.
7274
**Example**
7375
[examples/dashboard.py](examples/dashboard.py).
7476

75-
#### `add_email_notification_recipient(self, email)`
77+
#### `add_email_notification_recipient`
78+
**`(self, email)`**
79+
7680
**Description**
7781
Add a new recipient for email alert notifications.
7882
**Arguments**
@@ -83,7 +87,9 @@ A dictionary showing the updated user notifications configuration.
8387
**Example**
8488
[examples/add_notification_email.py](examples/add_notification_email.py).
8589

86-
#### `create_alert(self, name, description, severity, for_atleast_s, condition, segmentby = [], segment_condition = 'ANY', filter = '', notify='', enabled=True, annotations={})`
90+
#### `create_alert`
91+
**`(self, name, description, severity, for_atleast_s, condition, segmentby = [], segment_condition = 'ANY', filter = '', notify='', enabled=True, annotations={})`**
92+
8793
**Description**
8894
Create a threshold-based alert.
8995
**Arguments**
@@ -104,7 +110,9 @@ A dictionary describing the just created alert, with the format described at [th
104110
**Example**
105111
[examples/create_alert.py](examples/create_alert.py).
106112

107-
#### `create_dashboard(self, name)`
113+
#### `create_dashboard`
114+
**`(self, name)`**
115+
108116
**Description**
109117
Creates an empty dashboard. You can then add panels by using `add_dashboard_panel`.
110118

@@ -117,7 +125,9 @@ A dictionary showing the details of the new dashboard.
117125
**Example**
118126
[examples/dashboard.py](examples/dashboard.py).
119127

120-
#### `create_dashboard_from_dashboard(self, newdashname, templatename, filter)`
128+
#### `create_dashboard_from_dashboard`
129+
**`(self, newdashname, templatename, filter)`**
130+
121131
**Description**
122132
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.
123133
**Arguments**
@@ -130,7 +140,9 @@ A dictionary showing the details of the new dashboard.
130140
**Example**
131141
[examples/create_dashboard.py](examples/create_dashboard.py).
132142

133-
#### `create_dashboard_from_view(self, newdashname, viewname, filter)`
143+
#### `create_dashboard_from_view`
144+
**`(self, newdashname, viewname, filter)`**
145+
134146
**Description**
135147
Create a new dasboard using one of the Sysdig Cloud views as a template. You will be able to define the scope of the new dasboard.
136148
**Arguments**
@@ -143,7 +155,9 @@ A dictionary showing the details of the new dashboard.
143155
**Example**
144156
[examples/create_dashboard.py](examples/create_dashboard.py).
145157

146-
#### `create_sysdig_capture(self, hostname, capture_name, duration, capture_filter='', folder='/')`
158+
#### `create_sysdig_capture`
159+
**`(self, hostname, capture_name, duration, capture_filter='', folder='/')`**
160+
147161
**Description**
148162
Create a new sysdig capture. The capture will be immediately started.
149163
**Arguments**
@@ -158,7 +172,9 @@ A dictionary showing the details of the new capture.
158172
**Example**
159173
[examples/create_sysdig_capture.py](examples/create_sysdig_capture.py).
160174

161-
#### `delete_alert(self, alert)`
175+
#### `delete_alert`
176+
**`(self, alert)`**
177+
162178
**Description**
163179
Deletes an alert.
164180
**Arguments**
@@ -169,7 +185,9 @@ Deletes an alert.
169185
**Example**
170186
[examples/delete_alert.py](examples/delete_alert.py).
171187

172-
#### `delete_dashboard(self, dashboard)`
188+
#### `delete_dashboard`
189+
**`(self, dashboard)`**
190+
173191
**Description**
174192
Deletes a dashboard.
175193
**Arguments**
@@ -180,7 +198,9 @@ Deletes a dashboard.
180198
**Example**
181199
[examples/delete_dashboard.py](examples/delete_dashboard.py).
182200

183-
#### `delete_event(self, event)`
201+
#### `delete_event`
202+
**`(self, event)`**
203+
184204
**Description**
185205
Deletes an event.
186206
**Arguments**
@@ -191,21 +211,27 @@ Deletes an event.
191211
**Example**
192212
[examples/delete_event.py](examples/delete_event.py).
193213

194-
#### `get_alerts(self)`
214+
#### `get_alerts`
215+
**`(self)`**
216+
195217
**Description**
196218
Retrieve the list of alerts configured by the user.
197219
**Success Return Value**
198220
An array of alert json objects, with the format described at [this link](https://app.sysdigcloud.com/apidocs/#!/Alerts/get_api_alerts).
199221
**Example**
200222
[examples/list_alerts.py](examples/list_alerts.py).
201223

202-
#### `get_connected_agents(self)`
224+
#### `get_connected_agents`
225+
**`(self)`**
226+
203227
**Description**
204228
Return the agents currently connected to Sysdig Cloud for the current user.
205229
**Success Return Value**
206230
A list of the agents with all their attributes.
207231

208-
#### `get_data(self, metrics, start_ts, end_ts=0, sampling_s = 0, filter='', datasource_type='host')`
232+
#### `get_data`
233+
**`(self, metrics, start_ts, end_ts=0, sampling_s = 0, filter='', datasource_type='host')`**
234+
209235
**Description**
210236
This is the method you use to export metric data. It's flexible enough to offer both time-series and table-based data export.
211237
**Arguments**
@@ -221,23 +247,29 @@ A dictionary with the requested data. Data is organized in a list of time sample
221247
**Examples**
222248
[examples/get_data_simple.py](examples/get_data_simple.py), [examples/get_data_advanced.py](examples/get_data_advanced.py), [examples/list_hosts.py](examples/list_hosts.py), [examples/get_data_datasource.py](examples/get_data_datasource.py).
223249

224-
#### `get_dashboards(self)`
250+
#### `get_dashboards`
251+
**`(self)`**
252+
225253
**Description**
226254
Return the list of dashboards available under the given user account. This includes the dashboards created by the user and the ones shared with her by other users.
227255
**Success Return Value**
228256
A dictionary containing the list of available sampling intervals.
229257
**Example**
230258
[examples/list_dashboards.py](examples/list_dashboards.py).
231259

232-
#### `get_data_retention_info(self)`
260+
#### `get_data_retention_info`
261+
**`(self)`**
262+
233263
**Description**
234264
Return the list of data retention intervals, with beginning and end UTC time for each of them. Sysdig Cloud performs rollups of the data it stores. This means that data is stored at different time granularities depending on how far in time it is. This call can be used to know what precision you can expect before you make a call to `get_data()`.
235265
**Success Return Value**
236266
A dictionary containing the list of available sampling intervals.
237267
**Example**
238268
[examples/print_data_retention_info.py](examples/print_data_retention_info.py).
239269

240-
#### `get_events(self, name=None, from_ts=None, to_ts=None, tags=None)`
270+
#### `get_events`
271+
**`(self, name=None, from_ts=None, to_ts=None, tags=None)`**
272+
241273
**Description**
242274
Returns the list of Sysdig Cloud events.
243275
**Arguments**
@@ -251,29 +283,37 @@ A dictionary containing the list of events.
251283
**Example**
252284
[examples/list_events.py](examples/list_events.py).
253285

254-
#### `get_explore_grouping_hierarchy(self)`
286+
#### `get_explore_grouping_hierarchy`
287+
**`(self)`**
288+
255289
**Description**
256290
Return the user's current Explore gourping hierarchy.
257291
**Success Return Value**
258292
A list containing the list of the user's Explore grouping criteria.
259293
**Example**
260294
[examples/print_explore_grouping.py](examples/print_explore_grouping.py).
261295

262-
#### `get_metrics(self)`
296+
#### `get_metrics`
297+
**`(self)`**
298+
263299
**Description**
264300
Return the metric list that can be used for data requests/alerts/dashboards.
265301
**Success Return Value**
266302
A dictionary containing the list of available metrics.
267303
**Example**
268304
[examples/list_metrics.py](examples/list_metrics.py).
269305

270-
#### `get_n_connected_agents(self)`
306+
#### `get_n_connected_agents`
307+
**`(self)`**
308+
271309
**Description**
272310
Return the number of agents currently connected to Sysdig Cloud for the current user.
273311
**Success Return Value**
274312
An integer number.
275313

276-
#### `get_notifications(self, from_ts, to_ts, state=None, resolved=None)`
314+
#### `get_notifications`
315+
**`(self, from_ts, to_ts, state=None, resolved=None)`**
316+
277317
**Description**
278318
Returns the list of Sysdig Cloud alert notifications.
279319
**Arguments**
@@ -287,23 +327,29 @@ A dictionary containing the list of notifications.
287327
**Example**
288328
[examples/list_alert_notifications.py](examples/list_alert_notifications.py).
289329

290-
#### `get_sysdig_captures(self)`
330+
#### `get_sysdig_captures`
331+
**`(self)`**
332+
291333
**Description**
292334
Returns the list of sysdig captures for the user.
293335
**Success Return Value**
294336
A dictionary containing the list of captures.
295337
**Example**
296338
[examples/list_sysdig_captures.py](examples/list_sysdig_captures.py).
297339

298-
#### `get_user_info(self)`
340+
#### `get_user_info`
341+
**`(self)`**
342+
299343
**Description**
300344
Get details about the current user.
301345
**Success Return Value**
302346
A dictionary containing information about the user, for example its email and the maximum number of agents it can install.
303347
**Example**
304348
[examples/print_user_info.py](examples/print_user_info.py).
305349

306-
#### `find_dashboard_by(self, name)`
350+
#### `find_dashboard_by`
351+
**`(self, name)`**
352+
307353
**Description**
308354
Finds dashboards with the specified name. You can then delete the dashboard (with `delete_dashboard`) or edit panels (with `add_dashboard_panel` and `remove_dashboard_panel`)
309355

@@ -316,7 +362,9 @@ A list of dictionaries of dashboards matching the specified name.
316362
**Example**
317363
[examples/dashboard.py](examples/dashboard.py).
318364

319-
#### `poll_sysdig_capture(self, capture)`
365+
#### `poll_sysdig_capture`
366+
**`(self, capture)`**
367+
320368
**Description**
321369
Fetch the updated state of a sysdig capture. Can be used to poll the status of a capture that has been previously created and started with `create_sysdig_capture`.
322370
**Arguments**
@@ -327,7 +375,9 @@ A dictionary showing the updated details of the capture. Use the `status` field
327375
**Example**
328376
[examples/create_sysdig_capture.py](examples/create_sysdig_capture.py).
329377

330-
#### `post_event(self, name, description=None, severity=None, event_filter=None, tags=None)`
378+
#### `post_event`
379+
**`(self, name, description=None, severity=None, event_filter=None, tags=None)`**
380+
331381
**Description**
332382
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.
333383
**Arguments**
@@ -343,7 +393,9 @@ A dictionary describing the new event.
343393
[examples/post_event_simple.py](examples/post_event_simple.py)
344394
[examples/post_event.py](examples/post_event.py).
345395

346-
#### `remove_dashboard_panel(self, dashboard, panel_name)`
396+
#### `remove_dashboard_panel`
397+
**`(self, dashboard, panel_name)`**
398+
347399
**Description**
348400
Removes a panel from the dashboard. The panel to remove is identified by the specified `name`.
349401

@@ -356,7 +408,9 @@ A dictionary showing the details of the edited dashboard.
356408
**Example**
357409
[examples/dashboard.py](examples/dashboard.py).
358410

359-
#### `update_notification_resolution(self, notification, resolved)`
411+
#### `update_notification_resolution`
412+
**`(self, notification, resolved)`**
413+
360414
**Description**
361415
Updates the resolution status of an alert notification.
362416
**Arguments**

0 commit comments

Comments
 (0)