This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sophos Report Query

Hello, 

Can someone kindly advise how I would go about running a query to pull down the following data?

I'm need to run a report which will show the machine name, SAV version and which OU the machine resides in. I've been having a play around with running the query's from excel and I can more or less get most of the data I need but I cant seem to get the report to show the location of the machine within the console (In which OU). Any help would be very much appreciated 

 

Many Thanks

 

Tom

 



This thread was automatically locked due to age.
  • Hi,

    I assume you just want the full SEC group path as this mirrors your AD based on ADSync?  If so I can see a few options here:

    1. Click on the top node of the tree so you can see all clients.  
    Click on a computer in view, then Ctrl-A, Ctrl-C, Notepad/Excel, Ctrl-V on the computer list view in SEC.  
    Often people don't realise this is possible.
    The Group column will be copied - The Computer Details tab may be closest to the info you require. I.e. Computer name, domain name, Logged on user, Group, etc...

    2. Use the Sophos Reporting Interface. I.e the specific supported SQL views that are made available in the 'Core' database.

    3. Use direct table/view/function queries.  Not supported, may change, but more data to retrieve. E.g.

    I assume you are currently trying 2 or 3?

    For 2, you should be OK with the following as a starting point:

    select c.Name, gp.PathAndNAme from [Sophos Reporting Interface].vComputerHostData as c
    inner join [Sophos Reporting Interface].vComputerGroupMapping as cgm on cgm.computerid=c.ComputerID
    inner join [Sophos Reporting Interface].vGroupPathAndNameData as gp on gp.groupid=cgm.groupid

    For 3, you could base it off:

    select cld.ComputerName, gpnt.PathAndName from ComputerListData2 as cld inner join GroupPathAndNameTable() as gpnt on gpnt.groupid=cld.groupid

    I've chosen the view ComputerListData2 as there are plenty of columns you may want to use.

    Hope it helps.

    Jak

  • Hi Jak, 

     

    I never even give it a thought to copy directly from the console I will also give the other query's ago. 

    Many Thank

    Tom

  • Click ... Ctrl-A, Ctrl-C

    Minor adjustment: The Ctrl-A isn't necessary, Ctrl-C always copies the whole list. More important than potential savings - Ctrl-C does not respect the selection (there must be an active, i.e blue not grey, selection in the computer view pane) and thus it's not possible to copy a single or just specific computers from the list.

    BTW: IMO it's a little bit confusing that the commands listed in the Edit menu for the computers view pane have common names and shortcuts but different semantics. Copy copies the column values ignoring the selection. Cut and Delete respect the selection. The former activates Paste and prepares the selected computer objects for movement (the equivalent of dragging and dropping the computers to a certain group) but does not copy anything to the clipboard.

    Christian