Thomas Koelle
Thomas Koelle

Reputation: 3742

Minus NRQL average(diskFreeBytes) in New Relic

I would like to show a graph in New Relic with diskspace where below 1 TB is considered 0 in the graph. And values above are shown without the Terabyte, so 1200 GB shows in graph as only 200.

NRQL that works

SELECT average(diskFreeBytes)/pow(2,30) as 'GB free' FROM StorageSample WHERE mountPoint='F:' and hostname = 'ABC' SINCE 24 hours AGO TIMESERIES

But I cant deduct the Terabyte

SELECT (average(diskFreeBytes)/pow(2,30))-1000 as 'GB free' FROM StorageSample WHERE mountPoint='F:' and hostname = 'ABC' SINCE 24 hours AGO TIMESERIES

Can anyone explain why it doesn't work and provide an example that does.

Upvotes: 0

Views: 395

Answers (1)

GalloCedrone
GalloCedrone

Reputation: 5067

I would not divide per pow(2,30), the chart is smart enough to change the unit alone:

enter image description here

The drawback of this solution is that it would not show as 0 values under 1T but negative

Upvotes: 1

Related Questions