Interface IChecksApi
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public interface IChecksApi
Methods
AddLabelAsync(Label, Check, CancellationToken)
Add a label to a check.
Declaration
Task<Label> AddLabelAsync(Label label, Check check, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Label | label | label to add |
Check | check | the check |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Label> | the label was added to the check |
AddLabelAsync(String, String, CancellationToken)
Add a label to a check.
Declaration
Task<Label> AddLabelAsync(string labelId, string checkId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | labelId | ID of label to add |
System.String | checkId | ID of the check |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Label> | the label was added to the check |
CreateCheckAsync(Check, CancellationToken)
Add new check.
Declaration
Task<Check> CreateCheckAsync(Check check, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Check | check | check to create |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Check> | Check created |
CreateDeadmanCheckAsync(String, String, String, String, String, String, CheckStatusLevel, String, CancellationToken)
Add new Deadman check.
Declaration
Task<DeadmanCheck> CreateDeadmanCheckAsync(string name, string query, string every, string timeSince, string staleTime, string messageTemplate, CheckStatusLevel level, string orgId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the check name |
System.String | query | The text of the flux query |
System.String | every | Check repetition interval |
System.String | timeSince | string duration before deadman triggers |
System.String | staleTime | string duration for time that a series is considered stale and should not trigger deadman |
System.String | messageTemplate | template that is used to generate and write a status message |
CheckStatusLevel | level | the state to record if check matches a criteria |
System.String | orgId | the organization that owns this check |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<DeadmanCheck> | DeadmanCheck created |
CreateThresholdCheckAsync(String, String, String, String, Threshold, String, CancellationToken)
Add new Threshold check.
Declaration
Task<ThresholdCheck> CreateThresholdCheckAsync(string name, string query, string every, string messageTemplate, Threshold threshold, string orgId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the check name |
System.String | query | The text of the flux query |
System.String | every | Check repetition interval |
System.String | messageTemplate | template that is used to generate and write a status message |
Threshold | threshold | condition for that specific status |
System.String | orgId | the organization that owns this check |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<ThresholdCheck> | ThresholdCheck created |
CreateThresholdCheckAsync(String, String, String, String, List<Threshold>, String, CancellationToken)
Add new Threshold check.
Declaration
Task<ThresholdCheck> CreateThresholdCheckAsync(string name, string query, string every, string messageTemplate, List<Threshold> thresholds, string orgId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the check name |
System.String | query | The text of the flux query |
System.String | every | Check repetition interval |
System.String | messageTemplate | template that is used to generate and write a status message |
List<Threshold> | thresholds | conditions for that specific status |
System.String | orgId | the organization that owns this check |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<ThresholdCheck> | ThresholdCheck created |
DeleteCheckAsync(Check, CancellationToken)
Delete a check.
Declaration
Task DeleteCheckAsync(Check check, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Check | check | the check to delete |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task |
DeleteCheckAsync(String, CancellationToken)
Delete a check.
Declaration
Task DeleteCheckAsync(string checkId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | checkId | checkID the ID of check to delete |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task |
DeleteLabelAsync(Label, Check, CancellationToken)
Delete label from a check.
Declaration
Task DeleteLabelAsync(Label label, Check check, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Label | label | the label to delete |
Check | check | the check |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task |
DeleteLabelAsync(String, String, CancellationToken)
Delete label from a check.
Declaration
Task DeleteLabelAsync(string labelId, string checkId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | labelId | labelID the label id to delete |
System.String | checkId | checkID ID of the check |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task |
FindCheckByIdAsync(String, CancellationToken)
Get a check.
Declaration
Task<Check> FindCheckByIdAsync(string checkId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | checkId | ID of check |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Check> | the check requested |
FindChecksAsync(String, CancellationToken)
Get checks.
Declaration
Task<List<Check>> FindChecksAsync(string orgId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | orgId | only show checks belonging to specified organization |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<Check>> | A list of checks |
FindChecksAsync(String, FindOptions, CancellationToken)
Get all checks.
Declaration
Task<Checks> FindChecksAsync(string orgId, FindOptions findOptions, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | orgId | only show checks belonging to specified organization |
FindOptions | findOptions | find options |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Checks> | A list of checks |
GetLabelsAsync(Check, CancellationToken)
List all labels for a check.
Declaration
Task<List<Label>> GetLabelsAsync(Check check, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Check | check | the check |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<Label>> | a list of all labels for a check |
GetLabelsAsync(String, CancellationToken)
List all labels for a check.
Declaration
Task<List<Label>> GetLabelsAsync(string checkId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | checkId | ID of the check |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<Label>> | a list of all labels for a check |
UpdateCheckAsync(Check, CancellationToken)
Update a check.
Declaration
Task<Check> UpdateCheckAsync(Check check, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Check | check | check update to apply |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Check> | An updated check |
UpdateCheckAsync(String, CheckPatch, CancellationToken)
Update a check.
Declaration
Task<Check> UpdateCheckAsync(string checkId, CheckPatch patch, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | checkId | ID of check |
CheckPatch | patch | update to apply |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Check> | An updated check |