1
votes

I have series s1 (e.g. host 1) with 2 columns cA (e.g. memory used) and cB (e.g. another type of memory used), respectively.

How do I get a set of points which are the result of adding s1.cA and s1.cB.

I've looked at the influxdb documentation here http://influxdb.com/docs/v0.7/api/query_language.html but I couldn't understand their examples.

Thanks in advance.

2

2 Answers

2
votes

You should be able to run select cA + cB from s1, below is a screenshot of running the query on some sample data:

enter image description here

0
votes

Since you are trying to add data from different sources having different timestamp, you could follow the below steps -

Source A

1. Set the time series name
2. Set the coulmns (2 in your case)
3. Set the point of Source A, set 0 for source B

Source B

1. Set the time series name
2. Set the coulmns (2 in your case)
3. Set the point of Source B, set 0 for source A

JSON request with the data will look something like below -

{"name":"s1","columns":["cA","cB"],"points":[[0,1212],[123123123,0]]}