As Iâ€™ve mentioned before, I donâ€™t think thereâ€™s a lot of value in keeping days of Run History. Far more useful are the Import and Export logs that you should be dumping from your Run Profiles. Using these files you can track exactly what went in and out, and more importantly, when it happened. This can be an invaluable aid in reducing fear and loathing of Identity Management â€“ either by showing that MIIS blamelessly passed bad data through, or by proving that the setting was changed in the CDS, and not by MIIS itself, in some Judgement Day style malicious awakening.
One thing I do wish MIIS could do is timestamp these log files. The native configuration will overwrite the last log file, and whereâ€™s the use in that? However using MASequencer, or something like my simple queuing system, you should be able to insert steps to rename the log files following each Import and Export operation. Now to start with, youâ€™re going to have an easier time if youâ€™re always consistent with your log file naming. I keep it simple â€“ import.xml and export.xml. I then encorporate the following VBScript sub into my scheduling script to copy the log to a datestamped version.
Sub ArchiveLog(MA, Profile)
â€˜ The Profile passed to the sub must be either â€œimportâ€ or â€œexportâ€
Dim objLogFile, objArchiveFile
Dim strLogName, strArchiveName, logTime, dateStamp, strLine
strLogName = MIIS_FOLDER & â€œMaDataâ€ & MA & â€œâ€ &_
Profile & â€œ.xmlâ€
If objFS.FileExists(strLogName) Then
logTime = Now()
dateStamp = DatePart(â€œyyyyâ€, logTime) & TwoChars(â€œmâ€, logTime) &_
TwoChars(â€œdâ€, logTime) & TwoChars(â€œhâ€, logTime) &_
TwoChars(â€œnâ€, logTime) & TwoChars(â€œsâ€, logTime)
strArchiveName = MIIS_FOLDER & â€œMaDataâ€ & MA & â€œâ€ &_
Profile & dateStamp & â€œ.xmlâ€
Set objFile = objFS.GetFile(strLogName)
Function TwoChars(dtvar, time)
i = DatePart(dtvar, time)
If i < 10 Then
TwoChars = â€œ0â€ & CStr(i)
TwoChars = CStr(i)
The XML files will need to be parsed somehow if you want to view them. I make a few simple modifications so that mine can be viewed in a browser using an XML stylesheet – more on that in this post.