Plugin Nectar ERROR: SQL Row Failed!

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
rainmanh
Posts: 7
Joined: Thu Sep 12, 2013 9:17 am

Plugin Nectar ERROR: SQL Row Failed!

Post by rainmanh »

Hi

I am using :

Code: Select all

PHP Version 	5.3.3
PHP OS 	Linux
Cacti Version 	0.8.8a
Cacti OS 	unix
SNMP Version 	NET-SNMP version: 5.5
RRDTool Version 	RRDTool 1.3.x 
CentOS release 6.3 (Final)
Nectar	0.11
The plugin seems installed correctly and I can understand the PIA is already installed on 0.8.8a. I need to mention this cacti installation has been upgraded not having any issues at all during or after the upgrade. The Nectar plugin has been installed weeks after..

When using the plugin, i can feel the forms, no problem when when adding "report items" I save them and I get the following error when trying to send the reports:

Code: Select all

09/12/2013 01:43:38 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"SELECT * FROM plugin_nectar WHERE id="
09/12/2013 01:43:38 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select max(sequence)+1 as seq from plugin_nectar_items where report_id="
09/12/2013 01:44:49 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"SELECT * FROM plugin_nectar WHERE id="
09/12/2013 01:44:49 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select max(sequence)+1 as seq from plugin_nectar_items where report_id="
Also the "Report Items" menu under "Report Selection" does not show anything while the database does:

Code: Select all

mysql> select * from plugin_nectar;
+----+------+--------+-------+--------+------------+--------------------------------+-------+-----------------+----------+---------+
| id | name | intrvl | count | offset | mailtime   | from_email                     | email | attachment_type | lastsent | enabled |
+----+------+--------+-------+--------+------------+--------------------------------+-------+-----------------+----------+---------+
|  1 | Test |      1 |     1 |      0 | 1378994400 | cacti@server.com | g     |               1 |        0 | on      |
+----+------+--------+-------+--------+------------+--------------------------------+-------+-----------------+----------+---------+
1 row in set (0.00 sec)

mysql> select * from plugin_nectar_items;
+----+-----------+-----------+---------+----------------+----------+-------+-----------+-----------+----------+
| id | report_id | item_type | host_id | local_graph_id | timespan | align | item_text | font_size | sequence |
+----+-----------+-----------+---------+----------------+----------+-------+-----------+-----------+----------+
|  1 |         0 |         1 |     101 |           1775 |        7 |     1 |           |        10 |        1 |
+----+-----------+-----------+---------+----------------+----------+-------+-----------+-----------+----------+
1 row in set (0.00 sec)

mysql> select * from plugin_nectar_items;
+----+-----------+-----------+---------+----------------+----------+-------+-----------+-----------+----------+
| id | report_id | item_type | host_id | local_graph_id | timespan | align | item_text | font_size | sequence |
+----+-----------+-----------+---------+----------------+----------+-------+-----------+-----------+----------+
|  1 |         0 |         1 |     101 |           1775 |        7 |     1 |           |        10 |        1 |
|  2 |         0 |         2 |       0 |              0 |        0 |     1 | Test!!!!  |        10 |        1 |
+----+-----------+-----------+---------+----------------+----------+-------+-----------+-----------+----------+

Any idea? am I doing anything wrong?

Many thanks
rainmanh
Posts: 7
Joined: Thu Sep 12, 2013 9:17 am

Re: Plugin Nectar ERROR: SQL Row Failed!

Post by rainmanh »

Hi

Tracing the issue, I can see the entries being recorded in the db, but the nectar.php file seems to "lose" the values of the variable id.

So.. for example...:

https://<URL>/cacti/plugins/nectar/nectar.php?action=item_edit&id=4

will report something like:

Code: Select all

09/13/2013 10:58:56 AM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"SELECT * FROM plugin_nectar WHERE id="
09/13/2013 10:58:56 AM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select max(sequence)+1 as seq from plugin_nectar_items where report_id="
nectar.php

Code: Select all

        $nectar = db_fetch_row("SELECT * " .
                                        "FROM plugin_nectar " .
                                        "WHERE id=" . get_request_var_request("id"));
The value for variable "id" seems to be lost as it happens to be empty.

Many thanks
rainmanh
Posts: 7
Joined: Thu Sep 12, 2013 9:17 am

Re: Plugin Nectar ERROR: SQL Row Failed!

Post by rainmanh »

Solution:

Installing the latest version!!!
Sorry Gandalf.. I should get back to the optician.·

many thanks.
rainmanh
Posts: 7
Joined: Thu Sep 12, 2013 9:17 am

Re: Plugin Nectar ERROR: SQL Row Failed!

Post by rainmanh »

SOLVED

(sorry... I read some yelling about the solved word...just following the rules...)
cmha184
Posts: 1
Joined: Mon Nov 30, 2015 11:33 am

Re: Plugin Nectar ERROR: SQL Row Failed!

Post by cmha184 »

how did you solved it ! ?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests