Template import script

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Template import script

Post by BSOD2600 »

Has anyone thought about / discussed a template import script? This script would basically be the commandline version of the Import Templates page. This would help to streamline new installations and customize them with useful templates/scripts.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Template import script

Post by Howie »

BSOD2600 wrote:Has anyone thought about / discussed a template import script? This script would basically be the commandline version of the Import Templates page. This would help to streamline new installations and customize them with useful templates/scripts.
Amen.

A quick look at template_import.php suggests it would be fairly straightforward to write a cli version.

Add a little bit more, and that's an installable package of resources/* plus templates, too.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Alrighty, feature request #1450 created.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Here you go. Only lightly tested but it works for me.

There's not much to it, and the actual import is just the same as Cacti's web UI.

Please don't try it out on a running installation without a backup though!

Edit: Attached it to the feature request.
Attachments
import_template.php.txt
(4.75 KiB) Downloaded 611 times
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Thanks!

I'll have to give it a shot in a VM this week.
Exo7
Cacti User
Posts: 136
Joined: Wed Jul 13, 2005 4:50 pm

Post by Exo7 »

I wrote some time ago a script which do the same, but with no verification whatsoever. Its purpose was to ease automatic installation of my servers.
see http://forums.cacti.net/viewtopic.php?t=8827

I would love to see this kind of scripts added to Cacti
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests