How to get Last Timestamp of Azure Analysis Service start - azure

I am trying to get Timestamp of Azure analysis service start. we are pausing and resume the service based on usage patterns so in between we want to know when is the last start service timestamp.
Without depending on Log analytics I am looking how to get this timestamp using Powershell or REST API.
Can you please let me how to get Last Timestamp of Azure analysis Service start ?
Thanks,
Brahma

Related

How to know who have created some resource/service in Azure?

I'd like to know who have created some resource/service in Azure? I know that I can check Activity log of a service and check Event initiated by and I'll know my answer. However, logs are persisted for 90 days only, so if service has been running for a year I don't have access to that information.
In short I'd like to know if, I select a random service in Azure Cloud that is older than 90 days, I'd like to know who created it?

How to skip to a specific time in Azure AppService logs

Using Linux App Service on Azure. How do I view the logs (app/console logs and HTTP request logs) for a particular time in the past?
In other logging apps I can enter a search term, or a time and jump straight to that point to view the logs for that point (and before and after). That's what I'd like to do for Azure.
You need to set WEBSITE_TIME_ZONE variable in Application settings.
Supported timezone values are
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
https://learn.microsoft.com/en-us/azure/app-service/faq-configuration-and-management
You can verify Time by navigating to Console and executing time command enter
If you want to search in logs you may download them in txt file into local machine or send the logs to Azure Log Analytics and query them using query language filters
| where TimeGenerated xxx

Azure - Change TimeZone for WebJob Details log

Having WebJobs on Azure App Service, trying to sort out the timezone of Continous WebJobs Details.
Can anyone guide to change TimeZone in Azure WebJobs output logs. Have tried to add a value on the Application Setting for “WEBSITE_TIME_ZONE” but didnt help us to change the WebJobs logs.
Currently we can not modify the time which used to output the Azure WebJobs logs. It is always in UTC time.
If we use the WEBSITE_TIME_ZONE setting to change the time zone, it will work in your code, but not for the output log itself.
For example, I have a webjob which will print current time. And I add an application setting as below
China Standard Time=UTC+8. So the output should be like this
Reference:
Set the time zone

monitor heartbeat on azure vm

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?
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

Cleaning of logs in Azure Web Job

I am using the default logging mechanism that Azure web job provides. Type of logger is 'TextWriter'. I have 3 functions in the same web job with extensive logging. A number of logs being generated every minute. As with the default settings of azure web job, all the logs go to the storage account into blobs. I do not want my storage account to just keep on growing with months and months of old logs.
I need a way of cleaning the logs on a periodic basis. Or is there any setting/configuration that can be done so that my logs get cleaned on a periodic basis? Or should I write code to monitor the blob container 'azure-webjobs-hosts' and then the files inside 'output-logs'. Is that the only place where the logs for my application are stored by default by the web job?
I tried searching the web but couldn't find any related posts. Any pointers would be of great help.
Based on my experience, we can achieve this purpose by define the azure storage container name. We can define weekly/monthly/daily as container name. Then use a time trigger function to delete the container. For example, if we need delete weekly data, then we set container for this weekly data, then delete it in the next week via time trigger.

Resources