diff --git a/inc_pluginfunctions.md b/inc_pluginfunctions.md index 79c5deca377ce45c8e76871592eee9d2f55ab78e..52aa1a1e46a8d9014636b565fdd2a8daae657c84 100644 --- a/inc_pluginfunctions.md +++ b/inc_pluginfunctions.md @@ -1,4 +1,4 @@ -# [IML Checks for Icinga / Nagios](redme.md) +# [IML Checks for Icinga / Nagios](readme.md) ## Shared functions @@ -8,13 +8,14 @@ All scripts start with sourcing a shared bash file . `dirname $0`/inc_pluginfunctions -In that script are several function starting with prefix **ph.** (=plugin helper) +In that script are several functions starting with prefix **ph.** (=plugin helper) ### Available functions This is a list in alphabetic order **ph.abort** [TEXT] + Shows error message and exit with status unknown. **ph.exit** @@ -52,6 +53,8 @@ You can override it as often you want during the script. Based on the last setti set statuscode by verifying integer(!) value with crtical and warning limit +Example: + ph.setStatusByLimit $ramUsage $iWarnLimit $iCriticalLimit **ph.status** [TEXT] @@ -70,6 +73,8 @@ Add performance data. Their output will be written with ph.exit. So you are free For increasing system counters: get changerate per second since last check. +Example: + # speed in byte per sec based on last stored value and its age iSpeedRead=` ph.perfdeltaspeed "netio-${myinterface}-rx" $iRead` @@ -79,7 +84,9 @@ dump performance data (if u are not using ph.exit) **ph.require** [PROG [PROG2]] -check if a binary PROG exists in search path (=are installed) - if not then execution stops with ph.abort +check if a binary PROG exists in search path (=are installed) - if not then execution stops with showing a warning message and status unknown (using ph.abort). + +Example: ph.reqire bc lsblk diff --git a/readme.md b/readme.md index 777058c5e635bf2594c528e84a413382166a1d3d..1a4f17f5cca2a676da00f0ebce1d664f40d3d958 100644 --- a/readme.md +++ b/readme.md @@ -11,4 +11,8 @@ IML - we are the Institute for Medical Education at university in Bern, Switzerl ## Scripts -[[inc_pluginfunctions.md]] \ No newline at end of file +[inc_pluginfunctions](inc_pluginfunctions.md) + +## Checks + +... \ No newline at end of file