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 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 name
      query - The text of the flux query
      every - Check repetition interval
      messageTemplate - template that is used to generate and write a status message
      threshold - condition for that specific status
      orgID - 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 name
      query - The text of the flux query
      every - Check repetition interval
      messageTemplate - template that is used to generate and write a status message
      thresholds - conditions for that specific status
      orgID - 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 name
      query - The text of the flux query
      every - Check repetition interval
      timeSince - string duration before deadman triggers
      staleTime - string duration for time that a series is considered stale and should not trigger deadman
      messageTemplate - template that is used to generate and write a status message
      level - the state to record if check matches a criteria
      orgID - the organization that owns this check
      Returns:
      DeadmanCheck created
    • createCheck

      @Nonnull Check createCheck(@Nonnull Check check)
      Add new check.
      Parameters:
      check - check to create
      Returns:
      Check created
    • updateCheck

      @Nonnull Check updateCheck(@Nonnull Check check)
      Update a check.
      Parameters:
      check - check update to apply
      Returns:
      An updated check
    • updateCheck

      @Nonnull Check updateCheck(@Nonnull String checkID, @Nonnull CheckPatch patch)
      Update a check.
      Parameters:
      checkID - ID of check
      patch - update to apply
      Returns:
      An updated check
    • deleteCheck

      void deleteCheck(@Nonnull Check check)
      Delete a check.
      Parameters:
      check - the check to delete
    • deleteCheck

      void deleteCheck(@Nonnull String checkID)
      Delete a check.
      Parameters:
      checkID - the ID of check to delete
    • findCheckByID

      @Nonnull Check findCheckByID(@Nonnull String checkID)
      Get a check.
      Parameters:
      checkID - ID of check
      Returns:
      the check requested
    • findChecks

      @Nonnull List<Check> findChecks(@Nonnull String orgID)
      Get checks.
      Parameters:
      orgID - only show checks belonging to specified organization
      Returns:
      A list of checks
    • findChecks

      @Nonnull Checks findChecks(@Nonnull String orgID, @Nonnull FindOptions findOptions)
      Get all checks.
      Parameters:
      orgID - only show checks belonging to specified organization
      findOptions - find options
      Returns:
      A list of checks
    • getLabels

      @Nonnull List<Label> getLabels(@Nonnull Check check)
      List all labels for a check.
      Parameters:
      check - the check
      Returns:
      a list of all labels for a check
    • getLabels

      @Nonnull List<Label> getLabels(@Nonnull String checkID)
      List all labels for a check.
      Parameters:
      checkID - ID of the check
      Returns:
      a list of all labels for a check
    • addLabel

      @Nonnull LabelResponse addLabel(@Nonnull Label label, @Nonnull Check check)
      Add a label to a check.
      Parameters:
      label - label to add
      check - the check
      Returns:
      the label was added to the check
    • addLabel

      @Nonnull LabelResponse addLabel(@Nonnull String labelID, @Nonnull String checkID)
      Add a label to a check.
      Parameters:
      labelID - ID of label to add
      checkID - ID of the check
      Returns:
      the label was added to the check
    • deleteLabel

      void deleteLabel(@Nonnull Label label, @Nonnull Check check)
      Delete label from a check.
      Parameters:
      label - the label to delete
      check - he check
    • deleteLabel

      void deleteLabel(@Nonnull String labelID, @Nonnull String checkID)
      Delete label from a check.
      Parameters:
      labelID - the label id to delete
      checkID - ID of the check