What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

When do users last logon to PRTG?

Votes:

0

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

logon report user

Created on Aug 23, 2013 8:04:11 AM



Best Answer

Accepted Answer

Votes:

0

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

Created on Aug 23, 2013 5:41:13 PM

Last change on Aug 26, 2013 9:47:31 AM by  Aurelio Lombardi [Paessler Support]



2 Replies

Votes:

0

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.

Created on Aug 23, 2013 9:56:16 AM by  Aurelio Lombardi [Paessler Support]



Accepted Answer

Votes:

0

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

Created on Aug 23, 2013 5:41:13 PM

Last change on Aug 26, 2013 9:47:31 AM by  Aurelio Lombardi [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.