Unable to create Generic OID graph in 1.0.3 or 1.0.4

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
jpawlicki
Posts: 7
Joined: Tue Oct 02, 2012 3:40 pm

Unable to create Generic OID graph in 1.0.3 or 1.0.4

Post by jpawlicki »

Risking the wrath of the forum, but the bug reporting page says to come here first. I have a simple temperature probe (generic snmp device), that reports on a specific OID, and has worked fine in cacti 0.8.8a. I've done a fresh install of 1.0.3 (and now 1.0.4) and re-created the device. Any attempt to create a new graph using "SNMP - Generic OID Templet" fails. Furthermore, the OID field is blanked out upon save; I can edit the data source and re-enter it, and it seems to save. I also tried creating a new generic oid graph for a good Windows device, using a known oid, and this also fails - so it's not my device itself. I'm successfully graphing a variety of Windows, Cisco & Linux devices, so the php/mysql setup seems fine.

Various errors appear in logs, but hard to know what's relevant, e.g. ERROR PHP NOTICE: Undefined index: graph_template_name in file: /var/www/html/cacti-1.0.4/graphs_new.php on line: 362

Is anyone able to verify they can add a generic oid graph in 1.0.3 or 1.0.4? Many thanks as always.
jpawlicki
Posts: 7
Joined: Tue Oct 02, 2012 3:40 pm

Re: Unable to create Generic OID graph in 1.0.3 or 1.0.4

Post by jpawlicki »

Ok, not my imagination. Did a fresh install again, checked all prerequisites and permissions. 1.0.4 is definitely throwing errors as soon as I try to create a graph and select "SNMP - Generic OID Template", before any data is actually entered into the form.

2017-03-01 08:48:09 - ERROR PHP NOTICE: Undefined index: id in file: /var/www/html/cacti/lib/template.php on line: 691
2017-03-01 08:46:27 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs_new.php: 37 form_save)(/graphs_new.php: 106 host_new_graphs)(/graphs_new.php: 362 CactiErrorHandler)(/lib/functions.php: 4264 cacti_debug_backtrace)
2017-03-01 08:46:27 - ERROR PHP NOTICE: Undefined index: graph_template_name in file: /var/www/html/cacti/graphs_new.php on line: 362


Any chance someone else can try a generic OID graph in 1.0.4?
jpawlicki
Posts: 7
Joined: Tue Oct 02, 2012 3:40 pm

Re: Unable to create Generic OID graph in 1.0.3 or 1.0.4

Post by jpawlicki »

Ended up with an ugly workaround: new data source template with the OID specified, and new graph template to reference it.
cigamit
Developer
Posts: 3368
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Unable to create Generic OID graph in 1.0.3 or 1.0.4

Post by cigamit »

https://github.com/Cacti/cacti/issues/337
I believe this was fixed a few days ago. You can pull down the latest git, or wait for 1.0.5 to be released.
ezimin
Posts: 1
Joined: Thu Mar 09, 2017 3:08 am

Re: Unable to create Generic OID graph in 1.0.3 or 1.0.4

Post by ezimin »

This is not fixed actually. I still see the same issue after adding this change into the code.

Graphs->Add->Generic OID Template, Device XXX.
After pressing "Create" button I get redirected to the header, graph is not created and the following messages appear in the log:

Code: Select all

2017-03-09 11:18:05 - CMDPHP ERROR: A DB Exec Failed!, Error: Column 'title' cannot be null
2017-03-09 11:18:05 - DBCALL ERROR: A DB Exec Failed!, Error:1048, SQL:"INSERT INTO graph_templates_graph (`id`, `local_graph_template_graph_id`, `local_graph_id`, `graph_template_id`, `title`, `vertical_label`, `image_format_id`, `height`, `width`, `base_value`, `slope_mode`, `auto_scale`, `auto_scale_opts`, `auto_scale_log`, `scale_log_units`, `auto_scale_rigid`, `upper_limit`, `lower_limit`, `unit_value`, `unit_exponent_value`, `unit_length`, `no_gridfit`, `alt_y_grid`, `right_axis`, `right_axis_label`, `right_axis_format`, `right_axis_formatter`, `left_axis_formatter`, `auto_padding`, `dynamic_labels`, `force_rules_legend`, `tab_width`, `legend_position`, `legend_direction`) VALUES (0, 0, 65, 34, NULL, NULL, 0, 0, 0, 0, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) ON DUPLICATE KEY UPDATE `local_graph_template_graph_id`=VALUES(`local_graph_template_graph_id`), `local_graph_id`=VALUES(`local_graph_id`), `graph_template_id`=VALUES(`graph_template_id`), `title`=VALUES(`title`), `vertical_label`=VALUES(`vertical_label`), `image_format_id`=VALUES(`image_format_id`), `height`=VALUES(`height`), `width`=VALUES(`width`), `base_value`=VALUES(`base_value`), `slope_mode`=VALUES(`slope_mode`), `auto_scale`=VALUES(`auto_scale`), `auto_scale_opts`=VALUES(`auto_scale_opts`), `auto_scale_log`=VALUES(`auto_scale_log`), `scale_log_units`=VALUES(`scale_log_units`), `auto_scale_rigid`=VALUES(`auto_scale_rigid`), `upper_limit`=VALUES(`upper_limit`), `lower_limit`=VALUES(`lower_limit`), `unit_value`=VALUES(`unit_value`), `unit_exponent_value`=VALUES(`unit_exponent_value`), `unit_length`=VALUES(`unit_length`), `no_gridfit`=VALUES(`no_gridfit`), `alt_y_grid`=VALUES(`alt_y_grid`), `right_axis`=VALUES(`right_axis`), `right_axis_label`=VALUES(`right_axis_label`), `right_axis_format`=VALUES(`right_axis_format`), `right_axis_formatter`=VALUES(`right_axis_formatter`), `left_axis_formatter`=VALUES(`left_axis_formatter`), `auto_padding`=VALUES(`auto_padding`), `dynamic_labels`=VALUES(`dynamic_labels`), `force_rules_legend`=VALUES(`force_rules_legend`), `tab_width`=VALUES(`tab_width`), `legend_position`=VALUES(`legend_position`), `legend_direction`=VALUES(`legend_direction`)'
2017-03-09 11:18:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs.php: 64 form_save)(/graphs.php: 166 change_graph_template)(/lib/template.php: 704 CactiErrorHandler)(/lib/functions.php: 4264 cacti_debug_backtrace)
2017-03-09 11:18:05 - ERROR PHP NOTICE: Undefined index: legend_direction in file: /var/www/html/cacti/lib/template.php on line: 704
2017-03-09 11:18:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs.php: 64 form_save)(/graphs.php: 166 change_graph_template)(/lib/template.php: 704 CactiErrorHandler)(/lib/functions.php: 4264 cacti_debug_backtrace)
2017-03-09 11:18:05 - ERROR PHP NOTICE: Undefined index: legend_position in file: /var/www/html/cacti/lib/template.php on line: 704
cigamit, could you please revisit the fix ?
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Unable to create Generic OID graph in 1.0.3 or 1.0.4

Post by Osiris »

you should open a new bug and state the exact steps that you followed to reproduce this bug.
Before history, there was a paradise, now dust.
adfire
Posts: 6
Joined: Wed Mar 15, 2017 3:28 am

Re: Unable to create Generic OID graph in 1.0.3 or 1.0.4

Post by adfire »

I still have the same problem in ver. 1.0.5 and 1.0.6. Is there any way to create graph for generic oid, or the problem still exists ?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests