Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I receive SMS alerts using HTTP request template?

SMS alerts rely by default on gateways with an email to SMS support. This means that the gateway should be able to send an SMS when an email is sent to <phone-number>@smsgatewayprovider.com.

 

In case there isn't a supported carrier in your country, you can instead use the HTTP Request templates with the gateways that support API calls. Here is a small example using the Nexmo SMS gateway.

 

  1. Go to nexmo.com and sign up for a new account.

  2. Go to the AppDynamics Controller and navigate to Alert & Respond.

  3.  Choose HTTP Request Templates in the left menu.

  4. Click New to add new template.

  5. Add a custom variable for the recipient number. You can choose a default value.

    Screen Shot 2016-02-09 at 00.44.21.png

  6. Configure request URL to use POST and the endpoint https://rest.nexmo.com/sms/json

    Screen Shot 2016-02-09 at 00.45.27.png

  7. Set payload MIME type to application/json and the payload to

    {
    "api_key":"<INSERT_NEXMO_API_KEY>",
    "api_secret":"<INSERT_NEXMO_API_SECRET>",
    "to":"${mobile}",
    "from":"AppDynamics",
    "text":"${latestEvent.displayName}: ${latestEvent.eventMessage}"
    }


    Screen Shot 2016-02-09 at 00.47.39.png

  8. Click Save.

  9. You can then click Test and Add event type to send a test SMS and see that Nexmo is not reporting any errors.
  10. Create new action by navigating to Alerts & Respond > Actions > New and choose Make an HTTP request.

    Screen Shot 2016-02-09 at 01.00.42.png

  11. Create new policy by navigating to Alerts & Respond > Policy > Create Policy and choose the events that you like to trigger an action on.

  12. Click Actions and choose the newly created request Action.
Version history
Revision #:
4 of 4
Last update:
‎12-21-2018 03:26 PM
Updated by:
 
Tags (2)


Found this article helpful? Click the Thumbs Up button.
Have an additional comment? Post it below.
0 Kudos
Comments

We've done the same thing with the STIX service here in Norway. See example:

 

stix1.PNG

 

stix2.PNG

You can have more recipients, just add numers like this: ["number1","number2","number3"]

 

 

Hi,

 

I have tried the same steps as mentioned above, however not receiving any sms alerts. 

As suggested i have signed up on  nexmo.com also used the key and secret on the payload like this: {"api_key":"40b3a6e1","api_secret":"yQZJqPKU9IuecaFJ","to":"${mobile}","from":"AppDynamics","text":"${latestEvent.displayName}: ${latestEvent.eventMessage}"}

 

Also tried with :

{"api_key":"40b3a6e1","api_secret":"yQZJqPKU9IuecaFJ","message":"check your mail","recipients":["9916204132"]}

Post creating the http template i have received no errors., it shows success post running the test.

Can anyone please let me know if any additional settings to be done.

 

Regards,

Rahul

AppDynamics has introduced a bug that stops this from working... ETA on bugfix is version 4.5 according to support.

Hi,



Does this bug also causes issues with custom carrier options under email/sms configuration, because I am not able to send sms using that as well. Can you please help with some options that I can use?



Regards,

Rahul