Synthetic Monitor: How to handle maintenance window, so that uptime will not be impacted

Hi,

I have created a synthetic monitor to monitor the uptime of our Telus Webstore Application.
Now the problem is every week we will be having some or the other maintenance window. Is there a way where in I can enable some maintenance mode in my monitor so that my Application uptime numbers will not be impacted ?

Hi @Alwin_Anthony.Tiwari - I have posted a sample synthetic script to handle maintenance windows or maintenance urls.

Thanks Stefan, so does that mean I need to switch from my SimpleBrowser/Ping Monitor to ScriptedBrowser monitor?

Hi @Alwin_Anthony.Tiwari While Synthetics Maintenance Windows functionality is on the roadmap, in the meantime you can enable/disable Synthetics monitors via the Synthetics REST API as part of your maintenance window workflow. Let me know if this works for you!

Thanks BTRIBBIA, so in that case do we need to have Agent configured?
As I see ID and Admin_User_Key is got only if we have Agent Configured.
Please correct me if I am wrong.

Currently we do not have Agent configured for our application in TELUS.
As of now we have only this subscriptions:
Web Enterprise Annual
Mobile Enterprise Annual
Insights Free
Browser Pro Annual
Synthetics Pro Annual
Infrastructure None

Hi @Alwin_Anthony.Tiwari All you will need to use the Synthetics REST API (available with the Pro Annual subscription) is your Admin User Key available at Account Settings > Integrations > API Keys under the Admin user’s API keys heading, on the account containing your Synthetics monitors. This key is unique for each user and can only be used on the account ID it’s generated for. If you have multiple accounts with Synthetics monitors you look to toggle during a maintenance window, a unique key will need to be generated for each account.

Hi BTRIBBIA, I do not see Admin user’s API keys heading.
I think its because Agent is not configured or I do not have enough privileges.

@Alwin_Anthony.Tiwari Thanks for providing the screenshot! When clicking the name of your account in the upper right of the screen (just to the right of Tools), there should be a dropdown menu with Account Settings.

Once in the Account Settings page, on the left sidebar, there should an API Keys menu item listed under Integrations.

After clicking API Keys, you will want to generate an Admin User API key. Additional details on this process can be found here:

https://docs.newrelic.com/docs/apis/rest-api-v2/requirements/api-keys#admin-api

You would then use this generated key in your REST API calls:

curl -v -H 'X-Api-Key:{Admin_User_Key}' https://synthetics.newrelic.com/synthetics/api/v3/monitors

Let me know if this works!

Hi BTRIBBIA Thanks,
Looks like I do not have sufficient privileges, I do not see those options which you mentioned.

This is the message I see
“You do not have sufficient permissions to view this page.”

@Alwin_Anthony.Tiwari Your user account will need to have at least the Admin role in order to view or generate the requisite API key:

https://docs.newrelic.com/docs/accounts-partnerships/accounts/account-billing-usage/users-roles#other-rights

It sounds like you are currently working on an alternative solution provided by @stefan_garnham, here. If you do move forward with the Synthetics REST API, and have any questions on constructing API requests, just let me know.