3 # Exercise the zbxpcp Zabbix integration module.
5 # Copyright (c) 2015 Red Hat.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
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
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
37 -e 's/\[[dus]|.*\]$/VALUE/g' \
38 -e '/sample\.scramble/d' \
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
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]'
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