Showing numbers as percentage

Hi,

The following query shows the average usage of our Puma web server.

SELECT ( 
    abs(1) - filter(average(newrelic.timeslice.value OR 0),
   where metricTimesliceName = 'Custom/Puma/pool_capacity') / filter(average(newrelic.timeslice.value OR 0), 
   where metricTimesliceName = 'Custom/Puma/max_threads')
) * 100.0 AS '% Usage' 
from Metric where appName = 'App Server' TIMESERIES

Here the formula is (1 - pool_capacity / max_spawned_threads) * 100.0

I want to show the numbers which are generated from this query as percentage on the dashboard.

How can I do that?

Best,

Mehemt

1 Like

Is there any good news here? How can I do that?

Not clear what you are having a problem with. Is the query not working?

@6MM The query is working. But I want to show results as pertentage. y-axis must have up until 100. Is there a way to tell New Relic to show this data in this way?

That is sort of different than your title. Just force it with another metric.

SELECT 1 as '100%', percentage(count(*), where transactionType = 'Other') as 'non web' from Transaction timeseries auto

5 Likes

@mehmet4 Following up on this oneā€¦ Did forcing it with another metric based on @6MM suggestion work for you?

Hey @6MM thanks, this is really very smart solution.

@JoiConverse yes it is resolved, thanks.

1 Like