Audit Trail cleaner automation task Using BigFix for DSA environment

Hello All,

I’m trying to Automate the Audit trail cleaner activity for DSA environment, Below action script is working perfectly using Fixlet Debugger but when I ran the action script using BigFix - Task, Only the start part of action script is getting completed that is service stop.
Please guide how to overcome this issue.
Action Script used :-


delete __createfile
folder delete C:\Audit
dos mkdir "C:\Audit"

//  CREATEFILE
CreateFile until END_OF_FILE
sc stop BESRootServer
chdir /d D:\Program Files (x86)\BigFix Enterprise\BES Server
BESAdmin.exe /audittrailcleaner /run /oldcontent /oldactions /oldrelaydatfile /deletedcontent /deletedactions  /orphanedsubactions /hiddenactions=15 /deletedmailbox /syncconsoles /olderthan=15 /batchsize=100000
TIMEOUT /T 10
shutdown.exe /r /t 00
END_OF_FILE

delete Audit.bat
move __CreateFile Audit.bat
move "Audit.bat" "C:\Audit\Audit.bat"
waithidden C:\Audit\Audit.bat

Thanks in Advance!!

Try placing quotes around D:\Program Files (x86)\BigFix Enterprise\BES Server.

1 Like

Doesn’t make any difference

Ok. Try removing the commas from the dos mkdir “C:\Audit” and the move “Audit.bat” “C:\Audit\Audit.bat” lines. I would test this myself but I don’t want to run the audit trail cleaner on my test box.

I’m able to copy the Audit.bat file inside folder C:\Audit.
Concern here is when I execute Audit.bat file through BigFix Task first line of the batch file is working and it is stopping root server service and after that remaining lines are not getting executed but when I execute same using Fixlet debugger everything seems to be working fine without any hassle.

Batch file content
Comment :- Through BigFix Task only first line is getting executed and remaining line is not getting executed but using Fixlet debugger every line is getting executed successfully.
sc stop BESRootServer
chdir /d D:\Program Files (x86)\BigFix Enterprise\BES Server
BESAdmin.exe /audittrailcleaner /run /oldcontent /oldactions /oldrelaydatfile /deletedcontent /deletedactions /orphanedsubactions /hiddenactions=15 /deletedmailbox /syncconsoles /olderthan=15 /batchsize=100000
TIMEOUT /T 10
shutdown.exe /r /t 00

@Manish
On the server, does the audit.bat contain all the lines you creating?

yes …batch file contains all the lines.

On another note, you don’t need to stop the root server nor reboot for running the audit trail cleaner.

We want to stop the root server just to make sure no sure has logged in to BigFix Console.

I removed the quotes and tested on a throw away root server and the action completed. I think I had a bad copy previously from the forum post and the quotes were messed up. So that aside, I ran the .bat file manually and the audit trail cleaner is popping up a confirmation dialogue so that is preventing your commands from completing.

Don’t feel that is the right way to do it. Stopping root server will not log people out of the console. They might get wierd errors on console which affects their work.
That is the reason its recommended to run the audit trail cleaner during maintenance hours.

1 Like

I would suggest you configure the audit trail cleaner to run using the BES Admin tool (Clean Up tab).

1 Like

on DSA, BES Admin tool does not have capability to run Audit trail cleaner.

We always intimate user via email that BigFix Console will be down. So,that is not a concern.

You sure about that? (BESAdmin doesn’t schedule on DSA) It seems to be working in mine…

1 Like

In 9.5.3 I don’t see the option in DSA server.

How can this work at all as doesn’t this require the keys to perform this action? Checking the documentation does suggest that you need it for some commands.

https://www.ibm.com/support/knowledgecenter/en/SS63NW_9.5.0/com.ibm.bigfix.doc/Platform/Installation/c_additional_besadmin_onwindows.html

For the chdir are you sure that directory is the right one? Its definitely a non standard location.
Additionally your move "Audit.bat" "C:\Audit\Audit.bat" might fail if the destination exists.

yes directory is correct and the Audit.bat file is getting executed successfully via Fixlet Debugger but through BigFix Task, first line of action is executed i.e “Stop root server” and rest are left apart.

Now concern here is if Audit.bat file is executed via fixlet debugger then it should be executed via BigFix task too…

First line of my action script is to delete the “C:\Audit” folder. So, I don’t think that is issue here.

that is not a valid assumption.


Try the following actionscript instead:

wait sc stop BESRootServer
wait "D:\Program Files (x86)\BigFix Enterprise\BES Server\BESAdmin.exe" /audittrailcleaner /run /oldcontent /oldactions /oldrelaydatfile /deletedcontent /deletedactions  /orphanedsubactions /hiddenactions=15 /deletedmailbox /syncconsoles /olderthan=15 /batchsize=100000
wait TIMEOUT /T 10
restart 10

There isn’t really a reason to do this with a BAT file.


This is probably not valid:

should probably be:

waithidden cmd /c C:\Audit\Audit.bat

or similar.

2 Likes

Still same…
First line of script got executed and other left apart…