Documentation ¶
Overview ¶
Package reports provides functions for generating one-line summary (Service Output) and detailed overview (Long Service Output) "reports" of plugin service check results.
Index ¶
- func ComponentsIDList(componentsSet *components.Set, verbose bool) string
- func ComponentsOneLineCheckSummary(stateLabel string, componentsSet *components.Set, evalExcluded bool) string
- func ComponentsOverview(componentsSet *components.Set, omitOKComponents bool, verbose bool) string
- func ComponentsReport(_ string, filter components.Filter, componentsSet *components.Set, ...) string
- func ComponentsTable(componentsSet *components.Set, omitOKComponents bool, omitResultsSummary bool, ...) string
- func ComponentsVerbose(componentsSet *components.Set, omitOKComponents bool, verbose bool) string
- func DisableLogging()
- func EnableLogging()
- type ComponentsTableColumnFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComponentsIDList ¶
func ComponentsIDList(componentsSet *components.Set, verbose bool) string
ComponentsIDList generates a multi-column list of component IDs. This multi-column list can be used to populate component ID fields in tests and other batch processing tasks.
func ComponentsOneLineCheckSummary ¶
func ComponentsOneLineCheckSummary( stateLabel string, componentsSet *components.Set, evalExcluded bool, ) string
ComponentsOneLineCheckSummary is used to generate a one-line Nagios service check results summary. This is the line most prominent in notifications.
func ComponentsOverview ¶
func ComponentsOverview(componentsSet *components.Set, omitOKComponents bool, verbose bool) string
ComponentsOverview generates a report for use as LongServiceOutput content, intended for display by the monitoring system either via web UI or one or more notifications.
This report is intended to provide a very rough equivalent to viewing the statuspage for a service.
func ComponentsReport ¶
func ComponentsReport( _ string, filter components.Filter, componentsSet *components.Set, omitOKComponents bool, omitSummaryResults bool, verbose bool, ) string
ComponentsReport generates a summary of evaluated component status information along with specific verbose details intended to aid in troubleshooting check results at a glance.
This information is provided for use with the Long Service Output field commonly displayed on the detailed service check results display in the web UI or in the body of many notifications.
func ComponentsTable ¶
func ComponentsTable( componentsSet *components.Set, omitOKComponents bool, omitResultsSummary bool, columnsList *ComponentsTableColumnFilter, verbose bool, ) string
ComponentsTable generates a report in a tabular format for use as LongServiceOutput content, intended for display by the monitoring system either via web UI or one or more notifications. If specified, only non-operational status components will be listed, otherwise all components defined for the given Statuspage will be displayed.
If provided, the given columns list filter will be used to determine which details are emitted for applicable components. If not specified (e.g., a nil value is given), a default set of details are emitted for each applicable component.
func ComponentsVerbose ¶
func ComponentsVerbose(componentsSet *components.Set, omitOKComponents bool, verbose bool) string
ComponentsVerbose generates a verbose report for use as LongServiceOutput content, intended for display by the monitoring system either via web UI or one or more notifications.
This report is intended to display verbose details for a feed to help troubleshoot final results for a statuspage feed.
func DisableLogging ¶
func DisableLogging()
DisableLogging reapplies default package-level logging settings of muting all logging output.
func EnableLogging ¶
func EnableLogging()
EnableLogging enables logging output from this package. Output is muted by default unless explicitly requested (by calling this function).
Types ¶
type ComponentsTableColumnFilter ¶ added in v0.1.1
type ComponentsTableColumnFilter struct { GroupName bool GroupID bool ComponentName bool ComponentID bool Evaluated bool Status bool }
ComponentsTableColumnFilter specifies what columns should be emitted from the table output format. If not provided to applicable functions (e.g. a nil value), a default set of columns is used.
func (ComponentsTableColumnFilter) FieldsEnabled ¶ added in v0.1.1
func (ctf ComponentsTableColumnFilter) FieldsEnabled() int
FieldsEnabled indicates how many column fields are enabled for display.