Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Need to fetch synthetics maintenance window details

maintenance
synthetics

#1

I have setup many synthetic alerts for different applications. Now, I need to show the scheduled maintenance window on each of these applications in my Operations dashboard.
Need some help with how can I fetch these details.


#2

Hi @vipsood How are you setting the maintenance window? We just ignore failures on the alerts at certain times of the day, but I know others turn monitors on and off with api calls. If so, could you use a custom event to indicate the start/stop down times.

I’d be interested to know if there’s any NRQL that would show if a monitor was set as ON or OFF so we could see the current planned state of the synthetic monitors in an insight dashboard . I can get a ‘last executed’ view using timestamp but be good to see the ‘expected state’. Guessing we’ll need and API query. Will have a go later.


#3

Thanks for reply Bevan.
I have created synthetic monitors using api calls. But for putting a monitor to maintenance, operations team use UI to set maintenance on their applications.
Now I want to catch all these maintenance schedules and show them in a dashboard. I have no idea about NRQL.

I truly appreciate any help on this.
Thanks.


#4

You could simply count the monitor executions,

SELECT count(timestamp) from SyntheticCheck WHERE monitorName = 'Monitor A' since yesterday timeseries 15 minutes

The idea being you should see the timings of the maintenance window (as they would be 0).

The other thing that i think might work is use a similar query to create alerts that feed an insights webhook - so each non-execution would create a custom event.


#5

Thanks for jumping in, @bevan!

Let us know if those suggestions get you what you need, @vipsood! :blush:


#6

Thanks @bevan and @Linds. I have opened a request for NR team and ended up filing a feature request for this.


#7

Hi @vipsood - You may want to add your vote to this feature request.


#8

Hello ,

I came across this post while searching for a solution for a similar concern. We have few monitors developed in Synthetics Scripted browser and applied a weekly maintenance window. However its observed that the schedule/timings set up in the maintenance window is getting changed somehow and we are not able to track that.

The solution suggested here to capture the executions is not helpful as its the maintenance window schedule which is getting changed. So is there way to capture changes in maintenance window itself?

Thanks in advance for any inputs !


#9

Hi @swapnil.m.s ,

You say the maintenance window schedules are changing - assuming then someone is doing this by editing the specific window? The lack of auditing in NR is a bit of a pain, but until a restapi for maintenance windows is made available, I’m not sure what you can do except restrict admin access to the synthetics product.

One thing I have noticed with maintenance windows is that it is still possible for a script to execute during the scheduled outage. This is likely to be due to either long running scripts or queuing at the monitoring location. Either way, I’ve found extending the window by a minute, 2:59 instead of 3:00 for example, seems to do the trick.


#10

Hi Bevan, thats what we are not sure if this is being done manually or any bug in the functionality. Really looking forward to get some mechanism to track this.

The other point you mentioned is surely helpful though. will consider this while setting up maintenance window. Thanks for that !