Cacti: add hosts to alternate graph trees

This adds support for several graph trees and adds hosts to those
trees based on their hostnames.

Change-Id: Ifdacc400d864bf320fc35367de47d0be7c72163d
This commit is contained in:
James E. Blair 2016-02-24 14:53:57 -08:00
parent 1b7b8e0569
commit 653df410d8

View File

@ -12,7 +12,14 @@ php -q add_device.php --description="$HOST_NAME" --ip="$HOST_NAME" \
HOST_ID=`php -q add_graphs.php --list-hosts |grep $HOST_NAME|cut -f 1`
TREE_ID=`php -q add_tree.php --list-trees |grep "All Hosts"|cut -f 1`
if [[ $HOST_NAME =~ hpuswest\.ic\.openstack\.org ]]; then
TREE_NAME='Infra Cloud West'
else
TREE_NAME='All Hosts'
fi
TREE_ID=`php -q add_tree.php --list-trees |grep "$TREE_NAME"|cut -f 1`
php -q add_tree.php --type=node --node-type=host --tree-id=$TREE_ID \
--host-id=$HOST_ID