All operations performed in Adaxes are logged in detail, and you can view who performed which operations, when, from which hosts, etc. In this tutorial, you will learn how to view Adaxes operation logs, integrate Adaxes into your Syslog infrastructure and how to access log records using scripts.
To view the log of all operations performed via Adaxes, launch Adaxes Administration Console, expand your Adaxes service and select Logging.
Log records will be displayed on the right.
You can filter the logs based on various parameters like date range, operation description, operation type, initiator type (Adaxes service or a user), initiator host.
Log records are kept for 30 days by default.
For each operation you can view some additional information which can be found by clicking Properties in the context menu of a log record.
To view the log of operations performed by a specific user, right-click the user account, point to All Tasks and click Management Activity in the context menu.
To view operations performed on an Active Directory object, right-click the object, point to All Tasks and click Management History in the context menu.
To view operation logs you can also use reports. Adaxes provides four built-in reports for log analysis:
You can use the reports to view operation logs in the Web Interface.
For information on how to schedule reports, see Schedule Reports.
Adaxes logs can be integrated into a centralized logging system with the help of the Syslog protocol. To configure Adaxes to output log entries to an external Syslog server:
Right-click Logging and click Properties in the context menu.
Check the Enable Syslog output checkbox and specify the host of your Syslog server.
For information on how to configure Syslog message settings, see Change Syslog Settings.
It is possible to access Adaxes logs programmatically. The following PowerShell script outputs logs for the last 30 days:
[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi") $numDays = 30 # set to 0 to output all records $admNS = New-Object("Softerra.Adaxes.Adsi.AdmNamespace") $admService = $admNS.GetServiceDirectly("localhost") # Bind to General Log $path = $admService.Backend.GetConfigurationContainerPath("ServiceLog") $serviceLog = $admService.OpenObject($path.ToString(), $NULL, $NULL, 0) $generalLog = $serviceLog.GeneralLog if ($numDays -ne 0) { $generalLog.StartDateTime = (Get-Date).AddDays(-$numDays) $generalLog.EndDateTime = Get-Date } # Get the log records $log = $generalLog.Log $records = $log.GetPage(0) # Output the records foreach ($record in $records) { Write-Host "Start Time:" $record.StartTime Write-Host "Completion Time:" $record.CompletionTime Write-Host "Initiator:" $record.Initiator.Name Write-Host "Object:" $record.TargetObjectName Write-Host "Object Type:" $record.TargetObjectType Write-Host "Operation:" $record.Description }
For more information and examples, see, see Accessing Log Records.