0

Background

I have a job that reports the status of a dependency when the status changes. So it reports 0 if it goes down, and 1 when it goes back up. But it reports very rarely because the dependency is stable.

The NRQL:

FROM SomeEvent
SELECT `service-status`

Shows a table

timestamp | service-status
--------------------------
...       | 1
...       | 1

I have the NRQL:

FROM SomeEvent
SELECT latest(`service-status`)
TIMESERIES

But this just produces a graph with dots at the times of reporting.

enter image description here

Desired outcome

Instead of the dots, I'd like to have a line that indicates that the status is still 1, even if no new reports have ticked in.

In other words, it should "fill" the gaps with whatever the latest value is.

1 Answer 1

0

You could make use of new-relic filter in here,

FROM SomeEvent
SELECT filter(latest(`service-status`), where true)
TIMESERIES
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the tip! But this now just produces one dot.
may be you could skip latest in here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.