New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.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 add a second recipient phone number in prtg notification?

Votes:

0

Your Vote:

Up

Down

Deer PRTG KB,

I have tried your link how SENDING OUT PRTG SMS NOTIFICATIONS USING A GSM MODEM AND THE MWCONN FREEWARE TOOL as below link.

https://www.paessler.com/blog/sending-out-prtg-sms-gsm-modem-mwconn

Could you please let me know as I have now a question as mentioned subject?

Many thanks, Huan

sms sms-format sms-notification

Created on Sep 17, 2016 4:59:09 AM by  newcomer01 (0) 1



14 Replies

Votes:

0

Your Vote:

Up

Down

What I mean that at step 8 "ADD PRTG NOTIFICATION" from above link, how can I add a 2nd phone number in the "Parameter" field. For example, enter: 1555123456 "[%sitename] %device %name %status %down (%message)"

I already try by - or ; or , between 2 phone numbers but does not work at all.

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

Anyone can help me pls?

Created on Sep 20, 2016 5:16:38 AM by  newcomer01 (0) 1

Last change on Sep 20, 2016 6:03:14 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

You don't need to add a 2nd phone number to the notification parameter field. The phone number has to be added in the user account, in the notification contacts tab ("Add SMS contact") :)

Created on Sep 20, 2016 10:46:14 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Many thanks Stephan. But my purpose that I can send a SMS notification to both of phone number at the same time once my state trigger occurred. Is this possible?

Created on Sep 20, 2016 11:43:11 AM by  newcomer01 (0) 1



Votes:

0

Your Vote:

Up

Down

That will happen automatically if you send it to the user that has the two phone numbers configured. You can also configure multiple numbers in the notification setup itself, in the send to number field (comma seperated, starting with + and the corresponding country code).

Created on Sep 20, 2016 11:48:06 AM by  Stephan Linke [Paessler Support]

Last change on Sep 20, 2016 11:53:33 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Yes, I just added the second SMS contact to the user A, but I do not see the option "send to User A" by SMS notification -Execute program (with MWconn.bat) as other send SMS options.

Created on Sep 20, 2016 12:14:50 PM by  newcomer01 (0) 1



Votes:

0

Your Vote:

Up

Down

Ah, my bad - I didn't see that, even though you wrote it in caps ;) It seems like mwconn can't handle multiple numbers. Are't push notifications a viable option here?

Created on Sep 20, 2016 12:37:19 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

That seems does not make sence :-( since I am trying with execute program by SMS notification that have no "send to number" field nor "send to the user" as well.

Created on Sep 20, 2016 12:40:26 PM by  newcomer01 (0) 1



Votes:

0

Your Vote:

Up

Down

Yeah, since it's a custom exe notification which doesn't rely on users or groups as it's always simply executed. When you execute it using PowerShell, you could do something like this:

param(
    [string[]]$numbers, 
    [string]$sitename,
    [string]$device,
    [string]$name,
    [string]$status,
    [string]$message
)

$Date = (Get-Date -Format "ddMMyyyy-HHmmss")
$sms_content = ([string]::Format("[{0}] {1} {2} {3} {4}", 
                $sitename, $device, $name, $status, $message

Foreach($number in $numbers)
{ $sms_content | Out-File -Path "c:\mwconn\sms_send\$($Date)_$($number)"; }

Call this with the following parameters instead of the default batch file (save it as mwconn.ps1): -Numbers @(1555123456,12212212,1212121) -SiteName '%sitename' -Device '%device' -Name '%name' -Status '%status' -Message '%message)'

It will create text files for every given number in the $numbers parameter and mwconn will read the single text files.

Note Remember to execute Set-ExecutionPolicy RemoteSigned in an administrative PowerShell on the PRTG Core Server. Otherwise, the script will not work properly. Also make sure to have the latest PowerShell, at least v4.0, installed.

Created on Sep 21, 2016 10:01:31 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Dear Stephan,

Many thanks for your instruction but I do not know why the script does not work at my side.

It did not generated any sms file in sms_send folder.

But I have success to clone primary sms file to second one by a Windows script once the PRTG sms notification trigger occurred.

I wish you good health and all the best.

Created on Sep 23, 2016 8:35:15 AM by  newcomer01 (0) 1



Votes:

0

Your Vote:

Up

Down

Oh well, so it works now? Same to you :)

Created on Sep 23, 2016 8:49:18 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

yes, now I and my colleague could receive a PRTG SMS notification at the same time. Cheer :-)

Created on Sep 23, 2016 9:56:55 AM by  newcomer01 (0) 1



Votes:

0

Your Vote:

Up

Down

Nice work! :) Have a nice weekend!

Created on Sep 23, 2016 10:10:14 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi,

thanks Stephan for sharing your powershell script with us, it helped me a lot. But I had to change it a bit to get it to work, so I thought it would be a good idea to share it with all the prtg users who are in the same position as me.

I had to change the parameters as well as the .txt encoding because powershell did not save the output in a text file readable by mwconn. Therefore I had to change the encoding to "default" or "ascii". My system is a Windows Server 2012 R2 machine.

Here's the code:

param(
    [string[]]$numbers, 
    [string]$sms_content
)

$date = (Get-Date -Format "ddMMyyyy-HHmmss")
$path = "c:\mwconn\sms_send"

Foreach($number in $numbers){
    $sms_content | Out-File -Encoding default -FilePath "$path\sms_PRTG-$($date)__$($number).txt"
    start-sleep -s 5
}

With now only 1 parameter for the sms content, the prtg values can be written into one single parameter. You can now call the powershell with this, for examlple:

-numbers @("49123456789","49987654321","4911111111") -sms_content '%device: Sensor %shortname is %status since %statesince !!!'

Please note that the numbers are in double quotes whereas the sms content is in single quotes - otherwise the parameter would be cut off after the first space.

I hope this helps!

Created on Nov 22, 2017 10:11:04 AM by  mq (0) 1



Votes:

0

Your Vote:

Up

Down

Thanks for sharing! :)


Kind regards,
Stephan Linke, Tech Support Team

Created on Nov 22, 2017 11:09:27 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.