Skip to content

Instantly share code, notes, and snippets.

@kormat
Last active April 24, 2016 13:48
Show Gist options
  • Save kormat/c8655c0ec49d2e1ffc29c2c2a1e6c694 to your computer and use it in GitHub Desktop.
Save kormat/c8655c0ec49d2e1ffc29c2c2a1e6c694 to your computer and use it in GitHub Desktop.
Metrics store:[
{
"Name": "count",
"Program": "otherwise.mtail",
"Kind": 1,
"Keys": [
"num"
],
"LabelValues": [
{
"Labels": [
"1"
],
"Value": {
"Value": 2,
"Time": 1461505300180200994
}
},
{
"Labels": [
"2"
],
"Value": {
"Value": 2,
"Time": 1461505300180203206
}
},
{
"Labels": [
"misc"
],
"Value": {
"Value": 2,
"Time": 1461505300180222036
}
}
]
}
counter count by num
/1/ {
count["1"]++
}
/2/ {
count["2"]++
}
otherwise {
count["misc"]++
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment