Page 1 of 1

Help to create a query

Posted: Fri Apr 28, 2023 12:44 am
by jabi27
Hi

I need a query that will return the count of

- host:* , program:*

sql would be something like:

select host, program, count(*) group by 1,2

It is properly simple but I am missing something :-)

Thanks

Jan

Re: Help to create a query

Posted: Mon Aug 14, 2023 12:01 pm
by danderson
Thanks for reaching out @jabi27,

You can access our documentation here: Log Server Docs

Here's a link I found that may answer your question
https://assets.nagios.com/downloads/nag ... Server.pdf

Re: Help to create a query

Posted: Mon Aug 14, 2023 11:59 pm
by kg2857
It seems I'm missing it too--what is simple in SQL is hard in ES it seems.

Re: Help to create a query

Posted: Mon Aug 21, 2023 2:47 pm
by swolf
Hi @jabi27,

I think what you're looking for is the value count aggregation. I'm not confident that you can use aggregations easily from the dashboard/query interface (you may have some luck with raw queries, I'm not as sure), but that's the closest match I was able to find.

Hopefully that helps - please let me know if you have any further questions or concerns.
-Sebastian Wolf