Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Thu Mar 28, 2024 11:35 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Thu Oct 02, 2014 9:12 pm 
Offline
Newbie

Joined: Tue Sep 30, 2014 10:41 pm
Posts: 3
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.


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 03, 2014 9:02 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
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...

_________________
Support and Development hours available from [url=https://opmantek.com]Opmantek[/url].
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 03, 2014 9:29 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
[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 332 times

_________________
Support and Development hours available from [url=https://opmantek.com]Opmantek[/url].
Please consider a purchase to help make Open-AudIT better for everyone.
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group