This is an old revision of the document!
Table of Contents
provisioning from csv
- type:
- userscript
- userscript:
- provisioning_from_csv
- description:
- This package provide tools to help users creating devices into cacti.
- version:
- 1.0
- pia:
- Not needed
- homepage:
- http://www.sfr.com/
- license:
- GPLv2
- date:
- 2011/06/08
- scripts:
- provisionning,
- cli
Download
This script can be download here: provisioning_cacti-1.0.tar.gz
Purpose
This package provide tools to help users creating devices into cacti. You can for example add a single device with a simple command line or even import a csv file with a lot of devices.
Features
Licence
These scripts are GPLv2, copyright SFR.
Prerequisites
perl, perl::DBI, perl::DBD::MySQL, perl::Graph, perl::Graph::Layderer, perl::Imager.
Usage
Configuration
- Edit the config file placed in the conf directory and check that the cacti path is correct.
- Set the options to the correct data queries.
Patch the cli/create_graph.php file
- If you want to use the –create-graph-multi option for importing scripts, you have to patch the cacti cli/create_graph.php file.
- copy the cli/add_graphs_filter.php in the cacti cli folder.1)
Importing one device
- Go to the host_add folder (here) and exec the following command :
perl scripts/import_host_to_cacti.pl --host <hostname or IP> --description <host description> --template <cacti host template> --snmp_version <1,2 or 3> --snmp_community <snmp community> [--network <graph tree name>] [--create-graph-multi] [--debug]
Importing multiple devices
- Create a csv file as in the csv/cacti_example.csv file.
- Go to the host_add folder and run the command:
perl scripts/import_csv_file_to_cacti.pl --file <path to the csv file> [--create-graph-multi] [--debug]
Additional Help?
If you need additional help, please go to http://forums.cacti.net/viewtopic.php?f=12&t=43082
Possible Bugs?
Sample Output
1)
The patch (and the patched version of the scripts) are in the cli folder.