1

I'm trying to figure out how to use New Relic Query Builder and I having trouble with this query:

What's the most frequent error?

I tried :

SELECT level FROM Log WHERE level='error' AND rate(level)

1 Answers1

0

Depends what structure of Log do you have and which resulting view would you like to receive, could you please provide structure so it's possible to provide you NRQL.

As a general basic solution, you can try FACET

It shows the most frequent error level and occurrences

SELECT count(*) FROM Log FACET level LIMIT 1

It shows the most frequent error level 1 minute rate

SELECT rate(count(*), 1 minute) FROM Log FACET level LIMIT 1

If you have an error message/type inside Log, then it makes sense to FACET by that type (use field name which is specified in your Log)

SELECT rate(count(*), 1 minute) FROM Log WHERE level='error' FACET type LIMIT 1
Yaro
  • 614
  • 6
  • 13