Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Azure Automation Hybrid for automatic management

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

How to use Azure Automation Hybrid for automatic management? In view of this problem, today the editor summarizes this article about Azure Automation Hybrid, hoping to help more friends who want to solve this problem to find a more simple and feasible way.

Test script health:

Generally speaking, before we use Hybrid Runbook Worker, we need to test whether the script works properly locally:

Configure Automation account

I believe that friends who often complete some automation tasks through scripts are clear that it is a great security risk to store the user name and other information involved in the execution of the script into the script in clear text. To avoid this problem, we can add the corresponding certificates and variables to azure's automation account to store username and password information.

First, we set up variables to store the password of the local database:

Then set certificates to store the user name information of the local database:

After the above configuration is complete, we can switch to the Runbook tab to create a new runbook:

Click "Edit" when the creation is complete, then copy our script file internally and fine-tune it:

After configuring the script file, we can click "start" to test the running status of the script:

There are two options in the run settings:

Azure: this option means that runbook scripts can only be run within Azure

Hybrid Worker: this option means that runbook scripts can be run in local data centers of other cloud platforms

If we choose to use Hybrid Worker, we need to specify the Hybrid worker group that needs to run the script:

After the configuration is completed, we can see the corresponding running status in the log console:

At the same time, we can also execute the query in the log analytics to view the corresponding status and other information:

AzureDiagnostics | where RunbookName_s = = "GetSQLBackupStatus" | where ResultDescription contains "Backup" | parse ResultDescription with "SQLServerName:" SQLServerName ", Database:" Database ", Last BackupFinish Date (UTC):'" BackupFinishedDateUTC:datetime "'" * | project SQLServerName, Database, BackupFinishedDateUTC, TimeGenerated | where BackupFinishedDateUTC

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report