Created
June 12, 2014 20:17
-
-
Save Aricg/ed5b2fc76a8f52a583ff to your computer and use it in GitHub Desktop.
add graphs for host to tree jenkins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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