Hi community,
In my company, our goal is to use Zabbix to monitoring our webservices. Our first need is to get the average execution time over the last 5 minutes of each webservice. For this, we send for each webservices 2 items trapper every 30 seconds. The first push the total number of invocation of the webservice and the second the total execution time. These two items are synchronized (push togheter), so they have the same time in zabbix server. They are stored in delta (single change).
Their names :
So I started writing an calculated item as follows:
I forgot the division by zero problem so, I modified the item to :
then I saw that nested functions not seem to work , I create a calculated item :
and I modified my expression :
Unfortunately it still does not work because I get errors in the results because myWS_SumTime_last and myWS_SumInvoc_5m are not synchronized .
For example, if I have two calls of myWS in the last 5 minutes ( 500ms and 1000ms ) myWS_SumInvoc_5m may not have seen the second yet. The result of the calculation is:
Sorry for the long post , any help is very welcome.
thank you in advance
François
In my company, our goal is to use Zabbix to monitoring our webservices. Our first need is to get the average execution time over the last 5 minutes of each webservice. For this, we send for each webservices 2 items trapper every 30 seconds. The first push the total number of invocation of the webservice and the second the total execution time. These two items are synchronized (push togheter), so they have the same time in zabbix server. They are stored in delta (single change).
Their names :
Code:
myWS_SumTime_last myWS_SumInvoc_last
Code:
sum ("myWS_SumTime_last", 5m)
/
sum ("myWS_SumInvoc_last", 5m)
Code:
sum("myWS_SumTime_last",5m)
/
(sum("myWS_SumInvoc_last",5m) + count(sum("myWS_SumInvoc_last",5m),#1,0))
Code:
myWS_SumInvoc_5m = sum("myWS_SumInvoc_last",5m)
Code:
sum("myWS_SumTime_last",5m)
/
(last("myWS_SumInvoc_5m") + count("myWS_SumInvoc_5m",#1,0) )
For example, if I have two calls of myWS in the last 5 minutes ( 500ms and 1000ms ) myWS_SumInvoc_5m may not have seen the second yet. The result of the calculation is:
Code:
(500 + 1000) / 1 = 1500 instead of (500 + 1000) / 2 = 750
thank you in advance
François
Comment