Documentation
¶
Overview ¶
Package nrpe implements NRPE client/server library for go.
It supports plain mode and fully compatible with standard nrpe library.
Index ¶
Examples ¶
Constants ¶
const ( StatusOK = 0 StatusWarning = 1 StatusCritical = 2 StatusUnknown = 3 )
Result status codes
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
Command represents command name and argument list
func NewCommand ¶
NewCommand creates Command object with the given name and optional argument list
type CommandResult ¶
type CommandResult struct {
StatusLine string
StatusCode CommandStatus
}
CommandResult holds information returned from nrpe server
func Run ¶
Run specified command
Example ¶
conn, err := net.Dial("tcp", "127.0.0.1:5666")
if err != nil {
fmt.Println(err)
return
}
command := NewCommand("check_load")
// ssl = true, timeout = 0
result, err := Run(conn, command, true, 0)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(result.StatusLine)
os.Exit(int(result.StatusCode))
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
check_nrpe
command
check_nrpe is a command line NRPE client.
|
check_nrpe is a command line NRPE client. |