Hi, how can I see, if and when the users have last logged on to PRTG?


Article Comments

Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.

Hello,

this is not possible out of the box at the moment, sorry.

One way would be to analyze the PRTG web server log files.


Aug, 2013 - Permalink

Good Tip, thank you!

[CmdletBinding()]
Param()

Clear-Host

$PRTGWebLogFolder = '\\server\share\PRTG-datafolder\Logs (Web Server)\prtg*.log'

$PRTGWeblogDataStructure = 'Date','Time','IP','User','Server','Port','Methode','URL','Data','HTTPResponseCode','BrowserID'

$PRTGLogonData = Get-ChildItem -Path $PRTGWebLogFolder |
	ForEach-Object {
		Write-Verbose -Message $_.FullName;
		Import-Csv -LiteralPath $_.FullName -Delimiter ' ' -Encoding ASCII -Header $PRTGWeblogDataStructure |
		Where-Object { (@('/api/getstatus.htm','/api/public/testlogin.htm','/public/checklogin.htm') -contains $_.URL) -and ($_.User -match '-') } |
		Select-Object -Property Date,Time,User
	}

$PRTGLogonData |
	Group-Object -Property User |
	Sort-Object -Property Count -Descending

Aug, 2013 - Permalink