Statistical counters
These counters are part of Megaload statistics and will be collected and aggregated by the system. They can be viewed in the web dashboard. the user can define new custom counters with this action, which will be labellled with the "custom" tag. Predefined counters cannot be modified with these actions.
New counter
The counter action defines a new counter.
| Name | Type | Required | Action | Info |
|---|---|---|---|---|
counter |
string | Yes | No | Counter identifier. |
Example
{"stat_counter-new" : {
"counter" : "count_valid_answer"
}
}
Counter increment
The stat_counter-inc action increments a counter with the specified value.
| Name | Type | Required | Action | Info |
|---|---|---|---|---|
counter |
string | Yes | No | Counter identifier. |
increment |
integer | Yes | Yes | Counter increment. It accepts actions that evaluate to integers. |
Example
{"stat_counter-inc" : {
"counter" : "count_valid_answer",
"increment" : 1
}
}
Counter value
The stat_counter-value action retrieves the current value of the counter.
| Name | Type | Required | Action | Info |
|---|---|---|---|---|
counter |
string | Yes | No | Counter identifier. |
Example
{"stat_counter-value" : {
"counter" : "count_valid_answer"
}
}