Documentation ¶
Index ¶
- Variables
- func Exporter(clientSet clients.ClientSets, wq workqueue.RateLimitingInterface)
- type AWSConfig
- type ChaosResultDetails
- type GaugeMetrics
- type MetricesCollecter
- type MonitoringEnabled
- type NamespacedScopeMetrics
- type ResultCollector
- type ResultData
- type ResultDetails
- func (r *ResultDetails) GetExperimentMetricsFromResult(chaosResult *litmuschaosv1alpha1.ChaosResult, clients clients.ClientSets) (bool, error)
- func (r *ResultDetails) GetResultDetails() ChaosResultDetails
- func (r *ResultDetails) GetResultList(clients clients.ClientSets, chaosNamespace string, ...) ([]*v1alpha1.ChaosResult, error)
- func (r *ResultDetails) SetResultDetails()
Constants ¶
This section is empty.
Variables ¶
var ( EngineContext = "context" WorkFlowName = "workflow_name" )
EngineLabelKey is key for ChaosEngineLabel
Functions ¶
func Exporter ¶
func Exporter(clientSet clients.ClientSets, wq workqueue.RateLimitingInterface)
Exporter continuously collects the chaos metrics for a given chaosengine
Types ¶
type ChaosResultDetails ¶
type ChaosResultDetails struct { Name string UID clientTypes.UID Namespace string AppKind string AppNs string AppLabel string PassedExperiments float64 FailedExperiments float64 AwaitedExperiments float64 ProbeSuccessPercentage float64 StartTime float64 EndTime float64 InjectionTime int64 TotalDuration float64 ChaosEngineName string ChaosEngineContext string Verdict string WorkflowName string FaultName string }
ChaosResultDetails contains chaosresult details
type GaugeMetrics ¶
type GaugeMetrics struct { ResultPassedExperiments *prometheus.GaugeVec ResultFailedExperiments *prometheus.GaugeVec ResultAwaitedExperiments *prometheus.GaugeVec ResultProbeSuccessPercentage *prometheus.GaugeVec ResultVerdict *prometheus.GaugeVec ExperimentStartTime *prometheus.GaugeVec ExperimentEndTime *prometheus.GaugeVec ExperimentTotalDuration *prometheus.GaugeVec ExperimentChaosInjectedTime *prometheus.GaugeVec NamespaceScopedTotalPassedExperiments *prometheus.GaugeVec NamespaceScopedTotalFailedExperiments *prometheus.GaugeVec NamespaceScopedTotalAwaitedExperiments *prometheus.GaugeVec NamespaceScopedExperimentsInstalledCount *prometheus.GaugeVec NamespaceScopedExperimentsRunCount *prometheus.GaugeVec ClusterScopedTotalPassedExperiments *prometheus.GaugeVec ClusterScopedTotalFailedExperiments *prometheus.GaugeVec ClusterScopedTotalAwaitedExperiments *prometheus.GaugeVec ClusterScopedExperimentsInstalledCount *prometheus.GaugeVec ClusterScopedExperimentsRunCount *prometheus.GaugeVec }
GaugeMetrics contains all the metrics definition
func (*GaugeMetrics) InitializeGaugeMetrics ¶
func (gaugeMetrics *GaugeMetrics) InitializeGaugeMetrics() *GaugeMetrics
InitializeGaugeMetrics defines schema of all the metrics
func (*GaugeMetrics) RegisterFixedMetrics ¶
func (gaugeMetrics *GaugeMetrics) RegisterFixedMetrics()
RegisterFixedMetrics register the prometheus metrics
type MetricesCollecter ¶
type MetricesCollecter struct { ResultCollector ResultCollector GaugeMetrics GaugeMetrics }
func (*MetricesCollecter) GetLitmusChaosMetrics ¶
func (m *MetricesCollecter) GetLitmusChaosMetrics(clients clients.ClientSets, overallChaosResults *[]*litmuschaosv1alpha1.ChaosResult, monitoringEnabled *MonitoringEnabled) (*time.Duration, error)
GetLitmusChaosMetrics derive and send the chaos metrics
type MonitoringEnabled ¶
MonitoringEnabled contains existence/availability of chaosEngines and chaosResults
type NamespacedScopeMetrics ¶
type NamespacedScopeMetrics struct { PassedExperiments float64 FailedExperiments float64 AwaitedExperiments float64 ExperimentRunCount float64 ExperimentsInstalledCount float64 }
NamespacedScopeMetrics contains metrics for the chaos namespace
type ResultCollector ¶
type ResultCollector interface { GetResultList(clients clients.ClientSets, chaosNamespace string, monitoringEnabled *MonitoringEnabled) ([]*v1alpha1.ChaosResult, error) GetExperimentMetricsFromResult(chaosResult *litmuschaosv1alpha1.ChaosResult, clients clients.ClientSets) (bool, error) SetResultDetails() GetResultDetails() ChaosResultDetails }
ResultCollector interface for the both functions GetResultList and getExperimentMetricsFromResult
type ResultData ¶
type ResultData struct { ChaosEngineContext string WorkFlowName string AppKind string AppNs string AppLabel string Verdict string Timer time.Time VerdictReset bool ProbeSuccessPercentage float64 FaultName string }
ResultData contains attributes to store metrics parameters which can be used while handling chaosresult deletion
type ResultDetails ¶
type ResultDetails struct {
// contains filtered or unexported fields
}
func (*ResultDetails) GetExperimentMetricsFromResult ¶
func (r *ResultDetails) GetExperimentMetricsFromResult(chaosResult *litmuschaosv1alpha1.ChaosResult, clients clients.ClientSets) (bool, error)
GetExperimentMetricsFromResult derive all the metrics data from the chaosresult and set into resultDetails struct
func (*ResultDetails) GetResultDetails ¶
func (r *ResultDetails) GetResultDetails() ChaosResultDetails
func (*ResultDetails) GetResultList ¶
func (r *ResultDetails) GetResultList(clients clients.ClientSets, chaosNamespace string, monitoringEnabled *MonitoringEnabled) ([]*v1alpha1.ChaosResult, error)
GetResultList return the result list correspond to the monitoring enabled chaosengine
func (*ResultDetails) SetResultDetails ¶
func (r *ResultDetails) SetResultDetails()