New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


How can I create a report about the notifications, alarms and downtime of a sensor?

Votes:

0

Your Vote:

Up

Down

I would like to create a report which includes the notifications (like a custom speed trigger) and the downtime of a sensor. I have searched the help, forums and knowledge base, but there doesn't appear to be a template to generate the report. Is there some way to create such a report?

prtg reporting sensor

Created on Aug 16, 2010 7:01:27 AM by  Danny (0) 1



6 Replies

Accepted Answer

Votes:

1

Your Vote:

Up

Down

Add an extra action to every notification

1. Create a batch file

Create a batch file in the notifications/exe subfolder of your PRTG installation call it Logging.bat and paste the following code.

@echo off
echo %date% %time% %~1 >> "c:\temp\%date%.txt"

2. Modify every notification

Next, set every existing notification to also execute a program and select Logging.bat

In the parameter section make sure to have double quotes at the start and end, reading it like:

"[%sitename] %device %name %status %down (%message)"

You can of course use any fixed text and placeholders you like:

"This is the email notification to John %device %status"

3. Finished

By adding this action to every existing notification, the existing notification will do the logging for you and write the output into a daily based file in the c:\temp folder of your PRTG server.

Created on Aug 18, 2010 6:43:47 PM by  PRTGToolsFamily [prtgtoolsfamily.com] (12,745) 3 4

Last change on Aug 23, 2010 8:07:52 AM by  Daniel Zobel [Paessler Support]



Votes:

0

Your Vote:

Up

Down

good morning

I tried running the bat file a notice and not working. However if I run on the server if it works.

What can be wrong?

Thanks

Created on Jun 19, 2012 6:27:49 AM by  Elvira Soto Arjona (150) 1 1



Votes:

0

Your Vote:

Up

Down

I have followed the steps on this but dose not seem to work at all will this work on version PRTG 15 ?

Created on May 13, 2015 7:25:44 AM by  dean_uk (0)



Votes:

0

Your Vote:

Up

Down

What version of PRTG are you using? Did you use "[%sitename] %device %name %status %down (%message)" (including the quotes) as parameter? Otherwise, it won't work.

Created on May 18, 2015 9:33:36 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Sorry to revive old thread... I am trying to get this to work in PRTG 18.2.41.1591 and I get the following error when I try to test the notification:

Error sending "EXE": Access violation at address 000000000040E8F5 in module 'PRTG Server.exe'. Read of address FFFFFFFFFFFFFFFF

Here's the full contents of the .bat file:

@echo off
echo %date% %time% %~1 >> "c:\BranchStatusLog\BranchStatusLog.txt"

Here's the Parameters field of the notification:

"[%sitename] %device %name %status %down (%message)"

Created on Jun 28, 2018 1:23:32 PM by  Curtis (0)

Last change on Jun 29, 2018 10:48:45 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Are you using a specific user account in the notification to execute the batch file? You could also use the following PowerShell script:

param(
    [string]$sitename = "www.paessler.com",
    [string]$device = "My Testdevice",
    [string]$sensor = "SNMP Traffic INET",
    [string]$message = "The traffic for this interface is unusually high for this day of the week",
    [string]$lastValue = "422344 kbit/s",
    [string]$status = "Unusual",
    [string]$downtimesince = ""
)

$logfilePath = "c:\temp\$($sitename).$($device).$($sensor).log"


([string]::Format("[{3}] STATUS: {0} - LAST VALUE: {1} - LAST MESSAGE: {2} - DOWN SINCE: {4}",$status,$lastValue,$message, (Get-Date),$downtimesince)) | Out-File -Append $logfilePath

The parameter field needs to look like this:

'%sitename' '%device' '%sensor' '%lastmessage' '%lastValue' '%status' '%downtimesince'

It'll then log to C:\temp. Please check the following for PowerShell based notifications and sensors: https://kb.paessler.com/en/topic/71356-guide-for-powershell-based-custom-sensors


Kind regards,
Stephan Linke, Tech Support Team

Created on Jun 29, 2018 11:10:39 AM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


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.