4 # pmie with multiple -a arguments
5 # - problem reported by Jason Rappleye @ NASA
7 # Copyright (c) 2010 Ken McDonell. All Rights Reserved.
11 echo "QA output created by $seq"
13 # get standard environment, filters and checks
20 sed -e '/ Info: evaluator exiting/d'
23 status
=0 # success is the default!
24 $sudo rm -rf $tmp.
* $seq.full
25 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
27 echo "just one archive (kenj-pc-1) ..."
29 | pmie -z -A 1min -t 60 -a archives/kenj-pc-1 2>&1 \
31 kernel.all.load #'1 minute' > 1.5 -> print "%h: %v";
35 echo "expect error as same host ..."
37 | pmie -z -A 1min -t 60 -a archives/kenj-pc-1 -a archives/kenj-pc-2 2>&1 \
39 kernel.all.load #'1 minute' > 1.5 -> print "%h: %v";
43 echo "other archive (naslog) ..."
45 | pmie -z -A 1min -t 60 -a archives/naslog 2>&1 \
47 kernel.all.load #'1 minute' > 1.5 -> print "%h: %v";
51 echo "and now together kenj-pc-1 first ..."
53 | pmie -z -A 1min -t 60 -a archives/kenj-pc-1 -a archives/naslog 2>&1 \
55 kernel.all.load #'1 minute' > 1.5 -> print "%h: %v";
59 echo "and now together naslog first ..."
61 | pmie -z -A 1min -t 60 -a archives/naslog -a archives/kenj-pc-1 2>&1 \
63 kernel.all.load #'1 minute' > 1.5 -> print "%h: %v";
67 echo "two rules, host-specific (naslog first) ..."
69 | pmie -z -A 1min -t 60 -a archives/naslog -a archives/kenj-pc-1 2>&1 \
71 kernel.all.load :'kenj-pc' #'1 minute' > 1.5 -> print "%h: %v";
72 kernel.all.load :snort #'1 minute' > 1.5 -> print "%h: %v";
76 echo "and now with some_host ... only one value ever available, so >"
77 echo "condition is always false and some_host never gets a chance"
78 echo "... expect no output"
80 | pmie -z -A 1min -t 60 -a archives/naslog -a archives/kenj-pc-1 2>&1 \
82 some_host ( kernel.all.load :'kenj-pc' :snort #'1 minute' ) > 1.5 -> print "%h: %v";
86 echo "... and it does not matter which order the archives are given"
88 | pmie -z -A 1min -t 60 -a archives/kenj-pc-1 -a archives/naslog 2>&1 \
90 some_host ( kernel.all.load :'kenj-pc' :snort #'1 minute' ) > 1.5 -> print "%h: %v";