I want to create a report for a custom data query which one of the fields represents a maximum value.
Whenever I add this data query variable to the formula, the results in the report appear as NA in the report.
When I replace the variable by a number, it works.
Also, when I create a similar formula on the interface traffic templates, it also works.
Could someone give me some pointers how to find out what is going wrong?
The field_value looks exactly the same in the DB as field_value's for ifHighSpeed fields.
Also, there seems no option to enable logging or debug?
And are there any prerequisites to get this working? Of course the value contents is a number and not a string.
Reportit returns NA for measurands with data query variables
Moderators: Developers, Moderators
- browniebraun
- Developer
- Posts: 791
- Joined: Tue Jun 13, 2006 1:17 am
- Location: Cologne, Germany
Re: Reportit returns NA for measurands with data query varia
Take a look at the Cacti log directly after the calculation process has been finished.
I assume that there will be a SQL error entry caused by your data query variable returning a string instead of a number.
Additionally you can rerun that report in debug mode using the CLI:
e.g. "<your_path_to_php> runtime.php -v --debug <your_report_id>"
Regards
-Andi
I assume that there will be a SQL error entry caused by your data query variable returning a string instead of a number.
Additionally you can rerun that report in debug mode using the CLI:
e.g. "<your_path_to_php> runtime.php -v --debug <your_report_id>"
Regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick!
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
Re: Reportit returns NA for measurands with data query varia
Thanks,
I'm examining the results, but I already have found this Error message:
Edit: it looks like the field value does not get filled in.
Edit2:
I'm examining the results, but I already have found this Error message:
Just before ******* Interpretation & Result ******* of the measurands which contain the data query variable.PHP Parse error: syntax error, unexpected $end in /tools/cacti-0.8.8a/plugins/reportit/lib_int/funct_calculate.php(298) : eval()'d code on line 1
Edit: it looks like the field value does not get filled in.
Code: Select all
Array
(
[0] => f_avg*8/rbnIfQoSRate/1000*100
[1] => f_avg*8/rbnIfQoSRate/1000*100
[2] => f_avg*8//1000*100
[3] => f_avg*8//1000*100
[4] => f_avg*8//1000*100
[5] => f_avg*8//1000*100
[6] => 1519858.8188048*8//1000*100
[7] => 1519858.8188048*8//1000*100
[8] => NULL
)
Code: Select all
******* Variables *******
Array
(
[c1v] => 80
[maxValue:TxOctets] => U
[maxRRDValue:TxOctets] => U
[step] => 1800
[nan] => 33
[rbnIfQoSRate] =>
[rbnIfName] =>
[rbnIfEncaps] =>
[rbnIfOperStatus] =>
[rbnIfIndex] =>
)
Re: Reportit returns NA for measurands with data query varia
Okay, I have found out why it wouldn't work.
It seems that the plugin assumed that the snmp_index is always a numeric value. This is totally not true.
In most cases, there will be something like '1.2.3.4' as index and this will give a SQL error.
In my case the index looks like '1/2/3' (script server) and that doesn't give any error because MySQL just would solve the equations.
So, in the attachment a patch for Reportit 0.7.5a to be applied to runtime.php
It seems that the plugin assumed that the snmp_index is always a numeric value. This is totally not true.
In most cases, there will be something like '1.2.3.4' as index and this will give a SQL error.
In my case the index looks like '1/2/3' (script server) and that doesn't give any error because MySQL just would solve the equations.
So, in the attachment a patch for Reportit 0.7.5a to be applied to runtime.php
- Attachments
-
- runtime.php.patch
- (324 Bytes) Downloaded 148 times
Who is online
Users browsing this forum: No registered users and 1 guest