You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- **name**: the alert name. This will appear in the Sysdig Cloud UI and in notification emails.
159
+
- **description**: the alert description. This will appear in the Sysdig Cloud UI and in notification emails.
160
+
- **severity**: syslog-encoded alert severity. This is a number from 0 to 7 where 0 means 'emergency' and 7 is 'debug'.
161
+
- **for_atleast_s**: the number of consecutive seconds the condition must be satisfied for the alert to fire.
162
+
- **condition**: the alert condition, as described here https://app.sysdigcloud.com/apidocs/#!/Alerts/post_api_alerts
163
+
- **segmentby**: a list of Sysdig Cloud segmentation criteria that can be used to apply the alert to multiple entities. For example, segmenting a CPU alert by ['host.mac', 'proc.name'] allows to apply it to any process in any machine.
164
+
- **segment_condition**: When *segmentby* is specified (and therefore the alert will cover multiple entities) this field is used to determine when it will fire. In particular, you have two options for *segment_condition*: **ANY** (the alert will fire when at least one of the monitored entities satisfies the condition) and **ALL** (the alert will fire when all of the monitored entities satisfy the condition).
165
+
- **user_filter**: a boolean expression combining Sysdig Cloud segmentation criteria that makes it possible to reduce the scope of the alert. For example: *kubernetes.namespace.name='production' and container.image='nginx'*.
166
+
- **notify**: the type of notification you want this alert to generate. Options are *EMAIL*, *SNS*, *PAGER_DUTY*, *SYSDIG_DUMP*.
167
+
- **enabled**: if True, the alert will be enabled when created.
168
+
- **annotations**: an optional dictionary of custom properties that you can associate to this alert for automation or management reasons
169
+
170
+
**Success Return Value**
171
+
A dictionary describing the just created alert, with the format described at `this link <https://app.sysdigcloud.com/apidocs/#!/Alerts/post_api_alerts>`_
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.
493
+
494
+
**Arguments**
495
+
- **dashboard**: dashboard to edit
496
+
- **name**: name of the new panel
497
+
- **panel_type**: type of the new panel. Valid values are: ``timeSeries``, ``top``, ``number``
498
+
- **metrics**: a list of dictionaries, specifying the metrics to show in the panel, and optionally, if there is only one metric, a grouping key to segment that metric by. A metric is any of the entries that can be found in the *Metrics* section of the Explore page in Sysdig Cloud. Metric entries require an *aggregations* section specifying how to aggregate the metric across time and groups of containers/hosts. A grouping key is any of the entries that can be found in the *Show* or *Segment By* sections of the Explore page in Sysdig Cloud. Refer to the examples section below for ready to use code snippets. Note, certain panels allow certain combinations of metrics and grouping keys:
499
+
- ``timeSeries``: 1 or more metrics OR 1 metric + 1 grouping key
500
+
- ``top``: 1 or more metrics OR 1 metric + 1 grouping key
501
+
- ``number``: 1 metric only
502
+
- **scope**: filter to apply to the panel; must be based on metadata available in Sysdig Cloud; Example: *kubernetes.namespace.name='production' and container.image='nginx'*.
503
+
- **sort_by**: Data sorting; The parameter is optional and it's a dictionary of ``metric`` and ``mode`` (it can be ``desc`` or ``asc``)
504
+
- **limit**: This parameter sets the limit on the number of lines/bars shown in a ``timeSeries`` or ``top`` panel. In the case of more entities being available than the limit, the top entities according to the sort will be shown. The default value is 10 for ``top`` panels (for ``timeSeries`` the default is defined by Sysdig Cloud itself). Note that increasing the limit above 10 is not officially supported and may cause performance and rendering issues
505
+
- **layout**: Size and position of the panel. The dashboard layout is defined by a grid of 12 columns, each row height is equal to the column height. For example, say you want to show 2 panels at the top: one panel might be 6 x 3 (half the width, 3 rows height) located in row 1 and column 1 (top-left corner of the viewport), the second panel might be 6 x 3 located in row 1 and position 7. The location is specified by a dictionary of ``row`` (row position), ``col`` (column position), ``size_x`` (width), ``size_y`` (height).
506
+
507
+
**Success Return Value**
508
+
A dictionary showing the details of the edited dashboard.
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.
807
+
808
+
**Arguments**
809
+
- **newdashname**: the name of the dashboard that will be created.
810
+
- **viewname**: the name of the dasboard to use as the template, as it appears in the Sysdig Cloud dashboard page.
811
+
- **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'*.
812
+
- **shared**: if set to True, the new dashboard will be a shared one.
813
+
- **annotations**: an optional dictionary of custom properties that you can associate to this dashboard for automation or management reasons
814
+
815
+
**Success Return Value**
816
+
A dictionary showing the details of the new dashboard.
Create a new dasboard using a dashboard template saved to disk.
853
+
854
+
**Arguments**
855
+
- **newdashname**: the name of the dashboard that will be created.
856
+
- **filename**: name of a file containing a JSON object for a dashboard in the format of an array element returned by :func:`~sdcclient._client.SdcClient.get_dashboards`
857
+
- **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'*.
858
+
- **shared**: if set to True, the new dashboard will be a shared one.
859
+
- **annotations**: an optional dictionary of custom properties that you can associate to this dashboard for automation or management reasons
860
+
861
+
**Success Return Value**
862
+
A dictionary showing the details of the new dashboard.
0 commit comments