Skip to content

Instantly share code, notes, and snippets.

@Aricg
Created June 12, 2014 20:17
Show Gist options
  • Select an option

  • Save Aricg/ed5b2fc76a8f52a583ff to your computer and use it in GitHub Desktop.

Select an option

Save Aricg/ed5b2fc76a8f52a583ff to your computer and use it in GitHub Desktop.
add graphs for host to tree jenkins
#!/bin/bash
usage () {
cat << EOF
Description: Add $hostid to Foo --> Bar tree
To Get trees do sudo php /var/lib/cacti/cli/add_tree.php --list-trees
To Dig into the parent tree sudo php /var/lib/cacti/cli/add_tree.php --list-nodes --tree-id=8
Usage: "$0" x
EOF
exit 1
}
if [[ -z "$1" ]]; then usage
fi
sudo php /var/lib/cacti/cli/add_tree.php \
--type=node \
--node-type=host \
--tree-id=8 \
--parent-node=97 \
--host-id="$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment