Change host templates for all my devices

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
Toons59
Posts: 8
Joined: Tue Jun 17, 2008 9:53 am

Change host templates for all my devices

Post by Toons59 »

Hi,

I'd like to know if there is an easy (and fast) way to change host template for multiple devices.
I've duplicated "windows 2000/XP" template, renamed and modified it (adding some data queries from different templates).
Now, I have more than 1000 devices to modify.
Please, tell me that I don't need to do it device by device o_Ô.

Thks
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

I would like to second this request.

I've added a couple of additional data source templates and graph templates to a host template that is used on many hundreds of devices.

Unfortunately, the new host template does not get automatically added to the devices using this template.

What I am looking for is a simple way to:
  • Add the new data/graph templates to all these devices
    Enable these data/graph template itens for all these devices
I am poking around the devices/host templates/data templates/graph templates looking for some global "update" or something, but not finding it.
---------
The Glue Guy
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

OK, based on the enthusiastic responses, it appears that there isn't an easy and fast way to update all my existing devices with new templates.

I've been looking at the cacti DB tables to try and figure out how the graph templates are connected to the devices, but haven't figured it out yet.

So, since there doesn't exist a way to do this, I guess I may have to write a MySQL script to make the connect(s) between the graph templates and all my devices.

Would someone be so kind as to articulate which tables/fields should be linked?
---------
The Glue Guy
drewshin99
Posts: 24
Joined: Thu Jan 22, 2009 5:06 pm

Post by drewshin99 »

i was looking for this too, and was excited to see that our awesome developers included a new script in the cli directory called "host_update_template.php" which i think does exactly what you want.
i'm still using 0.8.7c but i might be able to just copy the script over and use it anyway.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

A new feature will come up with 088 is to automatically apply Host Template changes (new graphs, new data queries) to all related hosts. Currently not available, sorry
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests