So… not quite sure if this is the correct place or not. Kinda a noob here… hopefully this is a trival question and I just a noob and making it harder than it is:

Here is the stage for the question:

- Using Alarm Box plugin
- Have multiple metrics. In the end there will be 14, but for sake of clarity, only showing the first 3. The array looks like:

[

{ “target”: “node04.disk.unhealthy.count.max”, “datapoints”: [ [ 0, 1507845480000 ], [ 0, 1507845540000 ], [ 2, 1507845600000 ], [ 0, 1507845660000 ], [ 0, 1507845720000 ], [ 0, 1507845780000 ] ] },

{ “target”: “node05.disk.unhealthy.count.max”, “datapoints”: [ [ 0, 1507845480000 ], [ 0, 1507845540000 ], [ 0, 1507845600000 ], [ 0, 1507845660000 ], [ 0, 1507845720000 ], [ 0, 1507845780000 ] ] },

{ “target”: “node06.disk.unhealthy.count.max”, “datapoints”: [ [ 0, 1507845480000 ], [ 0, 1507845540000 ], [ 0, 1507845600000 ], [ 0, 1507845660000 ], [ 0, 1507845720000 ], [ 0, 1507845780000 ] ] }

]

So the need and question is simple: Need to determine the sum of all of the target datapoints first elements while ignoring the timestamp.

So, for the first target (Node04)

[ [ 0, 1507845480000 ], [ 0, 1507845540000 ], [ 2, 1507845600000 ], [ 0, 1507845660000 ], [ 0, 1507845720000 ], [ 0, 1507845780000 ] ] = 2

The second target (Node05)

[ [ 0, 1507845480000 ], [ 0, 1507845540000 ], [ 0, 1507845600000 ], [ 0, 1507845660000 ], [ 0, 1507845720000 ], [ 0, 1507845780000 ] ] = 0

The third target (Node06)

[ [ 0, 1507845480000 ], [ 0, 1507845540000 ], [ 0, 1507845600000 ], [ 0, 1507845660000 ], [ 0, 1507845720000 ], [ 0, 1507845780000 ] ] = 0

Therefore the result to be displayed in the Alarm Box is: 2 + 0 + 0 = 2

Not exactly sure what the mathjs in the Scratch Pad should be.

Any help would be greatly appreciated.

/James