Last active
August 29, 2015 14:02
-
-
Save Aricg/3a1d82e32cabad57dbb7 to your computer and use it in GitHub Desktop.
Add machine to cacti
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: pass the variables for description ip password privpass to add a host to cacti | |
| Example: | |
| ./$0 jenkins020 jenkins020.foo.org secret privpass | |
| EOF | |
| exit 1 | |
| } | |
| if [[ -z "$@" ]]; then usage | |
| fi | |
| sudo php /var/lib/cacti/cli/add_device.php \ | |
| --description="$1" \ | |
| --ip="$2" \ | |
| --template=9 \ | |
| --version=3 \ | |
| --username="cacti" \ | |
| --password="$3" \ | |
| --privpass="$4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment