Cacti (home)ForumsDocumentation

This is an old revision of the document!


provisioning from csv

type:
userscript
userscript:
provisioning_from_csv
author:
SFR
description:
This package provide tools to help users creating devices into cacti.
version:
1.0
pia:
Not needed
homepage:
http://forums.cacti.net/viewtopic.php?f=12&t=43082
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

This scripts are GPLv2, copyright SFR.

Prerequisites

perl, perl::DBI, perl::DBD::MySQL, perl::Graph, perl::Graph::Layderer, perl::Imager.

Usage

1. 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 : If you want to use the –create-graph-multi option for importing scripts, you have to patch the cacti cli/create_graph.php file. 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 : 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 : Create a csv file as in the csv/cacti_example.csv file. 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]

Additional Help?

If you need additional help, please go to http://forums.cacti.net/viewtopic.php?f=12&t=43082

Possible Bugs?

Sample Output






Personal Tools