diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-29 22:03:24 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-29 22:03:24 (GMT) |
commit | 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch) | |
tree | 1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/178166-check_log_patch.txt | |
download | site-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz |
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts,
and configuration files.
Diffstat (limited to 'web/attachments/178166-check_log_patch.txt')
-rw-r--r-- | web/attachments/178166-check_log_patch.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/web/attachments/178166-check_log_patch.txt b/web/attachments/178166-check_log_patch.txt new file mode 100644 index 0000000..7debed7 --- /dev/null +++ b/web/attachments/178166-check_log_patch.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | *************** | ||
2 | *** 198,207 **** | ||
3 | $DIFF $logfile $oldlog > $tempdiff | ||
4 | |||
5 | # Count the number of matching log entries we have | ||
6 | ! count=`$GREP -c "$query" $tempdiff` | ||
7 | |||
8 | # Get the last matching entry in the diff file | ||
9 | ! lastentry=`$GREP "$query" $tempdiff | $TAIL --lines=1` | ||
10 | |||
11 | $RM -f $tempdiff | ||
12 | $CAT $logfile > $oldlog | ||
13 | --- 198,207 ---- | ||
14 | $DIFF $logfile $oldlog > $tempdiff | ||
15 | |||
16 | # Count the number of matching log entries we have | ||
17 | ! count=`$GREP -c "^<.*$query" $tempdiff` | ||
18 | |||
19 | # Get the last matching entry in the diff file | ||
20 | ! lastentry=`$GREP "^<.*$query" $tempdiff | $TAIL --lines=1` | ||
21 | |||
22 | $RM -f $tempdiff | ||
23 | $CAT $logfile > $oldlog | ||