Live queries
Ask your agents a question and see the answer per host within seconds. Is Remote Desktop off? Which hosts listen on port 3389? What does PasswordAuthentication say in sshd_config? Schedule the question and every change lands in an index, ready for an alert.
Overview
Live queries live on the Agents page, tab Live queries. A query uses the same signed, read-only building blocks as the vulnerability sensors. The agent reads, your LogPulse environment judges the answer. There is never a script.
Requirements
| What | Needs |
|---|---|
| Live queries | Agent 0.9.3 or later, every plan. Permission agents:update |
| Scheduled queries | Agent 0.9.3 or later, Pro or Business. Permission agents:query |
| Firewall rules and "all listening ports" | Agent 0.9.3 or later |
| CPU, memory and disk | Agent 0.9.6 or later. Older agents answer Unknown |
| More than 200 sensors and queries per host | Agent 0.9.6 or later (500 per host) |
Ask a question
Pick the hosts (all agents, groups or single agents), choose what to look at and press Run now. The question goes straight to connected agents over their open connection; each agent answers once. A live query stays open for 24 hours, so hosts that come online later still answer.
What you can ask
| In the form | Building block | Compare versions |
|---|---|---|
| Installed software | package | Yes |
| A setting in a config file | file_regex for Key value or key = value | No |
| A registry value | registry (Windows) | Yes |
| A file | file (one * per folder) | Windows (PE version) |
| Text in a file | file_regex (RE2) | No |
| A running process | process | No |
| A listening port | port (empty: every listening TCP port) | No |
| Firewall rules | firewall: rules with a port from Windows Firewall, ufw or firewalld, such as block in tcp/23 | No |
| CPU, memory or disk | performance: one of cpu, memory, swap, disk (per disk, such as /var 91) or top_memory (the 10 programs with the most memory). Every value ends in a percentage | No |
| A Java library | archive (live only) | Yes |
Show or check
Show the value lists the value per host, and on top how many hosts have which value. Click a value to see the hosts.
Check a value adds an expected value (is, is not, contains, matches, more than, less than, exists, absent). Every host is As expected or Not as expected. All values found must match: one sshd include with yes makes the host Not as expected. An agent that may not read a path answers Could not check, never Not found.
For CPU, memory and disk, more than and less than compare the percentage at the end of each value. Disk space with less than 90 is as expected when every disk is below 90% full.
Templates
Use a template fills the form in one click. A selection:
| Template | Hosts |
|---|---|
| Open ports per host | Linux, Windows |
| Ports the firewall blocks / lets in | Linux, Windows |
| Remote Desktop is off, requires NLA | Windows |
| SMBv1 server is off | Windows |
| Defender real-time protection is not turned off by policy | Windows |
| Windows Firewall domain profile is on | Windows |
| SSH does not accept passwords, no root login with a password | Linux |
| Remote access tools that run (AnyDesk, TeamViewer, ScreenConnect, RustDesk) | Linux, Windows |
| Telnet or FTP listens | Linux, Windows |
| Browser versions per host | Linux, Windows |
| Disks that are almost full (every disk below 90%) | Linux, Windows |
| Hosts short on memory, CPU use right now, programs using the most memory | Linux, Windows |
Scheduled queries
Press Schedule to keep a query running every hour, every six hours or every day. Pick the index the answers go to. A changed expected value judges the stored answers again right away. The host sheet on the Agents page shows the current answer under Scheduled queries.
Events and alerts
On every change, and otherwise once a day per host, a scheduled query writes a state event:
index=<your index> sourcetype=agent_query event_type=state query_id=<uuid>
state, value, values, added, removed, expected_op, expected_value, changedFor every value that appears or disappears there is also a change event with change=added|removed, the value, and the parsed fields port, protocol, firewall_action and direction. CPU, memory and disk answers have no change events: the state event carries percent and, for a disk or a program, item. With a check, the state event is written when the outcome flips, so state=not_compliant is the alert. Alert on them like on any other search:
sourcetype=agent_query event_type=change change=added primitive=port
sourcetype=agent_query event_type=change change=added primitive=firewall firewall_action=allow
sourcetype=agent_query event_type=change change=removed primitive=firewall firewall_action=blockSafety
Only the fixed read-only building blocks of the agent run: no shell, PowerShell, WMI or script. Paths, keys and patterns that look like secrets are refused. The allowlist of the host in sensors.conf also applies to queries, and an agent in restricted mode only reads what its own user may read.
API
| Call | What it does |
|---|---|
POST /api/v1/fleet/questions | A live query with targets (agentIds, groupIds; empty is all agents) and an optional check |
POST /api/v1/agent-queries/scheduled | A scheduled query with intervalMinutes (60, 360 or 1440) and index |
PATCH / DELETE on a scheduled query | Change, pause or remove it |
Limits
Limits are per organization and follow your plan. An Enterprise license raises them, up to the maximum in the last column. Closing a live query frees its place right away.
| Limit | Free | Starter | Pro | Business | Enterprise license | Maximum |
|---|---|---|---|---|---|---|
| New live queries per hour | 30 | 30 | 60 | 120 | 120 to 300 | 300 |
| Live queries open at once | 10 | 10 | 15 | 25 | 25 to 50 | 50 |
| Active scheduled queries | Not included | Not included | 50 | 100 | 100 to 150 | 150 |
Other limits: a query names at most 100 hosts and groups, and an answer keeps at most 200 values per host. A live query stays open for 24 hours. The Live queries tab shows how much of each limit is in use.
Why there are limits
Every live query is signed into the sensor bundle of each host it targets and sent at once, and every scheduled query stays in that bundle. An agent takes 500 sensors and queries in one bundle (200 before agent 0.9.6), shared with the vulnerability sensors. The limits keep room for those sensors and keep the answers fast on large fleets. A host that answered a live query drops it from its bundle straight away.