Global report for local admins

Support forums for the Habitat Automate plugin
Post Reply
jamiep87
Posts: 7
Joined: Fri Nov 19, 2021 8:06 pm
2

Global report for local admins

Post by jamiep87 »

Is it possible to one, turn on the local admin group monitor for all clients in mass and then be able to export a report for all of them without opening each client and using the export to excel option?

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Global report for local admins

Post by Cubert »

It is if you have SQL access to the Automate Database. Basically the plugin queries database for rows and columns based on clientID, Then exports it out to CSV.

You could make the same queries but without the "Where as ClientID" to get all entries and then copy them out to csv directly.


Here are the SQL tables for the LAGM tables.
Screenshot 2024-03-06 132018.png
Screenshot 2024-03-06 132018.png (44.92 KiB) Viewed 173 times

You want the plugin_p4a_habitat_lagm_users table and it will return items like so. ClientID, ComputerID, (Username in admin group) and scan date.


Screenshot 2024-03-06 132159.png
Screenshot 2024-03-06 132159.png (19.63 KiB) Viewed 173 times

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Global report for local admins

Post by Cubert »

Since your using Habitat, You have a SQL query tool in Habitat that should draw the data out of table for you.

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Global report for local admins

Post by Cubert »

Here try this SQL Query, it will pull down Computer Name and Client Name as well as user data.

Code: Select all

SELECT A.ClientID, A.ComputerID, A.Username, A.ScanDate, C.Name as computer, B.Name as Client FROM plugin_p4a_habitat_lagm_users A LEFT JOIN computers C on A.computerID = C.ComputerID LEFT JOIN clients B on A.clientID = B.clientID;

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Global report for local admins

Post by Cubert »

As for enabling a lot of clients at once,

Set Master Switch to 1 for every client ID you add using the insert command.

Code: Select all

INSERT INTO `plugin_p4a_habitat_lagm_config`
(`ClientID`,
`MasterSwitch`)
VALUES
(<{ClientID: }>,
<{MasterSwitch: 0}>);

Post Reply

Return to “Habitat”