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

Removing old systems...
https://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=5832
Page 1 of 1

Author:  jpurcell [ Wed Jan 11, 2012 7:30 am ]
Post subject:  Removing old systems...

I have not seen this discussed, but it seems this version of OpenAudIT no longer has the ability to remove systems that have not been audited in X days. It may be in a spot where I cannot find it, but I have looked through quite a bit.

At this point, I am stuck dropping the DB every once in a while to get a relevant set of data. Is there any sort of PHP script or command I am missing that I can use to clean up the DB from time to time?

Basically, with a somewhat volatile environment that consists of about 700 machines, over the course of a few months what with imaging and all, my OpenAudIT DB has more than 900 machines, of which I'd assume 200 or so have been replaced/reimaged, and are no longer relevant. Any help?

Author:  Mark [ Wed Jan 11, 2012 8:57 am ]
Post subject:  Re: Removing old systems...

Select an appropriate group (maybe the All Devices group).
Run the report that shows Audit Dates.
Sort by date.
Edit (by checking each) the items you wish to remove and set their status to Deleted.
Done.
Those systems will not appear in any groups or reports (unless you specifically ask for them).
As for the DB growing because we don't actually remove them from the DB - I have had several users state that their business/industry cannot delete items, only flag them as unused. I might take a look at a function to actually remove these systems from the DB, but it's not high on the list...

Author:  jpurcell [ Thu Jan 12, 2012 12:25 am ]
Post subject:  Re: Removing old systems...

Thanks for the reply.

That at least will help me clear up the data in future months and get a nicer set of data.

I suppose one thing I do wonder is whether there would be some sort of simple PHP / MySQL script that could be executed as a CRON job to delete the data that is no longer relevant. I guess my main interest here is that most environments are similar to what I deal with, where re-imaging and system replacement is the norm. Going through periodically and running a report and clicking the "bad" results one by one and then marking them deleted without actually performing a delete seems to be a bit of a chore.

Basically, while I realize that there are likely features that are far more important to the Open-AudIT crowd, for me, the data is only relevant if it does not contain a bunch of systems that no longer exist. IE - If I am trying to confirm Microsoft Office licensing, having 20-30 retired systems in the DB will certainly show me that I am way over my available licenses.

Granted, you have given a great method to get that cleared up, just indicating why it might be important to some.

Thanks for the help Mark!

Author:  jpurcell [ Thu Jan 12, 2012 2:04 am ]
Post subject:  Re: Removing old systems...

One more question...

On the report, when I sort by date, the arrow changes to indicate ascending or descending, but the fields aren't actually sorted. Anything I need to check to correct this?

Author:  Mark [ Mon Jan 16, 2012 10:32 am ]
Post subject:  Re: Removing old systems...

[quote]On the report, when I sort by date, the arrow changes to indicate ascending or descending, but the fields aren't actually sorted. Anything I need to check to correct this?

That's a bug. It's happening on most reports with DATE formatted data columns. It's on the list, but if anyone can give me a heads-up as to where it is (and a fix), it would be most appreciated.

Author:  jpa [ Tue Jan 17, 2012 3:33 am ]
Post subject:  Re: Removing old systems...

Two things:

You have a lot of report definitions where the Timestamp data or date displayed data has a report definition column_type of text rather than timestamp.

The List Reports function doesn't work if there is only one report defined. In v_list_reports.php you have a couple of these:
[code]if (count($query) > 1)[/code]

Author:  MarkD [ Wed Jan 18, 2012 1:47 am ]
Post subject:  Re: Removing old systems...

Interesting, I just asked this question on the other forum as I'm running both v1 and v2. How did you do this on Version 1 of OA as I've been looking for a way to sort by audited date and archive / delete old machines also?

Mark

[quote="jpurcell"]I have not seen this discussed, but it seems this version of OpenAudIT no longer has the ability to remove systems that have not been audited in X days. It may be in a spot where I cannot find it, but I have looked through quite a bit.

At this point, I am stuck dropping the DB every once in a while to get a relevant set of data. Is there any sort of PHP script or command I am missing that I can use to clean up the DB from time to time?

Basically, with a somewhat volatile environment that consists of about 700 machines, over the course of a few months what with imaging and all, my OpenAudIT DB has more than 900 machines, of which I'd assume 200 or so have been replaced/reimaged, and are no longer relevant. Any help?

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