Documentation ¶
Overview ¶
Package nrpe implements NRPE client/server library for go.
It supports plain and ssl modes and fully compatible with standard nrpe library. Hence you would need libssl-dev package installed on both the client and the server side.
Index ¶
Examples ¶
Constants ¶
View Source
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))
Output:
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
check_nrpe
check_nrpe is a command line NRPE client.
|
check_nrpe is a command line NRPE client. |
Click to show internal directories.
Click to hide internal directories.