package
0.0.0-20250307055322-04d9774b42d2
Repository: https://github.com/snetsystems/cloudhub.git
Documentation: pkg.go.dev

# Functions

AlertServices generates alert chaining methods to be attached to an alert from all rule Services.
Data returns the tickscript data section for querying.
Escape sanitizes strings with single quotes for kapacitor.
HrefOutput returns the link to a kapacitor task httpOut Node given an id.
HTTPOut adds a kapacitor httpOutput to a tickscript.
InfluxOut creates a kapacitor influxDBOut node to write alert data to Database, RP, Measurement.
MarshalTICK converts tickscript to JSON representation.
NewAITask creates a task from a kapacitor client AI task.
NewClient creates a client that interfaces with Kapacitor tasks.
NewKapaClient creates a Kapacitor client connection.
NewTask creates a task from a kapacitor client task.
ParseAlertForTarget generates alert chaining methods targeted at specific Services to be attached to an alert from all rule Services.
Reverse converts tickscript to an AlertRule.
TargetedReverseParser is Target specific syntax.
Trigger returns the trigger mechanism for a tickscript.
UnmarshalTICK converts JSON to tickscript.
ValidateAlert checks if the alert is a valid kapacitor alert service.
Vars builds the top level vars for a kapacitor alert script.

# Constants

ChangeAmount triggers a relative alert when the value change by some amount.
ChangePercent triggers a relative alert when value changed by a percentage.
Deadman triggers when data is missing for a period of time.
ErrNotChronoTickscript signals a TICKscript that cannot be parsed into CloudHub data structure.
FetchRate is the rate Paginating Kapacitor Clients will consume responses.
HTTPEndpoint is the default location of the tickscript output.
ListTaskWorkers describes the number of workers concurrently fetching tasks from Kapacitor.
Prefix is prepended to the ID of all alerts.
Relative triggers when the value has changed compared to the past.
TaskGatherers is the number of workers collating responses from ListTaskWorkers.
Threshold triggers when value crosses a threshold.
ThresholdRange triggers when a value is inside or outside a range.

# Variables

AllAlerts are properties all alert types will have.
DeadmanTrigger checks if any data has been streamed in the last period of time.
Details is used only for alerts that specify detail string.
DurationField is the output field key for the duration of the alert.
IDTag is the output tag key for the ID of the alert.
LevelTag is the output tag key for the alert level information.
Measurement will be alerts so that the app knows where to get this data.
MessageField is the output field key for the message in the alert.
RelativeAbsoluteTrigger compares one window of data versus another (current - past).
RelativePercentTrigger compares one window of data versus another as a percent change.
RP will be autogen for alerts because it is default.
ThresholdRangeTrigger is the alert when data does not intersect the range.
ThresholdTrigger is the tickscript trigger for alerts that exceed a value.

# Structs

Alert defines alerting strings in template rendering.
Client communicates to kapacitor.
CommonVars includes all the variables of a cloudhub TICKScript.
CritCondition represents the operators that determine when the alert should go critical.
DeadmanVars represents a deadman alert.
FieldFunc represents the field used as the alert value and its optional aggregate function.
NewAITaskProcess is a struct that implements the TaskPreprocessor interface.
NewTaskProcess is a struct that implements the TaskPreprocessor interface.
NotEmpty is an error collector checking if strings are empty values.
PaginatingKapaClient is a Kapacitor client that automatically navigates through Kapacitor's pagination to fetch all results.
RangeVars represents the critical range where an alert occurs.
RelativeVars represents the critical range and time in the past an alert occurs.
Task represents a running kapacitor task.
ThresholdVars represents the critical value where an alert occurs.
WhereFilter filters the stream data in a TICKScript.

# Interfaces

KapaClient represents a connection to a kapacitor instance.
TaskPreprocessor is an interface for processing tasks after they are updated.

# Type aliases

Error are kapacitor errors due to communication or processing of TICKscript to kapacitor.