1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#!/bin/sh
# PCP QA Test No. 1301
# Exercise pmproxy metrics functionality via MMV PMDA.
#
# Copyright (c) 2019 Red Hat.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
#
# pmproxy is default installed, but may be blocked by
# package upgrades choosing to not override existing
# pmcd.conf files that have local modifications. In
# this case, not much we can do - prefer to not have
# to add Install/Remove scripts for this (core) PMDA.
#
pminfo pmproxy >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "pmproxy names not in the namespace"
grep -q ^pmproxy "$PCP_PMCDCONF_PATH" >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "pmproxy not configured in pmcd.conf"
_cleanup()
{
_restore_config "$PCP_TMP_DIR/pmproxy"
cd $here
$sudo rm -rf $tmp $tmp.*
}
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_save_config "$PCP_TMP_DIR/pmproxy"
$sudo rm -rf "$PCP_TMP_DIR/pmproxy/test"
echo "Creating test metrics"
$sudo $here/src/mmv_simple $PCP_TMP_DIR/pmproxy/test
echo Done; echo
echo "Fetching test metrics"
pminfo -df pmproxy.test
# success, all done
status=0
exit
|