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

Custom Email Notifications / Integration with Kayako

Votes:

0

I'm looking to have PRTG log a ticket on a Kayako system when a sensor goes down. There are multiple sites being tracked by PRTG and I'm aiming to get it to log a ticket as the appropriate site. (I have access to both ends of this system so will investigating options from both directions)

We've other systems doing this where we've been able to spoof the from address or specify a reply-to address so the email will log as specific user account, but I can't see this as an option for PRTG.

Is this possible or am I barking up the wrong tree?

kayako notifications prtg

Created on Apr 12, 2016 12:42:53 PM



9 Replies

Accepted Answer

Votes:

0

Maybe this script would be a viable option? You'll have to add the reply address to the mail object of course :)

Created on Apr 12, 2016 6:50:38 PM by  Stephan Linke [Paessler Support]



Votes:

0

That looks promising, thank you!

Looks as though I'll be able to use the comment field to assign an email address to each group or sensor and pass that along.

Created on Apr 13, 2016 8:40:31 AM



Votes:

0

Note that the comments field has Comments: prefixed to it, you'll have to strip that first :)

 $email.To.Add($mailTo.replace("Comments :",""))

Created on Apr 13, 2016 8:51:30 AM by  Stephan Linke [Paessler Support]

Last change on Apr 13, 2016 8:52:58 AM by  Stephan Linke [Paessler Support]



Votes:

0

It's actually the from or reply-to address I want to set using the comment, but your example got me 99% of the way there - thank you!

With the linked script, the body was always "0" - changing the following line seems to have fixed it

$email.Body = [string]::Format("{0}",$body);

(added quotes around {0})

I'm still just testing from PowerShell but it's looking very promising

Created on Apr 13, 2016 9:26:27 AM



Votes:

0

Hi Greg,

Thanks for the headsup, I fixed the code in the other thread :) Glad to hear that we got you covered here. Let me know if you run into any PowerShell trouble :)

Created on Apr 13, 2016 10:30:16 AM by  Stephan Linke [Paessler Support]



Votes:

0

Ok, script is working when triggered as a test, but not from a real sensor

Will work from a real sensor if I strip out all placeholders and manually type the parameters

Any suggestions? Are their certain placeholders I should/shouldn't use?

I'm eventually hoping to be able to use something similar to the following: '%device - PRTG Alert' '%name has been flagged by PRTG' %commentsdevice

(There are less parameters as I manually specified the SMTP server and destination in the script - now just "Subject, Body, From")

Created on Apr 13, 2016 2:42:27 PM



Votes:

0

Can you put %commentsdevice in single quotes as the rest of the params? Just to make sure, because there are whitespaces in this placeholder.

Created on Apr 13, 2016 4:00:58 PM by  Stephan Linke [Paessler Support]



Votes:

0

I was testing with %device for all fields and would have sworn I tried single quotes - guess I didn't.

That works fine for '%device' and '%name' (with and without accompanying text) '%commentsdevice' works in the body, but has line breaks and slightly different text to what we were replacing

{{{Device Comments

[email protected]}}}

I've updated the .replace part of script and run it through .Trim() to remove the line breaks (I'm sure there's a much better way of doing that) $from = $from.replace("Device Comments","") $from = $from.Trim() ...and it seems to be working

Thank you very much for your help and patience.

Created on Apr 13, 2016 4:40:39 PM



Votes:

0

Nice that it works in the end :) You should be able to do it in one line iirc:

$from = $from.replace("Device Comments","").Trim();

Created on Apr 13, 2016 5:00:48 PM by  Stephan Linke [Paessler Support]

Last change on Apr 13, 2016 5:01:18 PM by  Stephan Linke [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.