[SOLVED] Extend DeviceTemplate - finally can't add GraphTemplate

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

Moderators: Developers, Moderators

Post Reply
GGA
Cacti User
Posts: 62
Joined: Mon May 03, 2010 5:56 am

[SOLVED] Extend DeviceTemplate - finally can't add GraphTemplate

Post by GGA »

I am still testing the new cacti 1.2.22 and spent some time to migrate my old 0.8.8 Docsis CMTS Template until it was up and running.
So far, so cool.
Now I took the chance to extend this new template with a new OID. So I've just added a new part to my existing snmp_query:

Code: Select all

                <docsIf31CmtsDsOfdmChanUtilization>
                        <name>D31 Downstream Utilization</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.4491.2.1.28.1.19.1.20</oid>
                </docsIf31CmtsDsOfdmChanUtilization>
As it was just a load query and I already have one for my upstream utilization, I copied all the existing templates and changed the new ones to the new values. Easy and without any errors.
So there is now a new GraphTemplate, DataTemplate, DataQuery with a new AssociatedGraphTemplate.

As a final step I wanted to add the GraphTemplate to the existing DeviceTemplate. But I couldn't find it on the pulldownlist.
So, for a test, I deleted an already included but unused GraphTemplate from the DeviceTemplate. But I couldn't find it then in pulldownlist either.

I went then into the mariadb and made it by hand.

Code: Select all

insert into host_template_graph set (host_template_id,graph_template_id) values ('8','86');
insert into host_template_graph (host_template_id,graph_template_id) values ('8','95');
After that, both Templates were now ready to use and even the new one runs.
I've created two new graphs with my new template and cactilog shows ugly messages:

Code: Select all

2022-07-06 16:10:50 - CMDPHP ERROR: Suggested value column error. Column title for Data Template ID 79 is not a compatible field name for tables data_template_data and data_template_rrd. Please correct this suggested value mapping
2022-07-06 16:10:50 - CMDPHP ERROR: Suggested value column error. Column title for Data Template ID 79 is not a compatible field name for tables data_template_data and data_template_rrd. Please correct this suggested value mapping 
Where could that be? Data Source Item [casa_bwx31dsutil], Internal Data Source Name? Maybe that?
Last edited by GGA on Fri Jul 08, 2022 9:58 am, edited 1 time in total.
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Extend DeviceTemplate - finally can't add GraphTemplate

Post by TheWitness »

My guess is that the Reason that the Graph Template did not show up was that your Data Template used the Wrong Data Input Method. It's an easy mistake to make.
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?
GGA
Cacti User
Posts: 62
Joined: Mon May 03, 2010 5:56 am

Re: Extend DeviceTemplate - finally can't add GraphTemplate

Post by GGA »

Thank you for your reply, I'm willing to do every check that could bring me a step further.
But I'm still a bit overwhelmed as I can't really find the needle.

To see where I am, I've created a new dummy DeviceTemplate and couldn't add any of my wished GraphTemplates.
So step by step:
1. Checked Data Queries - Data Input Method is "Get SNMP Data (Indexed)"
2. Checked Data Templates - Data Input Method is also "get SNMP Data (Indexed)", if a Template is in use I even can't change the method.
3. Checked Graph Templates - Made sure the correct Data Sources and Graph Item Inputs are set.
4. Checked a new empty Device Template - The "Data Query" is selectable but the Graph Templates still not.

I can create a new Dummy Graph Template and could add it to the Device Template.
I duplicated an existing CMTS Graph Template and can't add it to the Device Template either.
I removed all Graph Template and Graph Items from the copy and still can't add it tho the device template.

What when I exported all GraphTemplates from my old cacti and imported it back to the new one.
Could this end in such an effect?
GGA
Cacti User
Posts: 62
Joined: Mon May 03, 2010 5:56 am

Re: Extend DeviceTemplate - finally can't add GraphTemplate

Post by GGA »

Ah I made it. :D
But I had to delete all GraphTemplates and recreate them by hand. Completely the same, but now it works.
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: [SOLVED] Extend DeviceTemplate - finally can't add GraphTemplate

Post by TheWitness »

Cool.
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?
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests