26 lines
670 B
YAML
26 lines
670 B
YAML
cmd: /usr/bin/w
|
|
args:
|
|
- -i
|
|
exitcode_map:
|
|
- from: 23
|
|
to: 3
|
|
- from: -1 # Map all nonzero-exit codes to 1=WARN
|
|
to: 1
|
|
- from: 0 # Map exitcode 0 also to 1=WARN
|
|
to: 1
|
|
log_matches:
|
|
- regex: .*192.168.*.*
|
|
state: 1
|
|
- regex: ".*tty[0-9].+-.*" # 2=CRIT when sombody is logged on the console
|
|
state: 2
|
|
alt_msg: "%v -> a user is logged in at console"
|
|
- regex: .+ # Include All other lines as OK
|
|
state: 0
|
|
hide_output: False # Dont't hide output, but pass through
|
|
last_run_warn: # How often is this job to be expected to be executed
|
|
val: 8
|
|
unit: "h"
|
|
last_run_crit:
|
|
val: 16
|
|
unit: "h"
|