Samples

Another Nearly Useful Sample

[sample uptime]
# this help is displayed only when -m MODE or -m MODE -s SUBMODE are specified AND --inihelp is used on the command line
inihelp=<<EOT
MODE=sample, SUBMODE=uptime
============================
Help for a sample check that is similar to checkuptime. This one is somewhat simpler and uses seconds.
EOT

query=Select SystemUpTime,Frequency_Sys100NS,Timestamp_Object from Win32_PerfRawData_PerfOS_System

customfield=_UptimeSec,PERF_ELAPSED_TIME,SystemUpTime,%.1f

test=_UptimeSec

display=_DisplayMsg||~|~| - ||
display=_UptimeSec|sec|System Uptime is |~|.||

perf=_UptimeSec|sec|Uptime Seconds

A Nearly Useful Sample

Description: 

This sample contains a single check that is nearly useful. It is useful since it returns useful information, but it is only nearly useful since the core mode, checkprocess, actually does it better. This was actually the first way I planned to implement this check, but then decided it would be better off as and option to checkprocess.

A Useful Sample

Description: 

This sample actually contains a couple of useful checks.
They check IO performance. The first check against a logical drive, the second against a physical drive.
Fields to check for Warning/critical states are provided along with performance data.

The Logical check needs a single parameter - the Windows drive letter eg C:
If you do not specify ARG1 then the check will not work.

The Physical check needs a single parameter - the Windows drive letter eg C:
If you do not specify ARG1 then the check will return information on the first drive it finds (because the query uses LIKE and %.)

I have not tested the physical check on too many systems so the physical drives names might not be as expected. If you are not finding what you expect leave ARG1 blank and use the -d parameter to view the debug output and find the actual WMI Query output - that will include the actual physical drives names for that specific system.

A Complete Sample

Description: 

This sample shows a complete check (ie uses/list every possible setting) and heavily documents how each field should be used.
This is not a very useful check in itself (although it should largely work).

A Minimal Sample

Description: 

This sample shows a very minimalistic check. It includes the minimum ini fields to make the check usable - inihelp, query and display.
This is not a very useful check in itself.