Skip to content

Instantly share code, notes, and snippets.

@alq666
Last active December 16, 2015 06:28
Show Gist options
  • Save alq666/5391612 to your computer and use it in GitHub Desktop.
Save alq666/5391612 to your computer and use it in GitHub Desktop.

To get stacked metrics:

{
  "viz": "timeseries",
  "requests": [
    {
      "q": "8*sum:system.net.bytes_sent{host:flex02.lax04.netdna.com, device:eth2},8*sum:system.net.bytes_sent{host:flex02.lhr02.netdna.com, device:eth2}"
    }
  ],
  "events": []
}

To get 2 lines on the same graph

{
  "viz": "timeseries",
  "requests": [
    {
      "q": "8*sum:system.net.bytes_sent{host:flex02.lax04.netdna.com, device:eth2}"
    },
    {
      "q": "8*sum:system.net.bytes_sent{host: flex02.lhr02.netdna.com, device: eth2}"
    }
  ],
  "events": []
}

To get the sum as one line

{
  "events": [],
  "requests": [
    {
      "q": "8*sum:system.net.bytes_sent{host:flex02.lax04.netdna.com,device:eth2} + 8*sum:system.net.bytes_sent{host:flex02.lhr02.netdna.com,device:eth2}"
    }
  ],
  "viz": "timeseries"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment