PDA

View Full Version : max & etc function.


sauron
27-02-2006, 08:16
First i'm add new item icmpping type is Numeric (Integer 64) and add trigger:

({Host.collector:icmpping.max(#10)}=0)

But status trigger set to UNKNOWN and in log i'm got:

030122:20060227:115608 Evaluation of expression [({11217}=0)] failed [Unable to get value for functionid [11217]]
030122:20060227:115608 Expression [({11217}=0)] cannot be evaluated [Unable to get value for functionid [11217]]


I'm change trigger expression:

({Host.collector:icmpping.max(300)}=0)


But status trigger not changed and in log:

030122:20060227:115838 Evaluation of expression [({11219}=0)] failed [Unable to get value for functionid [11219]]
030122:20060227:115838 Expression [({11219}=0)] cannot be evaluated [Unable to get value for functionid [11219]]

When i'm change trigger expression to:

({Host.collector:icmpping.last(0)}=0)

Trigger status going FALSE. Why max function not work :confused:

sauron
27-02-2006, 09:18
debug logging:

022189:20060227:131108 In DBnum_rows
022189:20060227:131108 Result of DBnum_rows [1]
022189:20060227:131108 Executing query:update trends set num=23, value_min=1.000000, value_avg=1.000000, value_max=1.000000 w
here itemid=17213 and clock=1141027200
022189:20060227:131108 End of add_history
022189:20060227:131108 In update_item()
022189:20060227:131108 Executing query:update items set nextcheck=1141027890,lastclock=1141027868 where itemid=17213
022189:20060227:131108 In update_functions(17213)
022189:20060227:131108 Executing query:select function,parameter,itemid,lastvalue from functions where itemid=17213 group by
1,2,3 order by 1,2,3
022189:20060227:131108 In DBnum_rows
022189:20060227:131108 Result of DBnum_rows [1]
022189:20060227:131108 ItemId:17213 Evaluating max(134768520)

022189:20060227:131108 In evaluate_FUNCTION() Function [max]
022189:20060227:131108 In evaluate_FUNCTION() pre-7
022189:20060227:131108 In evaluate_FUNCTION() 7 Formula [1]
022189:20060227:131108 In evaluate_FUNCTION() 7 Value [022189:20060227:131108 ]
022189:20060227:131108 In evaluate_FUNCTION() 7 Units []
022189:20060227:131108 In evaluate_FUNCTION() 7 Value [022189:20060227:131108 ] Units [] Formula [1]
022189:20060227:131108 End of evaluate_FUNCTION. Result [022189:20060227:131108 ]
022189:20060227:131108 Evaluation failed for function:max

:confused:

sauron
27-02-2006, 09:41
Huh found. agregate function work only float data type. :rolleyes:

sauron
27-02-2006, 15:02
Fixed by patch.