Package com.influxdb.client
Interface ChecksApi
@ThreadSafe
public interface ChecksApi
The client of the InfluxDB 2.x that implement Check Api.
- Author:
- Jakub Bednar (18/09/2019 08:07)
-
Method Summary
Modifier and TypeMethodDescriptionAdd a label to a check.Add a label to a check.createCheck
(Check check) Add new check.createDeadmanCheck
(String name, String query, String every, String timeSince, String staleTime, String messageTemplate, CheckStatusLevel level, String orgID) Add new Deadman check.createThresholdCheck
(String name, String query, String every, String messageTemplate, Threshold threshold, String orgID) Add new Threshold check.createThresholdCheck
(String name, String query, String every, String messageTemplate, List<Threshold> thresholds, String orgID) Add new Threshold check.void
deleteCheck
(Check check) Delete a check.void
deleteCheck
(String checkID) Delete a check.void
deleteLabel
(Label label, Check check) Delete label from a check.void
deleteLabel
(String labelID, String checkID) Delete label from a check.findCheckByID
(String checkID) Get a check.findChecks
(String orgID) Get checks.findChecks
(String orgID, FindOptions findOptions) Get all checks.List all labels for a check.List all labels for a check.updateCheck
(Check check) Update a check.updateCheck
(String checkID, CheckPatch patch) Update a check.
-
Method Details
-
createThresholdCheck
@Nonnull ThresholdCheck createThresholdCheck(@Nonnull String name, @Nonnull String query, @Nonnull String every, @Nonnull String messageTemplate, @Nonnull Threshold threshold, @Nonnull String orgID) Add new Threshold check.- Parameters:
name
- the check namequery
- The text of the flux queryevery
- Check repetition intervalmessageTemplate
- template that is used to generate and write a status messagethreshold
- condition for that specific statusorgID
- the organization that owns this check- Returns:
- ThresholdCheck created
-
createThresholdCheck
@Nonnull ThresholdCheck createThresholdCheck(@Nonnull String name, @Nonnull String query, @Nonnull String every, @Nonnull String messageTemplate, @Nonnull List<Threshold> thresholds, @Nonnull String orgID) Add new Threshold check.- Parameters:
name
- the check namequery
- The text of the flux queryevery
- Check repetition intervalmessageTemplate
- template that is used to generate and write a status messagethresholds
- conditions for that specific statusorgID
- the organization that owns this check- Returns:
- ThresholdCheck created
-
createDeadmanCheck
@Nonnull DeadmanCheck createDeadmanCheck(@Nonnull String name, @Nonnull String query, @Nonnull String every, @Nonnull String timeSince, @Nonnull String staleTime, @Nonnull String messageTemplate, @Nonnull CheckStatusLevel level, @Nonnull String orgID) Add new Deadman check.- Parameters:
name
- the check namequery
- The text of the flux queryevery
- Check repetition intervaltimeSince
- string duration before deadman triggersstaleTime
- string duration for time that a series is considered stale and should not trigger deadmanmessageTemplate
- template that is used to generate and write a status messagelevel
- the state to record if check matches a criteriaorgID
- the organization that owns this check- Returns:
- DeadmanCheck created
-
createCheck
Add new check.- Parameters:
check
- check to create- Returns:
- Check created
-
updateCheck
Update a check.- Parameters:
check
- check update to apply- Returns:
- An updated check
-
updateCheck
Update a check.- Parameters:
checkID
- ID of checkpatch
- update to apply- Returns:
- An updated check
-
deleteCheck
Delete a check.- Parameters:
check
- the check to delete
-
deleteCheck
Delete a check.- Parameters:
checkID
- the ID of check to delete
-
findCheckByID
Get a check.- Parameters:
checkID
- ID of check- Returns:
- the check requested
-
findChecks
Get checks.- Parameters:
orgID
- only show checks belonging to specified organization- Returns:
- A list of checks
-
findChecks
Get all checks.- Parameters:
orgID
- only show checks belonging to specified organizationfindOptions
- find options- Returns:
- A list of checks
-
getLabels
List all labels for a check.- Parameters:
check
- the check- Returns:
- a list of all labels for a check
-
getLabels
List all labels for a check.- Parameters:
checkID
- ID of the check- Returns:
- a list of all labels for a check
-
addLabel
Add a label to a check.- Parameters:
label
- label to addcheck
- the check- Returns:
- the label was added to the check
-
addLabel
Add a label to a check.- Parameters:
labelID
- ID of label to addcheckID
- ID of the check- Returns:
- the label was added to the check
-
deleteLabel
Delete label from a check.- Parameters:
label
- the label to deletecheck
- he check
-
deleteLabel
Delete label from a check.- Parameters:
labelID
- the label id to deletecheckID
- ID of the check
-