Documentation ¶
Index ¶
- Constants
- func FriendlyFileName(path string) string
- type AlertDefaults
- type AlertMetrics
- type AlertMetricsOutput
- type AlertRule
- type AlertRuleOutput
- type AlertRulesGroup
- type DashboardGenerator
- func (dg *DashboardGenerator) DiscoverMetrics(loadedPkgs []*packages.Package) ([]*metric, error)
- func (dg *DashboardGenerator) GenerateAlertRules(filePath string, options OutputOptions) (AlertMetrics, error)
- func (dg *DashboardGenerator) GenerateGrafanaDashboard(destFilePath string, metrics []*metric, dashboardTags []string, ...) error
- type ElevatedErrorRateAlertRule
- type OutputOptions
- type PrometheusOperatorAlertRuleOutput
- type PrometheusOperatorAlertRulesGroup
- type PrometheusOperatorRulesSpec
- type RuleGenerator
- type ZeroToleranceErrorAlertRule
Constants ¶
View Source
const ( PrometheusAlertManagerFormat = iota PrometheusOperatorFormat )
View Source
const AlertMetricsTemplate = `boulevard-alert-rules: "{{ .AlertsCount }}"
boulevard-unique-metrics: "{{ .UniqueMetricsCount }}"`
View Source
const BadPrefix = "__bad__"
View Source
const DefaultDashboardTemplate = `` /* 6283-byte string literal not displayed */
View Source
const PromenadePkg = "github.com/poblish/promenade/api.PrometheusMetrics"
Variables ¶
This section is empty.
Functions ¶
func FriendlyFileName ¶
Types ¶
type AlertDefaults ¶
type AlertDefaults struct {
// contains filtered or unexported fields
}
type AlertMetrics ¶
type AlertMetrics struct {
Count int
}
type AlertMetricsOutput ¶
func (AlertMetricsOutput) WriteToFile ¶
func (a AlertMetricsOutput) WriteToFile(outputpath string)
type AlertRuleOutput ¶
type AlertRulesGroup ¶
type AlertRulesGroup struct { Name string Rules []AlertRuleOutput }
type DashboardGenerator ¶
type DashboardGenerator struct { RuleGenerator DefaultMetricsPrefix string DashboardUid string DashboardTitle string // contains filtered or unexported fields }
func (*DashboardGenerator) DiscoverMetrics ¶
func (dg *DashboardGenerator) DiscoverMetrics(loadedPkgs []*packages.Package) ([]*metric, error)
func (*DashboardGenerator) GenerateAlertRules ¶
func (dg *DashboardGenerator) GenerateAlertRules(filePath string, options OutputOptions) (AlertMetrics, error)
func (*DashboardGenerator) GenerateGrafanaDashboard ¶
func (dg *DashboardGenerator) GenerateGrafanaDashboard(destFilePath string, metrics []*metric, dashboardTags []string, externalMetricNames []string) error
type ElevatedErrorRateAlertRule ¶
type ElevatedErrorRateAlertRule struct { AlertRule // contains filtered or unexported fields }
type OutputOptions ¶
type PrometheusOperatorAlertRulesGroup ¶
type PrometheusOperatorAlertRulesGroup struct { Name string Rules []PrometheusOperatorAlertRuleOutput }
type PrometheusOperatorRulesSpec ¶
type PrometheusOperatorRulesSpec struct {
Groups []PrometheusOperatorAlertRulesGroup
}
PrometheusOperatorRulesSpec https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#prometheusrulespec
type RuleGenerator ¶
type RuleGenerator struct {
// contains filtered or unexported fields
}
type ZeroToleranceErrorAlertRule ¶
type ZeroToleranceErrorAlertRule struct { AlertRule // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.