0

We shut down our azure vm's every day at 11pm and start them at 7am, except for weekends. Is there a way we can check the heartbeat on weekdays only between 7.30am and 10.30pm to see if the server is alive and working?

If so, how can I send a mail for the servers that miss the heartbeat during that time?

1 Answers1

0

There doesn't seem to be any support from any Azure service for creating monitoring or alerts that fire only between certain hours.

It seems Azure monitoring, Log Analytics or specific service alerts (like specific a VM) all assume the alerts should be active at all times.

Some possible solutions that might work that I came up with:

  • If you need to use Azure services, you could create an Azure Automation PowerShell runbook
    • Set it to trigger regularly (every hour?) and in code handle the time interval you are interested in
    • Also, in code do the testing if the service is up
    • In my opinion, feels a bit hackish..
  • Use some external tool for monitoring your services, like e.g. Nagios
    • See e.g. this link for how it could work
kim
  • 3,385
  • 2
  • 15
  • 21