{"action":"created","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/1945","labels_url":"https://api.github.com/repos/grafana/grafana/issues/1945/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/1945/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/1945/events","html_url":"https://github.com/grafana/grafana/issues/1945","id":73403204,"number":1945,"title":"Question: Trying to do some math with series.","user":{"login":"oprietop","id":50151,"avatar_url":"https://avatars.githubusercontent.com/u/50151?v=3","gravatar_id":"","url":"https://api.github.com/users/oprietop","html_url":"https://github.com/oprietop","followers_url":"https://api.github.com/users/oprietop/followers","following_url":"https://api.github.com/users/oprietop/following{/other_user}","gists_url":"https://api.github.com/users/oprietop/gists{/gist_id}","starred_url":"https://api.github.com/users/oprietop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oprietop/subscriptions","organizations_url":"https://api.github.com/users/oprietop/orgs","repos_url":"https://api.github.com/users/oprietop/repos","events_url":"https://api.github.com/users/oprietop/events{/privacy}","received_events_url":"https://api.github.com/users/oprietop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-05T19:11:02Z","updated_at":"2015-05-05T20:22:45Z","closed_at":null,"body":"I'm trying to graph the % disk usage using snmp and no transfomations on the polling side without any luck:\r\n\r\nThe series are:\r\nsnmp.$host.disk_usage.*.{size,used}\r\n\r\nI'm trying to do (used*100)/size but can't get it to work. \r\n\r\nFirst I tried:\r\n\r\nA [snmp][$host][disk_usage][*][size]\r\nB [snmp][$host][disk_usage][*][used][scale(100)]\r\nC [divideSeries(#B, #A)]\r\n\r\nBut it will complain with 'ValueError: divideSeries second argument must reference exactly 1 series'.\r\n\r\nAfter revising the functions i went with:\r\n\r\nA [snmp][$host][disk_usage][*][size]\r\nB [snmp][$host][disk_usage][*][used][scale(100)]\r\nC [group(#A, #B)][mapSeries(3)][reduceSeries(divideSeries, 4 , used, size)]\r\n\r\nBut it will complain with 'TypeError: divideSeries() takes exactly 3 arguments (2 given)'\r\n\r\nFunnily if i remove the scale function on B the asPercent and diffSeries functions inside reduceSeries will work but divideSeries won't.\r\n\r\nAny pointer would be appreciated, thanks!"},"comment":{"url":"https://api.github.com/repos/grafana/grafana/issues/comments/99209799","html_url":"https://github.com/grafana/grafana/issues/1945#issuecomment-99209799","issue_url":"https://api.github.com/repos/grafana/grafana/issues/1945","id":99209799,"user":{"login":"torkelo","id":10999,"avatar_url":"https://avatars.githubusercontent.com/u/10999?v=3","gravatar_id":"","url":"https://api.github.com/users/torkelo","html_url":"https://github.com/torkelo","followers_url":"https://api.github.com/users/torkelo/followers","following_url":"https://api.github.com/users/torkelo/following{/other_user}","gists_url":"https://api.github.com/users/torkelo/gists{/gist_id}","starred_url":"https://api.github.com/users/torkelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torkelo/subscriptions","organizations_url":"https://api.github.com/users/torkelo/orgs","repos_url":"https://api.github.com/users/torkelo/repos","events_url":"https://api.github.com/users/torkelo/events{/privacy}","received_events_url":"https://api.github.com/users/torkelo/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T20:22:45Z","updated_at":"2015-05-05T20:22:45Z","body":"Better ask in graphite mailing list or irc channel. If you have a working graphite query I could show how to split it up into separate (linked) grafana queries. "}}