-
Notifications
You must be signed in to change notification settings - Fork 3
/
doc.go
46 lines (38 loc) · 1.95 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
Package nagios provides common types, constants, package-level variables,
performance data and methods for use with Nagios plugins.
# OVERVIEW
This package provides common functionality for use by plugins used by Nagios
(and similar) monitoring systems. The goal is to reduce code duplication for
monitoring plugins written in the Go programming language.
# PROJECT HOME
See our GitHub repo (https://github.com/atc0005/go-nagios) for the latest
code, to file an issue or submit improvements for review and potential
inclusion into the project.
# FEATURES
- Nagios state labels (e.g., StateOKLabel), state exit codes (e.g.,
StateOKExitCode)
- Nagios ServiceState type useful in client code as a way to map internal
check results to a Nagios service state value
- Nagios CheckOutputEOL constant useful for consistent newline display in
results displayed in web UI, email notifications
- Plugin type with ReturnCheckResults method used to process and return
all applicable check results to Nagios for further processing/display
- Optional support for collecting/emitting performance data generated by
plugins (default time metric emitted if using constructor)
- Supports "branding" callback function to display application name,
version, or other information as a "trailer" for check results provided to
Nagios
- Panics from client code are captured and reported
- Support for collecting multiple errors from client code
- Support for explicitly omitting Errors section in LongServiceOutput
(automatically omitted if none were recorded)
- Support for explicitly omitting Thresholds section in LongServiceOutput
(automatically omitted if none were recorded)
- Automatically omit LongServiceOutput section if not specify by client code
- Support for overriding text used for section headers/labels
# HOW TO USE
- See the code documentation here for specifics
- See the README for this project for examples
*/
package nagios