Cacti (home)ForumsDocumentation

Differences

This shows you the differences between two versions of the page.

userscript:provisioning_from_csv [2011/06/10 15:20]
X-dark created
userscript:provisioning_from_csv [2019/10/29 15:16] (current)
Line 1: Line 1:
-====== provisioning from csv ======+====== Provisioning from CSV ======
  
 ---- dataentry plugin_style ---- ---- dataentry plugin_style ----
Line 8: Line 8:
 version: 1.0 version: 1.0
 pia_version: Not needed pia_version: Not needed
-homepage_url: http://forums.cacti.net/viewtopic.php?f=12&t=43082+homepage_url: http://www.sfr.com/ 
 +license: GPLv2
 date: 2011/06/08 date: 2011/06/08
 email: email:
-scripts_tags: provisionning, cli+scripts_tags: provisioning, cli
 ---- ----
 ===== Download ===== ===== Download =====
Line 25: Line 26:
  
 ===== Licence ===== ===== Licence =====
-This scripts are GPLv2, copyright SFR.+These scripts are GPLv2, copyright SFR.
  
 ===== Prerequisites ===== ===== Prerequisites =====
Line 32: Line 33:
 ===== Usage ===== ===== Usage =====
  
-**__1. Configuration :__** +==== 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.+
  
-__**2. Patch the cli/create_graph.php file :**__ +  Edit the config file placed in the conf directory and check that the cacti path is correct
-If you want to use the --create-graph-multi option for importing scripts, you have to patch the cacti cli/create_graph.php file+  * Set the options to the correct data queries.
-Simply copy the cli/add_graphs_filter.php in the cacti cli folder. +
-The patch (and the patched version of the scripts) are in the cli folder.+
  
-__**3. import only one host :**__ +==== Patch the cli/create_graph.php file ====
-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]+
  
-__**4. importing a lot of devices :**__ +  If you want to use the --create-graph-multi option for importing scripts, you have to patch the cacti cli/create_graph.php file. 
-Create a csv file as in the csv/cacti_example.csv file. +  * copy the cli/add_graphs_filter.php in the cacti cli folder.((The patch (and the patched version of the scripts) are in the cli folder.))
-Go to the host_add folder and start the command : +
-perl scripts/import_csv_file_to_cacti.pl --file <path to the csv file> [--create-graph-multi] [--debug]+
  
 +==== Importing one device ====
 +
 +  * Go to the host_add folder (here) and exec the following command :
 +<code bash>
 +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]
 +</code>
 +==== Importing multiple devices ====
 +  * Create a csv file as in the csv/cacti_example.csv file.
 +<file csv/cacti_example.csv>
 +</file>
 +  * Go to the host_add folder and run the command:
 +<code bash>
 +perl scripts/import_csv_file_to_cacti.pl --file <path to the csv file> [--create-graph-multi] [--debug]
 +</code>
 ===== Additional Help? ===== ===== Additional Help? =====
  





Personal Tools