Documentation ¶
Overview ¶
Package rabbitpushgnotifier contains a simple ViolationsNotifier that send violations to a rabbit queue and also the queries to Prometheus needed to get all the information about the violation.
Package rabbitpushgnotifier contains a simple ViolationsNotifier that send violations to a rabbit queue.
Index ¶
- Constants
- func ChecknotStartedFunctions(prometheusRootURL string, jobId string, resource string) []string
- func ConnectQueue(rabURL string) error
- func New(config *viper.Viper) notifier.ViolationNotifier
- func SendViolationToPrometheus(pushg string, agr string, gua string, key string, violtime string, fun string, ...)
- type QueryResp
- type RabbitpushgNotifier
Constants ¶
View Source
const ( // PushgatewayURLPropertyName is the config property name of the Pushgateway URL PushgatewayURLPropertyName = "pushgatewayUrl" // RabbitMQPropertyName is the config property name of the Rabbit connection RabbitMQPropertyName = "rabbitMQ" // Name is the unique identifier of this notifier Name = "rabbitpushg" // PrometheusURLPropertyName is the config property name of the Prometheus URL PrometheusURLPropertyName = "prometheusUrl" )
Variables ¶
This section is empty.
Functions ¶
func ChecknotStartedFunctions ¶
*
- ChecknotStartedFunctions queries Prometheus for the functions that didn't start from a job.
- Returns a []string with the instances ids of no started functions, e.g. []string{"935882-0-A000-00002", "935882-0-A000-00003"}
Types ¶
type RabbitpushgNotifier ¶
type RabbitpushgNotifier struct {
// contains filtered or unexported fields
}
RabbitpushgNotifier logs violations on a Rabbit queue and on a Pushgateway monitor.
func (RabbitpushgNotifier) NotifyViolations ¶
func (n RabbitpushgNotifier) NotifyViolations(agreement *model.Agreement, result *assessment_model.Result)
NotifyViolations implements ViolationNotifier interface
Click to show internal directories.
Click to hide internal directories.