The "rate of change" function, given as rate(x), is calculated as the rate of change between the current value and the value seen in the previous sample. |
Rate is calculated as the rate of change between the current value and the value seen in the previous sample. See sample calculation below: time: 10:00:00 value: 100
For examples on how to use the rate of change function in samplers and rules, see below: Sample sampler: <sampler name= "CPU" > <sampleInterval> <data> 60 </data> </sampleInterval> <plugin> <cpu></cpu> </plugin> <dataviews> <dataview name= "CPU" > <additions> <var-columns> <data> <column> <data>ComputedColumn</data> </column> <column> <data>RateOfSum</data> </column> </data> </var-columns> </additions> </dataview> </dataviews> </sampler>
Sample rule for sum: <rule name= "CPU_Sum" > <targets> <target>/geneos/gateway/directory/probe/managedEntity/sampler/dataview/rows/row/cell[( @column ="ComputedColumn")]</target> </targets> <priority> 1 </priority> <pathAliases> <pathAlias name= "column-b" >../cell[( @column ="percentUtilisation")]</pathAlias> <pathAlias name= "column-c" >parent::node()/cell[( @column ="percentUserTime")]</pathAlias> <pathAlias name= "column-a" >parent::node()/cell[( @column ="percentKernelTime")]</pathAlias> </pathAliases> <block> <transaction> <update> <property> @value </property> <add> <add> <dataItem> <pathAlias ref= "column-a" ></pathAlias> <property> @value </property> </dataItem> <dataItem> <pathAlias ref= "column-b" ></pathAlias> <property> @value </property> </dataItem> </add> <dataItem> <pathAlias ref= "column-c" ></pathAlias> <property> @value </property> </dataItem> </add> </update> </transaction> </block> </rule>
Sample rule for rate of sum: <rule name= "CPU_Rate_Sum" > <targets> <target>/geneos/gateway/directory/probe/managedEntity/sampler/dataview/rows/row/cell[( @column ="RateOfSum")]</target> </targets> <priority> 1 </priority> <pathAliases> <pathAlias name= "column-sum" >../cell[( @column ="ComputedColumn")]</pathAlias> </pathAliases> <block> <transaction> <update> <property> @value </property> <rate> <dataItem> <pathAlias ref= "column-sum" ></pathAlias> <property> @value </property> </dataItem> </rate> </update> </transaction> </block> </rule>
Additional Use Case: Checking if a particular target value has been updating or not <rule name= "lastUpdated" > <targets> <target>/geneos/gateway/directory/probe/managedEntity/sampler/dataview/headlines/cell</target> </targets> <priority> 1 </priority> <block> < if > <equal> <rate> <dataItem> <property> @value </property> </dataItem> </rate> <integer> 0 </integer> </equal> <transaction> <delay> 600 </delay> <update> <property>state/ @severity </property> <severity>critical</severity> </update> </transaction> <transaction> <update> <property>state/ @severity </property> <severity>ok</severity> </update> </transaction> </ if > </block> </rule>
|
The rate function can also be used with the compute engine to calculate the last value of a cell
Comments
0 comments
Please sign in to leave a comment.