Hello,
I have a graph template(from monitoring temperature) that I want to duplicate, change the OID's and import it again so I can use it for a second device. But if I try to export and import it(after changing OID, even data source name) its modifying the original template. I think it has to do with hash values from the .xml(cdef_id, task_item_id, etc, wich I didnt change since its a long string) ?
Is there a way to export the template and import it ? I have 4 OID's in it wich I modified, but its know enough. Below is the preview from importing the new template :
Cacti would make the following changes if the Template was imported:
GPRINT Preset
[preview] Normal [unchanged]
[preview] Load Average [unchanged]
Data Input Method
[preview] Tenis Puiu [updated]
Table: data_input, Column: name, New Value: Tenis Puiu, Old Value: Tenis Profi
Table: data_input_fields, Column: data_name, New Value: puiu1, Old Value: temp1
Table: data_input_fields, Column: data_name, New Value: puiu2, Old Value: temp2
Table: data_input_fields, Column: data_name, New Value: puiu3, Old Value: temp3
Table: data_input_fields, Column: data_name, New Value: puiu4, Old Value: temp4
Data Template
[preview] Temp Puiu [updated]
Table: data_template, Column: name, New Value: Temp Puiu, Old Value: Temp Tenis
Table: data_template_data, Column: name, New Value: |host_description| - Temp Puiu, Old Value: |host_description| - Temp Tenis
Table: data_template_rrd, Column: data_source_name, New Value: puiu_6, Old Value: temp_6
Table: data_template_rrd, Column: data_source_name, New Value: puiu_5, Old Value: temp_5
Table: data_template_rrd, Column: data_source_name, New Value: puiu_4, Old Value: temp_4
Table: data_template_rrd, Column: data_source_name, New Value: puiu_2, Old Value: temp_2
Table: data_template_rrd, Column: data_source_name, New Value: puiu_3, Old Value: temp_3
Table: data_template_rrd, Column: data_source_name, New Value: puiu_1, Old Value: temp_1
Graph Template
[preview] Temp Puiu [updated]
Table: graph_templates, Column: name, New Value: Temp Puiu, Old Value: Temp Tenis
Table: graph_templates_graph, Column: title, New Value: |host_description| - Temp Puiu, Old Value: |host_description| - Temp Tenis
Table: graph_templates_item, Column: text_format, New Value: Inc Balon1, Old Value: Incalzire Balon1
Table: graph_templates_item, Column: text_format, New Value: Inc Balon2, Old Value: Incalzire Balon2
Table: graph_templates_item, Column: text_format, New Value: Temp Balon1, Old Value: Temperatura Balon1
Table: graph_templates_item, Column: text_format, New Value: Temp Balon2, Old Value: Temperatura Balon2
Table: graph_template_input, Column: name, New Value: Data Source [puiu_3], Old Value: Data Source [temp_3]
Table: graph_template_input, Column: name, New Value: Data Source [puiu_1], Old Value: Data Source [temp_1]
Table: graph_template_input, Column: name, New Value: Data Source [puiu_2], Old Value: Data Source [temp_2]
Table: graph_template_input, Column: name, New Value: Data Source [puiu_4], Old Value: Data Source [temp_4]
Howto duplicate template?
Moderators: Developers, Moderators
Re: Howto duplicate template?
You should be duplicating it via the UI
Data Inputs, Data Source Templates, and Graph Templates all have a "Duplicate" action.
Data Inputs, Data Source Templates, and Graph Templates all have a "Duplicate" action.
Re: Howto duplicate template?
Ah..yes, thank you. I manage to get what I want by duplicate the graph, then export, modify OID's and re-importing it.
Re: Howto duplicate template?
Can this be done through cli?
I've looked into the cli scripts and couldn't find an option.
Thank you!
I've looked into the cli scripts and couldn't find an option.
Thank you!
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Howto duplicate template?
No, there is an api for this, but it's not been requested, and no one has contributed it back to the community to date.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 2 guests