package
0.0.0-20240903102346-33d79771b6fd
Repository: https://github.com/redhatinsights/ccx-notification-service.git
Documentation: pkg.go.dev

# Functions

AddMetricsWithNamespaceAndSubsystem register the desired metrics using a given namespace.
IssueNotInReport searches for a specific issue in given OCP report.
IssuesEqual compares two issues from reports.
New constructs new implementation of Differ interface.
NewFromConnection function creates and initializes a new instance of Storage interface from prepared connection.
NewStorage function creates and initializes a new instance of Storage interface.
PerformCleanupOnStartup function cleans up the database before differ is started.
PerformCleanupOperation function performs selected cleanup operation.
PushCollectedMetrics function pushes the metrics to the configured prometheus push gateway.
PushMetricsInLoop pushes the metrics in a loop until context is done.
Run function is entry point to the differ.

# Constants

Messages.
other messages.
other messages.
other messages.
Constants used to filter events.
Constants used to filter events.
other messages.
Metrics helps.
Metrics names.
ExitStatusCleanerError is raised when clean operation is not successful.
ExitStatusConfiguration is an error code related to program configuration.
ExitStatusError is a general error code.
ExitStatusEventFilterError is raised when event filter is not set correctly.
ExitStatusFetchContentError is returned in case content cannot be fetch correctly.
ExitStatusKafkaBrokerError is for kafka broker connection establishment errors.
ExitStatusKafkaConnectionNotClosedError is raised when connection cannot be closed.
ExitStatusKafkaProducerError is for kafka event production failures.
ExitStatusMetricsError is raised when prometheus metrics cannot be pushed.
ExitStatusOK means that the tool finished with success.
ExitStatusServiceLogError is raised when Service Log notifier cannot be initialized.
ExitStatusStorageError is returned in case of any consumer-related error.
Metrics helps.
Metrics names.
SQL statements.
other messages.
Metrics helps.
Metrics names.
Metrics helps.
Metrics names.
Metrics helps.
Metrics names.
Metrics helps.
Metrics names.
other messages.
Metrics helps.
Metrics names.
SQL statements.
Metrics helps.
Metrics names.
Metrics helps.
Metrics names.
SQL statements.
SQL statements.
Metrics helps.
Metrics names.
SQL statements.
Messages.
Metrics helps.
Metrics names.
Constants used for creating Service Log entries - there is a length limit on text fields in Service Log, which will return an error status code in case this limit is exceeded.
Constants used for creating Service Log entries - there is a length limit on text fields in Service Log, which will return an error status code in case this limit is exceeded.
Constants used for creating Service Log entries - there is a length limit on text fields in Service Log, which will return an error status code in case this limit is exceeded.
Constants used for creating Service Log entries - there is a length limit on text fields in Service Log, which will return an error status code in case this limit is exceeded.
Metrics helps.
Metrics names.
other messages.
TotalRiskCritical is the numerical representation of 'Critical' total risk.
TotalRiskImportant is the numerical representation of 'Important ' total risk.
TotalRiskLow is the numerical representation of 'Low' total risk.
TotalRiskMax is the highest total risk handled.
TotalRiskMin is the lowest total risk handled.
TotalRiskModerate is the numerical representation of 'Moderate' total risk.
other messages.

# Variables

DeserializeReportErrors shows number of errors when deserializing a report retrieved from the new_reports table.
FetchContentErrors shows number of errors during fetch from content service.
NoSeverityTotalRisk shows how many times a total risk not mapped to a service log severity is received.
NotificationNotSentErrorState shows number of notifications not sent because of a Kafka producer error.
NotificationNotSentSameState shows number of notifications not sent because we parsed the same report.
NotificationSent shows number notifications sent to the configured Kafka topic.
ProducerSetupErrors shows number of errors when setting up Kafka producer.
ReadClusterListErrors shows number of errors when reading cluster list from new_reports table.
ReadReportedErrors shows number of errors when getting previously notified reports from reported table.
ReadReportForClusterErrors shows number of errors when getting latest report for a given cluster.
ReportWithHighImpact shows number of reports with total risk higher than the configured threshold.
StorageSetupErrors shows number of errors when setting up storage.

# Structs

ClusterFilterStatistic is a structure containing elementary statistic about clusters being filtered by filterClusterList function.
DBStorage is an implementation of Storage interface that use selected SQL like database like SQLite, PostgreSQL, MariaDB, RDS etc.
Differ is the struct that holds all the dependencies and configuration of this service.
EventThresholds structure contains all threshold values for event filter evaluator.
EventValue structure contains all event values for event filter evaluator.
FetchStatusContentError occurs when failing fetching the status content.
KafkaBrokerError represent an error related to Kafka initialization.
NotificationURLs structure contains all the URLs that are inserted in the notifications.
PushGatewayClient is a simple wrapper over http.Client so that prometheus can do HTTP requests with the given authentication header.
ServiceLogError represents an error when creating ServiceLog connection.
StatusConfiguration is related to any configuration error.
StatusEventFilterError is related to any notification filters configuration error.
StatusMetricsError is related to any storage error.
StatusStorageError is related to any storage error.

# Interfaces

Storage represents an interface to almost any database or storage system.