Hello,
we have a HWG-SMS-GW3 SMS Gateway and can send out notifications by using curl. Using the same URL in PRTG no message is send.
We used the following command line and it worked fine: curl "http://<user>:<Password>Sg@10.10.130.22/values.xml?Cmd=SMS&Nmr=<number starting 00>&Text=This%20is%20a%20test."
Using the URL in PRTG no sms is send and no access to the SMS gateway is recognized. Is there any log that can show, if and what error occured?
Thanks in advance.
Regards Pascal Schmitz
Article Comments
Hello Torsten,
please find below the link for the screenshot:
Second, a screenshot of the error message:
best regards Pascal Schmitz
Aug, 2018 - Permalink
Hello Pascal,
please try removing the " at the beginning and end of the URL in PRTG. Does this work or at least bring a different error?
best regards.
Aug, 2018 - Permalink
Hello Torsten,
yes, it is a different error. When removing the " at beginning and end of the URL, I can see the following entries in the log file in folder: "\Logs\debug\Notification Delivery Debug Log (SMS)"
Stat Connected. Sent 31.08.2018 11:34:39: GET /values.xml?Cmd=SMS&Nmr=***&Text=Testnachricht%2520von%2520PRTG HTTP/1.1<EOL> Content-Type: text/plain; charset=ISO-8859-1<EOL> Host: ***<EOL> Accept: text/html, */*<EOL> Accept-Encoding: identity<EOL> User-Agent: Mozilla/3.0 (compatible; Indy Library)<EOL> <EOL> Recv 31.08.2018 11:34:39: HTTP/1.1 401 Unauthorized<EOL> Server: Ethernut 4.9.10.0<EOL> WWW-Authenticate: Basic realm="."<EOL> Content-Type: text/html<EOL> Connection: close<EOL> <EOL> <HTML><HEAD><TITLE>401 Unauthorized</TITLE></HEAD><BODY>401 Unauthorized</BODY></HTML><EOL> Stat Disconnected. Fehler beim Versenden von "SMS": Nummer=***, Nachricht=Nachricht nicht verschickt. (<HTML><HEAD><TITLE>401 Unauthorized</TITLE></HEAD><BODY>401 Unauthorized</BODY></HTML> )
Regards
Pascal Schmitz
Aug, 2018 - Permalink
Pascal, thank you for the reply. I've removed the phone number and also host from your reply (just an FYI). Obviously there is an authentication issue happening here. Is a proxy involved in any way here? Is a proxy set for PRTG (to get into the internet normally to display GeoMaps / get the AutoUpdate)?
Sep, 2018 - Permalink
Hello Torsten,
thank you for removing phone and host name. For external access and GeoMaps / AutoUpdate is no Proxy necessary. Also we did not set up any proxy settings (Systemverwaltung --> Server & Probes --> Proxy Einstellungen) in PRTG.
Regards Pascal Schmitz
Sep, 2018 - Permalink
Hi Pascal, I'm very much afraid PRTG may simply not support the URL format with
http://user:pass@IP_adresa/values.xml?Cmd=SMS&Nmr=%SMSNUMBER&Text=%SMSTEXT
You can see this in the delivery log, it's trying to connect to the host normally, like a normal un-authenticated HTTP GET Request and then runs the URL without authentication (GET /values.xml?Cmd=SMS&Nmr=*&Text=Testnachricht%2520von%2520PRTG ).
Can you switch the gateway to the unsecure mode, so that it will accept HTTP GET requests without credentials? The screenshot in the vendor documentation interestingly also only uses this method (https://www.hw-group.com/support/how-to-send-sms-via-hwg-sms-gw3#prtg).
Sep, 2018 - Permalink
Hello Torsten,
thank you for the reply. Using the unsecure mode solved the problem. SMS are now send without problems.
Are there any plans from Paessler to handle a secure login?
Regards Pascal Schmitz
Sep, 2018 - Permalink
I'm very much afraid as far as I can see, there are no plans to support this particular format of HTTP requests. PRTG does support the more common HTTP authentication via URL parameters.
Sep, 2018 - Permalink
Hello Pascal,
thank you for the KB-Post. Can you please share a screenshot showing how you've set it up in PRTG?
When testing a SMS notification with this, as a first step please go to "Logs">"System Events">"Notifications" then, it should list error messages or successes also for the test SMS.
A 2nd step could then be the notification delivery debug log: How can I enable Notification Delivery Logging?
best regards.
Aug, 2018 - Permalink