We’re launching free support for BYOD Android devices and looking for early feedback. Interested?
Fleet’s built-in queries for collecting and storing important device information.
Windows
Osquery flags
Retrieves the values of osquery configuration flags related to query scheduling, configuration updates, and logging intervals for active processes.
SELECT
name, value
FROM osquery_flags
WHERE name IN ("distributed_interval", "config_tls_refresh", "config_refresh", "logger_tls_period")
$service = Get-CimInstance Win32_Service -Filter "Name='osqueryd'"
if (-not $service) {
Write-Error "osqueryd service not found."
exit 1
}
$cmdLine = $service.CommandLine
$flagNames = @("distributed_interval", "config_tls_refresh", "config_refresh", "logger_tls_period")
$result = @()
foreach ($flag in $flagNames) {
# Match a flag of the form --flag=value or --flag value
$pattern = "--" + [regex]::Escape($flag) + "(?:=|\s+)(\S+)"
$match = [regex]::Match($cmdLine, $pattern)
if ($match.Success) {
$value = $match.Groups[1].Value
}
else {
$value = ""
}
$result += [pscustomobject]@{
Name = $flag
Value = $value
}
}
$result | Format-Table -AutoSize
PowerShell commands are currently work in progress, contributions welcome.
Bash commands are currently work in progress, contributions welcome.
Vitals