I'm looking to build a SWQL query to report on NPM agents who's logging mode has been set to something other than defaul.t I can't seem to find the right table in SWQL studio. Any assitance would be greatly appreciated.
Hi @shocko,Sorry, I misunderstood the question. To the best of my knowledge that isn't in the Orion database, and must be pulled directly from the config file on the host running the agent.
The config files are located here:
The section of the config file you're looking for is this:
true INFO 10 10 1
You could write a script to get the addresses of all the hosts running an agent, then reach out to each (WMI for Windows, SSH for *Nix), and run a local script body to capture that section of the config file.
Hi @shocko,
I think that this is what you're looking for:
SELECTA.AgentId,A.AgentGuid,A.NodeId,A.Name AS [AgentName],A.Hostname,A.IP AS [AgentIP],A.Node.Caption AS [NodeCaption],A.Node.IP_Address AS [NodeIP]FROM Orion.AgentManagement.Agent A-- Nodes that are set as 'Default' in the 'Log and Event Monitoring' section of edit node, will not be in the Orion.OLM.Nodes list WHERE A.Node.NodeID IN ( SELECT OLMN.NodeID FROM Orion.OLM.Nodes OLMN)
Hi. I set a few agents to verbose mode but this query did not return them. What is the table Orion.OLM.Nodes? I'm just using NPM and not any other products,.
@shocko the OLM tables refer to Orion Log Viewer. I don't think that query shows what you are requesting, it's in essence showing Nodes that are configured for Log Viewer instead of the logging level assigned to the agent. I went poking around in the SWQL tables and couldn't find where it stores that setting, I'll keep trying to track it down when I have a little more time and update the post if I find it.
Thanks! Yes, that makes sense.
Thanks @christopher.t.jones123 for pointing this out. I misread the question.