3 # Check dynamic metrics work with PMAPI clients - DSO PMDA version
4 # See also 467 for the related tests using pmdumptext
6 # Copyright (c) 2009 Ken McDonell. All Rights Reserved.
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
17 if grep -q ' RESERVED_DO_NOT_USE[ ]*511' $PCP_VAR_DIR/pmns
/stdpmid
21 echo "No support for dynamic PMNS entries" >$seq.notrun
22 echo "$seq: [not run] `cat $seq.notrun`"
26 status
=0 # success is the default!
28 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
34 # sample ... sampledso.secret.foo.bar.max.redirect 8 0 0 0 0 0 0 4 0
35 /secret\.foo\.bar\.max\.redirect/ { if ($2 > 3 )
36 print $1,"> 3 values ..."
47 pminfo $
* | LC_COLLATE
=POSIX
sort
48 pmprobe
-v $
* | _filter_probe | LC_COLLATE
=POSIX
sort
51 # real QA test starts here
53 echo "PMNS traversal tests ..."
54 pminfo sampledso |
grep '\.secret\.' | LC_COLLATE
=POSIX
sort
56 _do sampledso.secret.bar sampledso.secret.foo
57 _do sampledso.secret.foo.bar.grunt
61 pmval
-s 3 -t 0.1 sampledso.secret.foo.bar.grunt.five \
62 |
sed -e '/^host:.*$/s/.*/HOST/'
66 echo 'sampledso.secret.foo.bar.four == 4 -> print "Bingo!"' \
67 | pmie
-t 0.1 -T 0.3 2>&1 \
69 |
sed -e '/.* Info: evaluator exiting/d' \
74 cat <<'End-of-File' >$tmp.config
75 log mandatory on 100 msec {
77 sampledso.secret.foo.one
78 sampledso.secret.foo.two
79 sampledso.secret.foo.bar.three
80 sampledso.secret.foo.bar.four
81 sampledso.secret.foo.bar.grunt
84 echo "+ pmlogger -s 3 -c $tmp.config -l $tmp.log $tmp" >>$seq.full
85 pmlogger
-s 3 -c $tmp.config
-l $tmp.log
$tmp
87 cat $tmp.log
>>$seq.full