pmrep: update TODO, man page
[pcp.git] / qa / 1067
blob6920dd9575d9b41db647600a252dcd72af4df772
1 #!/bin/sh
2 # PCP QA Test No. 1067
3 # Exercise the zbxpcp Zabbix integration module.
5 # Copyright (c) 2015 Red Hat.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 which zabbix_agentd >/dev/null 2>&1 || \
17 _notrun "No zabbix_agentd binary found"
18 test -f /etc/zabbix/zabbix_agentd.conf || \
19 _notrun "No configuration for the Zabbix agent daemon"
20 grep -q zbxpcp /etc/zabbix/zabbix_agentd.conf || \
21 _notrun "No configuration of the Zabbix PCP module"
23 status=1 # failure is the default!
24 $sudo rm -rf $tmp $tmp.* $seq.full
25 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
27 _filter_values()
29 # expect lines like:
30 # pcp.sample.dodgey.control [u|5]
31 # pcp.sample.dodgey.value[d1] [u|35]
32 # pcp.sample.bad.novalues [m|ZBX_NOTSUPPORTED] [No value available.]
33 # d|u|s -> zabbix types;
34 # m is error encodings -> allow through
36 sed \
37 -e 's/\[[dus]|.*\]$/VALUE/g' \
38 -e '/sample\.scramble/d' \
39 #end
42 # real QA test starts here
43 echo "== request specific values"
45 # verify values for single metrics/instances
46 zabbix_agentd -t pcp.sample.long.one
47 zabbix_agentd -t 'pcp.sample.long.bin[bin-100]'
48 zabbix_agentd -t pcp.sample.ulonglong.million
49 zabbix_agentd -t pcp.sample.float.hundred
50 zabbix_agentd -t pcp.sample.double.ten
52 # string metrics
53 zabbix_agentd -t pcp.sample.string.null
54 zabbix_agentd -t pcp.sample.string.hullo
56 # aggregate/event metrics
57 zabbix_agentd -t pcp.sample.aggregate.hullo
58 zabbix_agentd -t 'pcp.sample.event.records[fungus]'
60 # other error cases
61 zabbix_agentd -t pcp.sample.bad.nosupport
62 zabbix_agentd -t pcp.sample.bad.novalues
64 # verify enumeration of all metrics
65 echo "== enumerated names and filtered values"
66 zabbix_agentd -p | fgrep pcp.sample. | _filter_values
68 # success, all done
69 status=0
70 exit