Question about time setting in SINCE statement

I have set up a chart with this NRQL statement
SELECT host.name, host.IP from Metric where app.name=‘Observabilty-Monitor’ since 10 seconds ago order by host.name asc

Every time I try to see it. it is blank until I do a refresh.

The data I have ingested into New Relic is metric data with host.name and Host.ip as its attributes. How do I display these two attributes without duplication.

Hi, @Xu5: The chart is blank because New Relic has not received data within the last 10 seconds.

When I look at your account, I do not see any entity named “Observability-Monitor”. Please provide the actual app name, so I can see your data.

here is: NIDC-SIDC-Device-Observability and also where in New Relic I can find this entity. please advise

Try this:

SELECT latest(IcmpResponseTime) 
FROM Metric 
WHERE app.name = 'NIDC-SIDC-Device-Observability' 
FACET host.name, host.IP LIMIT MAX

perfect solution for me. thanks

can this apply to events as well?

You should be able to. Have you tried it?

tried a couple time and no luck. for this https://onenr.io/0oR8q70yojG. don’t want to display the duplicate ones

Which value do you actually want to display? You need to SELECT one value, then FACET on the attributes you don’t want to duplicate. Something like this:

SELECT latest(`pafw last updated`) 
FROM PaloAltoLicense 
FACET `pa name`,`pa Model`,`pa ip Addr`,`pa serialno`,`pa premium`,`pa app/Threat`,`pa url filtering`,`pa wildfire`,`pa logging` 
WHERE `pa Model` LIKE 'PA%'  
SINCE this week 
LIMIT MAX 
WITH TIMEZONE 'Pacific/Auckland'

I recommend that you attend one of our free training sessions on NRQL and dashboards: https://learn.newrelic.com/webinar-getting-started-with-dashboards-nrql

haha, works. Thanks a lot.

what about this one? have managed to make something working but order by seems not working. the link is https://onenr.io/0qwyeWoWewn. and also last Updated doesn’t work really well to avoid the duplcates

People who are not New Relic employees do not have access to your account. Please post the NRQL queries you have tried and describe how they do not work, so that other members of the community can help you. I obviously cannot write queries for everyone. :slight_smile:

This is NRQL: SELECT count(*) FROM SdWanRouterbfdSessions FACET Site Name order by site name since 10 minutes ago limit max
but the order of site names is as attached

ORDER BY may only be used to sort queries of attributes, not aggregator functions, such as count(*).

Again, I recommend that you attend one of our free training sessions on NRQL and dashboards: https://learn.newrelic.com/webinar-getting-started-with-dashboards-nrql . Also, please start a new topic for any future questions, since the original question in this topic was solved. Thank you!