package
11.5.1+incompatible
Repository: https://github.com/grafana/grafana.git
Documentation: pkg.go.dev

# Functions

AlertInstanceGen provides a factory function that generates a random AlertInstance.
No description provided by the author
No description provided by the author
AlertRulesByIndex orders alert rules by rule group index.
No description provided by the author
No description provided by the author
No description provided by the author
CopyIntegrationWith creates a deep copy of Integration and then applies mutators to it.
CopyMatchers creates a deep copy of Matchers.
CopyNotificationSettings creates a deep copy of NotificationSettings.
CopyReceiverWith creates a deep copy of Receiver and then applies mutators to it.
CopyRule creates a deep copy of AlertRule.
CopySilence creates a deep copy of Silence.
CopySilenceWith creates a deep copy of Silence and then applies mutators to it.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GenerateGroupKey generates a random group key.
GenerateRuleKey generates a random alert rule key.
GenerateRuleKeyWithGroup generates a random alert rule key with group.
GroupByAlertRuleGroupKey groups all rules by AlertRuleGroupKey.
No description provided by the author
IntegrationConfigFromType returns an integration configuration for a given integration type.
IntegrationGen generates Integration using a base and mutators.
No description provided by the author
No description provided by the author
No description provided by the author
NewDefaultNotificationSettings creates a new default NotificationSettings with the specified receiver.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NotificationSettingsGen generates NotificationSettings using a base and mutators.
PatchPartialAlertRule patches `ruleToPatch` by `existingRule` following the rule that if a field of `ruleToPatch` is empty or has the default value, it is populated by the value of the corresponding field from `existingRule`.
ReceiverGen generates Receiver using a base and mutators.
ReceiverPermissions returns all possible silence permissions.
No description provided by the author
SilenceGen generates Silence using a base and mutators.
SilencePermissions returns all possible silence permissions.
SortAlertRuleGroupWithFolderTitle sorts AlertRuleGroupWithFolderTitle by folder UID and group name.
No description provided by the author
No description provided by the author
ValidateAlertInstance validates that the alert instance contains an alert rule id, and state.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AutogeneratedRouteLabel a label name used to distinguish alerts that are supposed to be handled by the autogenerated policy.
AutogeneratedRouteReceiverNameLabel a label name that contains the name of the receiver that should be used to send notifications for the alert.
AutogeneratedRouteSettingsHashLabel a label name that contains the hash of the notification settings that will be used to send notifications for the alert.
CacheSkipHeaderName name of header added to datasource query requests to denote request should not be cached.
Annotations are actually a set of labels, so technically this is the label name of an annotation.
No description provided by the author
No description provided by the author
FolderTitleLabel is the label that will contain the title of an alert's folder/namespace.
FromAlertHeaderName name of header added to datasource query requests to denote request is originating from Grafana Alerting.
GrafanaReservedLabelPrefix contains the prefix for Grafana reserved labels.
GroupByAll is a special value defined by alertmanager that can be used in a Route's GroupBy field to aggregate by all possible labels.
InstanceStateError is for an erroring alert.
InstanceStateFiring is for a firing alert.
InstanceStateNoData is for an alert with no data.
InstanceStateNormal is for a normal alert.
InstanceStatePending is for an alert that is firing but has not met the duration.
No description provided by the author
No description provided by the author
No description provided by the author
MigratedAlertIdAnnotation is created during legacy migration to store the ID of the migrated legacy alert rule.
MigratedContactLabelPrefix is created during legacy migration to route a migrated alert rule to a specific migrated channel.
MigratedLabelPrefix is a label prefix for all labels created during legacy migration.
MigratedMessageAnnotation is created during legacy migration to store the migrated alert message.
MigratedSilenceLabelErrorKeepState is a label that will match a silence rule intended for legacy alerts with error state = keep_state.
MigratedSilenceLabelNodataKeepState is a label that will match a silence rule intended for legacy alerts with nodata state = keep_state.
MigratedUseLegacyChannelsLabel is created during legacy migration to route to separate nested policies for migrated channels.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProvenanceNone reflects the provenance when no provenance is stored for the requested object in the database.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StateReasonAnnotation is the name of the annotation that explains the difference between evaluation state and alert state (i.e.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
DefaultNotificationSettingsGroupBy are the default required GroupBy fields for notification settings.
No description provided by the author
No description provided by the author
ErrAlertRuleFailedGenerateUniqueUID is an error for failure to generate alert rule UID.
No description provided by the author
No description provided by the author
ErrAlertRuleNotFound is an error for an unknown alert rule.
No description provided by the author
ErrCannotEditNamespace is an error returned if the user does not have permissions to edit the namespace.
No description provided by the author
ErrImageNotFound is returned when the image does not exist.
No description provided by the author
ErrNoDashboard is returned when the alert rule does not have a Dashboard UID in its annotations or the dashboard does not exist.
ErrNoPanel is returned when the alert rule does not have a PanelID in its annotations.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
InternalLabelNameSet are labels that grafana automatically include as part of the labelset.
No description provided by the author
LabelsUserCannotSpecify are labels that the user cannot specify when creating an alert rule.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

AdminConfiguration represents the ngalert administration configuration settings.
AlertConfiguration represents a single version of the Alerting Engine Configuration.
AlertInstance represents a single alert instance.
No description provided by the author
AlertQuery represents a single query associated with an alert definition.
AlertRule is the model for alert rules in unified alerting.
No description provided by the author
AlertRuleGroup is the base model for a rule group in unified alerting.
AlertRuleGroupKey is the identifier of a group of alerts.
No description provided by the author
No description provided by the author
AlertRuleGroupWithFolderFullpath extends AlertRuleGroup with orgID and folder title.
AlertRuleKey is the alert definition identifier.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AlertRuleWithOptionals This is to avoid having to pass in additional arguments deep in the call stack.
Condition contains backend expressions and queries and the RefID of the query or expression that will be evaluated.
CountAlertRulesQuery is the query for counting alert rules.
No description provided by the author
No description provided by the author
GetAlertRuleByIDQuery is the query for retrieving/deleting an alert rule by ID and organisation ID.
GetAlertRuleByUIDQuery is the query for retrieving/deleting an alert rule by UID and organisation ID.
No description provided by the author
GetAlertRulesGroupByRuleUIDQuery is the query for retrieving a group of alerts by UID of a rule that belongs to that group.
GetReceiverQuery represents a query for a single receiver.
GetReceiversQuery represents a query for receiver groups.
HistoricAlertConfiguration represents a previously used alerting configuration.
HistoryQuery represents a query for alert state history.
No description provided by the author
Integration is the domain model representation of an integration.
IntegrationConfig represents the configuration of an integration.
IntegrationField represents a field in an integration configuration.
No description provided by the author
ListAlertInstancesQuery is the query list alert Instances.
ListAlertRulesQuery is the query for listing alert rules.
ListNamespaceAlertRulesQuery is the query for listing namespace alert rules.
No description provided by the author
ListReceiversQuery represents a query for listing receiver groups.
MarkConfigurationAsAppliedCmd is the command for marking a previously saved configuration as successfully applied.
NotificationSettings represents the settings for sending notifications for a single AlertRule.
No description provided by the author
PermissionSet represents a set of permissions on a resource.
Receiver is the domain model representation of a receiver / contact point.
ReceiverMetadata contains metadata about a receiver's usage in routes and rules.
No description provided by the author
Record contains mapping information for Recording Rules.
RelativeTimeRange is the per query start and end time for requests.
RuleStatus contains info about a rule's current evaluation state.
SaveAlertmanagerConfigurationCmd is the command to save an alertmanager configuration.
SilenceMetadata contains metadata about a silence.
No description provided by the author
SilenceRuleMetadata contains metadata about the rule associated with a silence.
SilenceWithMetadata is a helper type for managing a silence with associated metadata.
No description provided by the author

# Interfaces

Identified describes a class of resources that have a UID.
Namespaced describes a class of resources that are stored in a specific namespace.
Provisionable represents a resource that can be created through a provisioning mechanism, such as Terraform or config file.

# Type aliases

No description provided by the author
No description provided by the author
AlertRuleGroupKeyBy is a function that defines the ordering of alert rule group keys.
No description provided by the author
AlertsRulesBy is a function that defines the ordering of alert rules.
No description provided by the author
Duration is a type used for marshalling durations.
No description provided by the author
swagger:enum ExecutionErrorState.
InstanceLabels is an extension to data.Labels with methods for database serialization.
InstanceStateType is an enum for instance states.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
swagger:enum NoDataState.
No description provided by the author
ReceiverPermission is a type for representing permission to perform a receiver action.
No description provided by the author
No description provided by the author
No description provided by the author
Silence is the model-layer representation of an alertmanager silence.
SilencePermission is a type for representing a silence permission.
SilencePermissionSet represents a set of permissions for a silence.