Zabbix:Calculated items from calculated items - zabbix

I have a problem creating calculated items from another ones.
For example i have an item inside a host that is a calculated item from 2 different existenting SNMP items.
When I create in a different host a different calculated item that try to calculate the same operation using 2 calculated items in a different host I obtain a not supported tag with this message:
Cannot evaluate function [avg(0)]: item [SMS_Reference:last("Host1:CalculatedItem"] not found
My formula:
last("Host_1:Calculated_item_in_Host_1")
In fact Host_1:Calculated_item_in_Host_1 is another calculated item inside another host and is working perfectly.
Anyone knows how can I fix this problem?

Related

How to identify the cause of incorrect data in calculated item?

I have 2 items in zabbix version 5. first item as a trapper and it will be updated every one minute and Its value is ascending. second item is calculated based on first item and its formula is : (abschange("KeyName"))/60
for example:
if values of first item are these: 5,8,16,34,68,71,93,102,...
then second item must return: 3,8,18,34,.. Then divide them by 60.
what i get is completely different. i checked in latest data and the first item is always correct and ascending but the second item seems that can't calculate absolute value. how can i find the cause of this problem?
here is an example of what i get:
first item value: 148822441 ,148963574 ,149106618 ,149555694 ,...
second item value: 63498138, 2384, 63498138, 2384,...
i should mention that i had these exact items on zabbix 3 and they worked correctly. after migrating to zabbix 5 i face this problem.

Increment and update specific value from api list in flutter

So I'm using flutter in Android studio. I generated a list to show some values from am api that has data of things in a vending machine. 'Quantity' is how much of a item there is in the machine. When i set the state to increment a specific item in the list, the count for the single is increased or decreased for all the items not allowing me to update a single item. What i want to do is update the value for the quantity for a specific item only and save that data to the api. I did not set image like below
I believe you will have to set different values for those different items in a map file
like in your screenshot, you have doritoz, tortilas, etc etc
the action for clicking the button should be "doritozValue++" or "doritozValue--"
i don't think you can use a single value for the entire list
this is like working with a dropdown, if you want to set your list dinamicaly, you need not to have a quantity value var, you need to have a list of those vars, and you can access in your dinamically list by making a for, and accessing the determined quantity by: listQuantity[i], that is the determined quantity var for this determined object in the i position

I'm getting a #Type! error when using operators in Access report (Access 2010)

I'll do my best to describe my problem. I'm modifying a report in Access 2010. I have a text box in my detail section that displays the weight of a pallet with boxes on it.
=[PalletWeight].
The PalletWeight field is generated from a SQL query that grabs this information from our database. As it so happens in the database that field appears like so:
100.000000000. I don't know the data type for that field in the database because looking isn't as simple as opening SQL Server, but =CDbl([PalletWeight]) does work so unless someone tells me they need to know I didn't obtain that information for this question.
The pallets are grouped by item. So item 1 might need to be carried on 3 pallets, item 2 might need 4, etc...
As mentioned earlier, I used CDbl on the textbox to convert the value to appear as 100.00 on the actual report.
I need to add a text box that calculates percentage. For each item, the total weight of the pallets needed per item is a certain percentage of the grand total weight of all pallets produced.
When I attempted do something like the following I get the #Type! error.
=Format([PalletWeight / Sum(PalletWeight) * 100, "Percentage")
I've also tried to refer to the text box by name (name reference) to perform operations on its value instead of the value contained in the text box.
=Format([TextBox1] / [Textbox2] * 100), "Percentage").
This report has various grouping sections. I've tried using hidden text boxes to hold the values I want to manipulate and referencing those but it seems as soon as I use arithmetic I get the #type!.
I'm using the expression builder in the properties Control Source section. Any help would be greatly appreciated.
You either need to modify your query to add another calculated field
say dblPalletWeight =CDbl([PalletWeight])
and then use that in your formula
=Format(dblPalletWeight / Sum(dblPalletWeight) * 100, "Percentage")
Or modify your formula to do the conversion on the fly
=Format(CDbl([PalletWeight]) / Sum(CDbl([PalletWeight])) * 100, "Percentage")

Zabbix - calculated item function over multiple items

From the Zabbix Manual
the calculated items expression follows the form,
func(<key>|<hostname:key>,<parameter1>,<parameter2>,...)
This is fine for computations using functions over a single item like,
max("temp1",120)
How should a function like min() be applied over 3 different items so it returns the lowest of those?
Unfortunately, that is currently not supported. You may vote on a feature request: https://support.zabbix.com/browse/ZBXNEXT-1829
The answer is in the documentation here http://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/aggregate
Put the hosts into a group "mygroup" and then:
grpmin["mygroup","temp1",last,0]
If instead, you wanted the minimum of 3 items for the same host, don't do this in an item. Instead put the function in the trigger where you can easily trigger when the min temperature reaches a certain value.

RuningValue not working to give Cumulative Stacked Chart

I have a dataset that is showing the correct data, but putting it into a stacked bar chart and using the RunningValue function to try and plot it cumulatively is giving numbers that start way higher than they should.
My data is aggregated at the database, giving a dataset of:
Date of data
Count
Sum of Value
Filter Item 1
Time Since Date
Stacking Category
5 other fields
I am plotting with Time Since X along the X axis, Stacking Category is my Series field (there are 4 possible options), and my Y is using this function:
=RunningValue(IIF(Parameters!VolumeOrValue.Value="Volume",
Fields!Count.Value,
Fields!SumValue.Value),Sum,Nothing)
This should show me in the first X bar only 1 of the series, with a count as 1, or value of 100. Instead I get 3 of the series, with Counts summed up to 2500, which is more than the total sum of all of the count fields.
Can anyone point me to where my problem is?
Edit: Setting the CategoryField in the Series Properties dialog to match the Catgory that is set for the chart means that each bar is increasing by the right amount, but each stacked slice starts at the size of the entire value of the last bar. I need to get the reset to work properly, but I can't set any "Groupings" as normally recommended, and choosing any field name or Series name causes an error.
I managed to get it working quite simply...
Clicking on the Field on the right hand side of the chart on the Drop Series Fields Here section has a Group properties which when expanded has a name of the grouping. Plugging this into the RunningValue function as the last argument got it working properly (after removing the CategoryField setting).