Documentation ¶
Index ¶
- Constants
- Variables
- func BenchmarkParseCommandI(b *testing.B)
- func BenchmarkParseCommandII(b *testing.B)
- func BenchmarkReadAndExecuteExec(b *testing.B)
- func BenchmarkReadAndExecuteShell(b *testing.B)
- func CheckGearman(build string)
- func GearmanTop(build string)
- func ParseNegate(com *command)
- func Sendgearman(build string)
- func TestExecuteCommandArgListTooLongError(t *testing.T)
- func TestExecuteCommandFunnyQuotes(t *testing.T)
- func TestExecuteCommandOutOfFilesError(t *testing.T)
- func TestExecuteCommandWithTimeout(t *testing.T)
- func TestGetCommandBasename(t *testing.T)
- func TestReadAndExecute(t *testing.T)
- func Worker(build string)
- type CommandExecType
- type EPNCacheItem
- type EPNDaemon
- type InternalCheck
- type InternalCheckDummy
- type InternalCheckNSCWeb
- type MainStateType
- type Negate
- func (n *Negate) Apply(result *answer)
- func (n *Negate) ApplyNewCode(result *answer, from, target string)
- func (n *Negate) ConvertStatusNumber(arg string) string
- func (n *Negate) DefineFlags(flags *flag.FlagSet)
- func (n *Negate) Parse(args []string) error
- func (n *Negate) SetTimeoutReturnCode(result *answer)
- func (n *Negate) Status2Int(status string) int
Constants ¶
View Source
const ( LogLevelInfo = 0 LogLevelDebug = 1 LogLevelTrace = 2 LogLevelTrace2 = 3 )
define the available log level
View Source
const ( // DefaultConnectionTimeout sets the default connection timeout for tcp connections DefaultConnectionTimeout = 30 // UtilizationWatermarkLow sets the lower mark when deciding if worker should be reduced UtilizationWatermarkLow = 90 )
View Source
const ( // VERSION contains the actual lmd version VERSION = "1.5.2" // ExitCodeError is used for erroneous exits ExitCodeError = 2 // ExitCodeUnknown is used for unknown exits ExitCodeUnknown = 3 // ConnectionRetryInterval sets the number seconds in between connection retries ConnectionRetryInterval = 3 // OpenFilesBase sets the approximate number of open files excluded open files from worker OpenFilesBase = 50 // OpenFilesPerWorker sets the expected number of file handles per worker // (1 gearman connection, 2 fifo pipes for stderr/stdout, one on /dev/null, one sparse) OpenFilesPerWorker = 5 // OpenFilesExtraPercent adds 30% safety level when calculating required open files OpenFilesExtraPercent = 1.2 // ResultServerWorker sets the number of result worker ResultServerWorker = 10 // ResultServerQueueSize sets the queue size for results ResultServerQueueSize = 1000 // BlockProfileRateInterval sets the profiling interval when started with -profile BlockProfileRateInterval = 10 )
View Source
const EncryptionBlockSize = 16
View Source
const (
// EncryptionKeySize defines the exact size of the encryption key
EncryptionKeySize = 32
)
View Source
const NegateDefaultTimeout = 11
NegateDefaultTimeout sets the default timeout if negate is used
View Source
const ServiceAnswerSize = 4
Variables ¶
View Source
var LogFormat string
LogFormat sets the log format
Functions ¶
func BenchmarkParseCommandI ¶
func BenchmarkParseCommandII ¶
func CheckGearman ¶
func CheckGearman(build string)
func GearmanTop ¶
func GearmanTop(build string)
func ParseNegate ¶
func ParseNegate(com *command)
func TestGetCommandBasename ¶
func TestReadAndExecute ¶
Types ¶
type CommandExecType ¶
type CommandExecType int
CommandExecType is used to set the execution path
const ( // Shell uses /bin/sh Shell CommandExecType = iota // Exec uses exec without a shell Exec // EPN is the embedded perl interpreter EPN // Internal is for internal checks Internal )
type EPNCacheItem ¶
type InternalCheck ¶
type InternalCheckDummy ¶
type InternalCheckDummy struct{}
type InternalCheckNSCWeb ¶
type InternalCheckNSCWeb struct{}
type MainStateType ¶
type MainStateType int
MainStateType is used to set different states of the main loop
const ( // Reload flag if used after a sighup Reload MainStateType = iota // Shutdown is used when sigint received Shutdown // ShutdownGraceFully is used when sigterm received ShutdownGraceFully // Resume is used when signal does not change main state Resume )
type Negate ¶
type Negate struct { Timeout int TimeoutResult string OKStatus string WarningStatus string CriticalStatus string UnknownStatus string Substitute bool }
func (*Negate) ApplyNewCode ¶
func (*Negate) ConvertStatusNumber ¶
func (*Negate) DefineFlags ¶
func (*Negate) SetTimeoutReturnCode ¶
func (n *Negate) SetTimeoutReturnCode(result *answer)
func (*Negate) Status2Int ¶
Source Files ¶
- check_gearman.go
- client.go
- command.go
- configuration_parser.go
- decrypt.go
- dupserver.go
- encrypt.go
- epn.go
- gearman_top.go
- internal_check_dummy.go
- internal_check_nsc_web.go
- internal_checks.go
- internal_negate.go
- loader.go
- logger.go
- mainWorker.go
- mod_gearman_worker.go
- mod_gearman_worker_testcmd.go
- mod_gearman_worker_unix.go
- prometheus.go
- readAndExecute.go
- readAndExecute_test_linux.go
- resultserver.go
- send_gearman.go
- statusAdmin.go
- statusworker.go
- worker.go
Click to show internal directories.
Click to hide internal directories.