Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
fix sortByName calls
Browse files Browse the repository at this point in the history
in grafana, if you add them manually, it's without quotes
in graphite docs, is also without quotes
(http://graphite.readthedocs.io/en/latest/functions.html#graphite.render.functions.sortByName)

MT doesn't support booleans like that:

~/g/s/g/g/metrictank ❯❯❯ ./build/mt-explain "sortByName(foo, 'true')"                                                                                                                        ⏎
Error while planning argument bad type. expected string - got etString
~/g/s/g/g/metrictank ❯❯❯ ./build/mt-explain "sortByName(foo, true)"
Plan:
* Exprs:
  expr-func sortByName(
    expr-target "foo",
HUH-SHOULD-NEVER-HAPPEN,
  )
* Reqs:
    {foo 1517332946 1517419346 NoneConsolidator}
MaxDataPoints: 800
From: 1517332946
To: 1517419346
  • Loading branch information
Dieterbe committed Feb 19, 2018
1 parent 614d9e6 commit 8ac5a28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
"targets": [
{
"refId": "A",
"target": "sortByName(aliasByNode(metrictank.stats.$environment.$instance.cluster.notifier.kafka.partition.*.lag.gauge64, 3, 8), 'true')"
"target": "sortByName(aliasByNode(metrictank.stats.$environment.$instance.cluster.notifier.kafka.partition.*.lag.gauge64, 3, 8), true)"
}
],
"thresholds": [],
Expand Down Expand Up @@ -591,7 +591,7 @@
"targets": [
{
"refId": "A",
"target": "sortByName(aliasByNode(metrictank.stats.$environment.$instance.input.kafka-mdm.partition.*.lag.gauge64, 3, 7), 'true')"
"target": "sortByName(aliasByNode(metrictank.stats.$environment.$instance.input.kafka-mdm.partition.*.lag.gauge64, 3, 7), true)"
}
],
"thresholds": [],
Expand Down Expand Up @@ -1171,7 +1171,7 @@
"targets": [
{
"refId": "A",
"target": "aliasByNode(sortByName(sumSeriesWithWildcards(perSecond(metrictank.stats.$environment.$instance.api.request.*.status.*.counter32), 3), 'true'), 5, 7)"
"target": "aliasByNode(sortByName(sumSeriesWithWildcards(perSecond(metrictank.stats.$environment.$instance.api.request.*.status.*.counter32), 3), true), 5, 7)"
}
],
"thresholds": [],
Expand Down

0 comments on commit 8ac5a28

Please sign in to comment.