Kaseya Community

SQL Query to report on specific agent info

  • For some reason my original post was empty.

    We're trying to provide specific information in reports on basic machine hardware specs and microsoft licensing. Is is possible to write an SQL query to get the information from the SQL database directly and output it into a table or a csv file?

    The information that we're trying to collect is something like the following:

    Workstation Name: Machine1

    Domain: Workgroup

    IP Address:



    Processor: Intel Core2 Duo 2.93GHz

    RAM: 4096

    Hard Disk Size: 80Gb Seagate

    Machine Type/Model: Dell Vostro

    Machine Serial Number: ABC123456

    Operating System Version: Microsoft Windows 7 Professional

    Operating System Product Key in use: 12345-12356-12345-12345-12345

    Microsoft Office Version: Microsoft Office 2010 Professional

    Microsoft Office Product Key: 54321-54321-54321-54321-54321

    [edited by: matt@mansol.net.au at 10:11 PM (GMT -8) on 2-19-2012] updated
  • YES

  • Is this what you're wanting? This will give you the basics to work with, but you'll have to arrange the order and how you want to display.

    SELECT dbo.vAgents_AgentStatus.computerName, dbo.vAgents_AgentStatus.domainWorkgroup, dbo.vAgents_AgentStatus.ipAddress, dbo.vAgents_AgentStatus.subnetMask, dbo.vAgents_AgentStatus.defaultGateway, dbo.vAgents_AgentStatus.connectionGatewayIp, dbo.vAgents_AgentStatus.cpuType, dbo.vAgents_AgentStatus.ramMBytes, dbo.vAgents_AgentStatus.osInfo, dbo.vAgents_AgentStatus.manufacturer, dbo.vAgents_AgentStatus.productName, dbo.vAgents_AgentStatus.sysSerialNumber, vLicenseInfo.Publisher, vLicenseInfo.ProductName, vLicenseInfo.LicenseCode, vLicenseInfo.ProductKey, vLicenseInfo.LicenseVersion, vLicenseInfo.InstallDate

    FROM ksubscribers.dbo.vAgents_AgentStatus

    FULL JOIN ksubscribers.dbo.vLicenseInfo

    ON dbo.vLicenseInfo.agentGuid = dbo.vAgents_AgentStatus.agentGuid

    ~ tommy

  • How about hard driver serial number?  Can this be done?