DataScript: avi.vs.analytics.counter
DataScript
Function | avi.vs.analytics.counter ( metric_name, [operation], [value] ) |
Description | Increments or clears the named counter metric. Refer to the User-defined Metrics article for important details. |
Events | HTTP_REQ HTTP_RESP RESP_FAILED |
Parameter | metric_name is a string value chosen by the user to identify the counter metric. operation is a numeric which may take on one of two values:
Notes
|
Returns | No value returned |
Related | avi.vs.analytics.get_metric() |
Examples |
1. Create a counter-type metric with name “Foo” and add 42 to it. If the metric is not present, then create it and initialize it with default value, 0.
2. Increment the counter-type metric named "Foo." by 1.
3. Increment the counter named "tls1_2" if the SSL protocol is "TLSv1.2."
|