How could I create a query including just hosts with an specific Alias?

Hello!

I would like to create a query that could take all the hosts with a specific alias (through Postman), I have been searching for some documentation, and I got the livestatus references guide (I can not put the link because new users can only include two links).

But I can not find a solution for what I want…

I have this endpoint: http://example123.inet/api/

To have all the hosts I do this:

http://example123.inet/api/query?q=GET%20hosts

But, is there a way to include only the hosts with a specific alias? For example “lb1”

This example shows a filter for services with special description.
lq "GET services\nColumns: host_name description state\nFilter: description ~~ exchange database|availability"

As it is used on the command line. It must be possible to rewrite this query also for your scenario with the alias. The important part is the “Filter” you need to define.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.