Open-AudIT
https://www.open-audit.org/phpBB3/

[help] additional info in audit results
https://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=6367
Page 1 of 1

Author:  cyril [ Thu Oct 02, 2014 9:12 pm ]
Post subject:  [help] additional info in audit results

Hi,
I would like to ask if there is a possibility to add additional info to the audit scripts, namely owner and location or room info.
Something like

# ./audit_linux.sh location=0 owner="director@our.company.com" location_room="238" asset_number=123456

I can modify the script, but would the input routine parse the additional data? How should I name the xml tags?
Where I can find the "http:// .... /open-audit/index.php/system/add_system" php code?


Best regards,
Cyril F.

Author:  Mark [ Fri Oct 03, 2014 9:02 am ]
Post subject:  Re: [help] additional info in audit results

In the XML output from the scripts, place a line in the 'sys' section thus:
<man_owner><![CDATA[director@ourcompany.com]]></man_owner>

Thus, for the audit_windows script, at about line 1070:
result.WriteText " <man_owner><![CDATA[director@ourcompany.com]]></man_owner>" & vbcrlf

You can do this for most attributes - man_location_room & man_asset_number will work the same.

The issue will be all devices you audit with that (now customised) script will all set their attributes the same, unless you derive them in the script itself somehow.

Don't forget about the Windows attributes captured "Last Logged On User" (windows_user_name) and "Registered User" (windows_registered_user). You could possibly derive the info from those.

Also - once initially set, a "man_" item in the database will not be changed by an audit script. All man_ items are initially populated if they are empty. Once they contain data, it will not be overwritten by an audit result. This is so you can change the details in the web interface and not have the audits overwrite your desired details.


So as for auto populating the owner, room and asset number fields, unless you have something (a file or a WMI attribute or a registry entry) on each PC, you would need a custom script for every PC. Personally I would use the web interface to multi-edit PCs and set their room location (where there are multiple PCs in a room) and individually edit the PCs to assign an asset number and owner.

One final thought - you could use the "Import from Excel" functionality to populate these fields if you already have them in that format. There is a (short) blurb on it on the [url=https://community.opmantek.com/display/OA/How+to+import+devices+using+a+spreadsheet]wiki[/url]. Likely the best way to do it is to check the spreadsheet in /open-audit/other/imports/import_computers.xls, then export a report from Open-AudIT in excel format, edit the column names (there must be column names in the first row) to those you need (base it on the provided spreadsheet), populate it with the data you need and import it. It should update your existing PCs with the new information. [color=#FF0000]WARNING[/color] - It's been a long time since I've done that, but it definitely did work - but it was a long time ago, it may now break...

Author:  Mark [ Fri Oct 03, 2014 9:29 am ]
Post subject:  Re: [help] additional info in audit results

[color=#FF0000]SOLUTION USING EXCEL[/color]

Import the contents of the attached attached Query definition file (Menu -> Admin -> Queries -> Import Query).

View a Group (I'd suggest Windows or Computers) and run the Query 'Export Details'. Select the Export to Excel button (Menu bar, right hand side) and save the Excel file. Edit any fields you need to change and save the file. Import the file via Menu -> Admin -> Devices -> Add Multiple Devices (using a spreadsheet).

Done :D

Just make sure you don't change the text of the column headings. They are used to match the rows (individual devices) to the database entries upon import. Resizing columns is fine.

Attachments:
ExportDetails.xml [5.11 KiB]
Downloaded 333 times

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/