Skip to content

support consolidation for raw/json/csv output #153

Closed

Description

@Dieterbe

use case: client-side rendering. if I know I'm going to render an X-pixels wide graph, I could specify this to graphite and have graphite consolidate the data before submitting as raw/csv/json, saving considerable bandwith (and arguably there is some benefit in not having to implement the same in all different client side plotting libraries)

I tried to see if this already works, but it seems like it doesn't have any effect:

$ >  curl 'http://$host/render/?from=-10hour&until=now&target=cumulative(servers.dfvimeodfsproxy1.network.em1.rx_bit)&format=json&width=2' | jsonpp > out-cumul
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14399    0 14399    0     0   269k      0 --:--:-- --:--:-- --:--:--  342k
$ > curl 'http://$host/render/?from=-10hour&until=now&target=servers.dfvimeodfsproxy1.network.em1.rx_bit&format=json&width=2' | jsonpp > out
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14387    0 14387    0     0   363k      0 --:--:-- --:--:-- --:--:--  468k
$ >  diff out out-cumul
diff --git a/out b/out-cumul
index bc516bd..ebdb2ce 100644
--- a/out
+++ b/out-cumul
@@ -2402,6 +2402,6 @@
                 1360621920
             ]
         ], 
-        "target": "servers.dfvimeodfsproxy1.network.em1.rx_bit"
+        "target": "cumulative(servers.dfvimeodfsproxy1.network.em1.rx_bit)"
     }
 ]
$ >

Activity

  1. stale commented on Apr 14, 2020

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions