2020-11-12 14:21:00 +01:00
|
|
|
---
|
|
|
|
description: |
|
|
|
|
This is the `check_log` Nagios plugin, available e.g. in `/usr/lib/nagios/plugins/`.
|
|
|
|
functions:
|
|
|
|
file-read:
|
|
|
|
- code: |
|
|
|
|
LFILE=file_to_read
|
|
|
|
OUTPUT=output_file
|
2020-11-13 11:56:48 +01:00
|
|
|
check_log -F $LFILE -O $OUTPUT
|
|
|
|
cat $OUTPUT
|
2020-11-12 14:21:00 +01:00
|
|
|
file-write:
|
|
|
|
- code: |
|
|
|
|
LFILE=file_to_write
|
2020-12-20 19:53:16 +01:00
|
|
|
INPUT=input_file
|
2020-11-13 11:56:48 +01:00
|
|
|
check_log -F $INPUT -O $LFILE
|
2020-11-12 14:21:00 +01:00
|
|
|
sudo:
|
|
|
|
- code: |
|
|
|
|
LFILE=file_to_write
|
2020-12-20 19:53:16 +01:00
|
|
|
INPUT=input_file
|
2020-11-13 11:56:48 +01:00
|
|
|
sudo check_log -F $INPUT -O $LFILE
|
2020-11-12 14:21:00 +01:00
|
|
|
---
|