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

Beta doesn't handle name changes.
https://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=5748
Page 1 of 1

Author:  Shmee [ Tue Jul 19, 2011 2:58 am ]
Post subject:  Beta doesn't handle name changes.

The beta does not seem to handle name changes for a computer. If I change the name of a computer it adds a new one, and then I have to delete the computer with the old name.

In OAv1 it would just update the name of the existing computer record.

This is not a huge deal, but it was nice because then I wouldn't have to update all the info if I had to change the computer name (eg: owner, purchase date, location, warranty length, and whatnot).

Author:  jpa [ Tue Jul 19, 2011 3:49 am ]
Post subject:  Re: Beta doesn't handle name changes.

For some reason Mark put the computer name in the system identifier key. Not sure what the reasoning is but maybe that's not such a good idea for obvious reasons.

I've been playing around with OAv2 but haven't switched to using it for our production auditing. So there might be a perfectly valid reason for this. Perhaps he was getting duplicates using the UUID alone. We use MAC address in OAv1 because the UUID caused problems. No such provision in OAv2.

Author:  Mark [ Wed Jul 20, 2011 3:42 pm ]
Post subject:  Re: Beta doesn't handle name changes.

The unique id for a system is the computer name + UUID.
How ofter do you rename a PC ?
If it is renamed, is it re-imaged ?

If I use UUID, on white boxes it causes problems. They are often not set, set as all F's, etc, etc.

If I use MAC Address, these change. Think virtual machines. Think multiple NICs, etc, etc.

If I use hostname, these change.

The idea was to get something that was both (relatively) static and unique. Hostname + UUID for most people will be a unique combination.

I have found when a PC is renamed, it is usually also reimaged. In that case (in my opinion) it IS a new PC. You can use the "export system details" report to extract the old data, then reimport it after the "new" system has been audited.

Again - are you renaming PCs often enough that this is actually an issue ?
I'd be interested in your use-case for that. It may just make me change how I uniquely identify a system...

Author:  Shmee [ Thu Jul 21, 2011 2:36 am ]
Post subject:  Re: Beta doesn't handle name changes.

We don't do it supper often, but like you said, we do it when it is re-imaged or re-purposed. We are a Dell shop for the most part so the UUID issue really hasn't come up for us, but I can see your problem.

It was just easier for us have the name change automatically.

I am wondering if this would be a good thing to be configurable? In the audit config have people pick what they want to identify their computers by?

With like three options: UUID, UUID + Name, MAC.

Author:  shanimal [ Thu Jul 21, 2011 5:19 am ]
Post subject:  Re: Beta doesn't handle name changes.

We usually rename and re-image, for the record. But this would affect a small percentage of systems here anyway.

Author:  Shmee [ Thu Aug 11, 2011 8:33 am ]
Post subject:  Re: Beta doesn't handle name changes.

I know this is an old thread but to manage duplicate computer names I created a group with the following SQL statement:

SELECT
system.system_id,
system.uuid,
count(*) as cnt
FROM
system
WHERE
system.system_id = system.system_id AND
system.man_status = 'production' AND
system.timestamp = system.timestamp GROUP BY uuid HAVING cnt > 1

This shows me computers with duplicate names, so I can deal with them accordingly.

Thanks,

-Shmee

Author:  el_geto [ Wed Aug 17, 2011 12:39 am ]
Post subject:  Re: Beta doesn't handle name changes.

On OAv1, it was very helpful running the reports based on number of systems (physical boxes), but we were definitively missing having a historical record whenever a computer was re imaged.

I liked the fact that in OAv2 you do have that historical record of the old computer, but it makes running the reports a little bit more difficult, ideally, if the status could change from Production to Retired when a duplicate system is found, that would fix the problem.

The only thing is that once a system is -Retired-, I can't find it again in OAv2.

Author:  Shmee [ Wed Aug 17, 2011 3:36 am ]
Post subject:  Re: Beta doesn't handle name changes.

I am not totally sure how the new built in reporting works for OAv2 but I am sure if you look in to it you can create a report that includes the retired flag, or you could easily create a custom group with SQL like I did a couple of replies previous to this one.

You can also do what we do here and use an outside reporting tool to look up the info you need. We use Excel (for one time reports) or JasperReports to query all kinds of fun reports, and all you would need to do is brush up on your SQL.

-Shmee

Author:  Mark [ Wed Aug 17, 2011 8:34 am ]
Post subject:  Re: Beta doesn't handle name changes.

Here's a group definition for "NonProduction" systems.
Put it in a text file called NonProduction.xml and put the file in \code_igniter\system\application\controllers\groups
Then go to Admin -> Groups -> Activate Group.
Bingo!

[code]<?xml version="1.0" encoding="ISO-8859-1"?>
<group>
<details>
<group_name>NonProduction Systems</group_name>
<group_padded_name></group_padded_name>
<group_dynamic_select>SELECT distinct(system.system_id) FROM system WHERE system.man_status != 'production'</group_dynamic_select>
<group_parent>1</group_parent>
<group_description>NonProduction Systems</group_description>
<group_category>os</group_category>
<group_display_sql>SELECT system.system_id, system.hostname, system.man_description, system.man_ip_address, system.timestamp, system.man_os_family, system.man_os_name, system.man_icon, system.man_manufacturer, system.man_model FROM system, oa_group_sys WHERE system.system_id = oa_group_sys.system_id AND oa_group_sys.group_id = ? GROUP BY system.system_id</group_display_sql>
<group_icon>device</group_icon>
</details>
<columns>
<column>
<column_order>1</column_order>
<column_name>Hostname</column_name>
<column_variable>hostname</column_variable>
<column_type>link</column_type>
<column_link>main/system_display/</column_link>
<column_secondary>system_id</column_secondary>
<column_ternary></column_ternary>
<column_align>left</column_align>
</column>
<column>
<column_order>2</column_order>
<column_name>Description</column_name>
<column_variable>man_description</column_variable>
<column_type>text</column_type>
<column_link></column_link>
<column_secondary></column_secondary>
<column_ternary></column_ternary>
<column_align>left</column_align>
</column>
<column>
<column_order>3</column_order>
<column_name>IP Address</column_name>
<column_variable>man_ip_address</column_variable>
<column_type>ip_address</column_type>
<column_link></column_link>
<column_secondary></column_secondary>
<column_ternary></column_ternary>
<column_align>left</column_align>
</column>
<column>
<column_order>4</column_order>
<column_name>Last Audit</column_name>
<column_variable>timestamp</column_variable>
<column_type>text</column_type>
<column_link></column_link>
<column_secondary></column_secondary>
<column_ternary></column_ternary>
<column_align>right</column_align>
</column>
<column>
<column_order>5</column_order>
<column_name>OS</column_name>
<column_variable>man_os_family</column_variable>
<column_type>text</column_type>
<column_link></column_link>
<column_secondary></column_secondary>
<column_ternary></column_ternary>
<column_align>right</column_align>
</column>
</columns>
</group>[/code]

Author:  Mark [ Wed Aug 17, 2011 10:07 am ]
Post subject:  Re: Beta doesn't handle name changes.

Here's a report definition for "Duplicate UUID" systems.
Put it in a text file called DuplicateUUID.xml and put the file in \code_igniter\system\application\controllers\reports
Then go to Admin -> Reports -> Activate Report.
Bingo!


[code]<?xml version="1.0" encoding="ISO-8859-1"?>
<report>
<details>
<report_name>Duplicate UUIDs</report_name>
<report_display_in_menu>y</report_display_in_menu>
<report_sql>SELECT system.system_id, system.uuid, system.hostname, system.man_description, system.man_ip_address, system.timestamp, system.man_os_family, pc_date_os_installation FROM system LEFT JOIN oa_group_sys ON system.system_id = oa_group_sys.system_id WHERE oa_group_sys.group_id = ? AND system.uuid IN ( SELECT system.uuid FROM system GROUP BY system.uuid HAVING (COUNT(system.uuid) > 1) ) </report_sql>
<report_display_sql></report_display_sql>
<report_view_file>v_report</report_view_file>
<report_view_contents></report_view_contents>
<report_processing></report_processing>
<report_sort_column>0</report_sort_column>
</details>
<columns>
<column>
<column_order>0</column_order>
<column_name>System Name</column_name>
<column_variable>hostname</column_variable>
<column_type>link</column_type>
<column_link>/main/system_display/</column_link>
<column_secondary>system_id</column_secondary>
<column_ternary></column_ternary>
<column_align></column_align>
</column>
<column>
<column_order>1</column_order>
<column_name>IP Address</column_name>
<column_variable>man_ip_address</column_variable>
<column_type>ip_address</column_type>
<column_link></column_link>
<column_secondary></column_secondary>
<column_ternary></column_ternary>
<column_align></column_align>
</column>
<column>
<column_order>2</column_order>
<column_name>Description</column_name>
<column_variable>man_description</column_variable>
<column_type>text</column_type>
<column_link></column_link>
<column_secondary></column_secondary>
<column_ternary></column_ternary>
<column_align></column_align>
</column>
<column>
<column_order>3</column_order>
<column_name>UUID</column_name>
<column_variable>uuid</column_variable>
<column_type>text</column_type>
<column_link></column_link>
<column_secondary></column_secondary>
<column_ternary></column_ternary>
<column_align></column_align>
</column>
<column>
<column_order>4</column_order>
<column_name>Last Audit</column_name>
<column_variable>timestamp</column_variable>
<column_type>text</column_type>
<column_link></column_link>
<column_secondary></column_secondary>
<column_ternary></column_ternary>
<column_align></column_align>
</column>
<column>
<column_order>5</column_order>
<column_name>OS Installed</column_name>
<column_variable>pc_date_os_installation</column_variable>
<column_type>text</column_type>
<column_link></column_link>
<column_secondary></column_secondary>
<column_ternary></column_ternary>
<column_align></column_align>
</column>
<column>
<column_order>6</column_order>
<column_name>OS</column_name>
<column_variable>man_os_family</column_variable>
<column_type>text</column_type>
<column_link></column_link>
<column_secondary></column_secondary>
<column_ternary></column_ternary>
<column_align></column_align>
</column>
</columns>
</report>[/code]

Author:  Shmee [ Thu Aug 18, 2011 12:24 am ]
Post subject:  Re: Beta doesn't handle name changes.

Thanks for the report!

-Shmee

Author:  Mark [ Thu Aug 18, 2011 10:20 am ]
Post subject:  Re: Beta doesn't handle name changes.

[quote]You can also do what we do here and use an outside reporting tool to look up the info you need. We use Excel (for one time reports) or JasperReports to query all kinds of fun reports, and all you would need to do is brush up on your SQL.

Hey Shmee, what reports would you like that aren't available out-of-the-box ? I have no problem's creating reports (even custom report's that would not be useful for others) that people want/need. I'll start another thread and ask for comments.

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