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 7:49 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Removing old systems...
PostPosted: Wed Jan 11, 2012 7:30 am 
Offline
Newbie

Joined: Tue Mar 09, 2010 3:02 am
Posts: 32
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?


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 11, 2012 8:57 am 
Offline
Site Admin
User avatar

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

_________________
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: Thu Jan 12, 2012 12:25 am 
Offline
Newbie

Joined: Tue Mar 09, 2010 3:02 am
Posts: 32
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!


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 12, 2012 2:04 am 
Offline
Newbie

Joined: Tue Mar 09, 2010 3:02 am
Posts: 32
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?


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 16, 2012 10:32 am 
Offline
Site Admin
User avatar

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

_________________
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: Tue Jan 17, 2012 3:33 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
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]


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 18, 2012 1:47 am 
Offline
Newbie

Joined: Fri Mar 07, 2008 10:08 pm
Posts: 37
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?

_________________
[color=#FF0000]OA environment:[/color]
OA Server: Virtual Linux KVM
[color=#FF8000]
1539 devices[/color]


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.  [ 7 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