- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 Azure 自动化帐户将我的生产数据库复制到暂存。我还使用这个复制的数据库执行了很多自定义操作,并且使用 Azure 存储帐户执行了一些迁移操作。 总而言之,我的“主”Runbook 调用另一个 Runbook,并且所有工作流程都非常大,因此我想记录每个步骤。
有什么方法可以使用 Application Insights 来实现此目的吗?如果您知道任何其他可能的解决方案,请告诉我!我正在寻找最简单、最智能的解决方案。
我找到了这个模块https://learn.microsoft.com/en-us/powershell/module/azurerm.applicationinsights/?view=azurermps-6.13.0但似乎没有 cmdlet 可以实际“记录”某些内容。
我希望能够做这样的事情:
New-AzureRmApplicationInsightsLog -Name "myAppInsights" -LogText "Step 1. Start copying db"
最佳答案
假设您可以获得Microsoft.ApplicationInsights.dll
。如果您不知道如何获取,请告诉我。
然后按照以下步骤操作:
将Microsoft.ApplicationInsights.dll
放入zip文件中(您可以右键单击.dll
文件→发送到→压缩(zipped)文件夹) ,然后您将获得一个名为 Microsoft.ApplicationInsights.zip
导航到 Azure 门户 → 您的自动化帐户 → 模块 → 添加模块:上传第 1 步中的 zip 文件。
注意:这可能需要几分钟,当您看到 Microsoft.ApplicationInsights 的状态可用时,就ok了。
导入模块后,Microsoft.ApplicationInsights.dll
位于 azure 中的以下位置:"C:\Modules\User\Microsoft.ApplicationInsights\Microsoft。 ApplicationInsights.dll”
在 Runbook 中编写代码以将遥测数据发送到应用程序洞察:
Add-Type -Path "C:\Modules\User\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.dll"
$InstrumentationKey = "xxxx"
$TelClient = New-Object "Microsoft.ApplicationInsights.TelemetryClient"
$TelClient.InstrumentationKey = $InstrumentationKey
$TelClient.TrackEvent("PowerShell rocks!")
$TelClient.Flush()
write-output "ok it is finished."
检查您是否可以在应用程序洞察中看到数据:
关于azure - 如何从 Automation 帐户登录到 Azure 中的 Application Insights?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57588792/
我正在尝试创建一个工作流程,使用 Instapaper 将 URL 列表转换为纯文本,然后将文本保存在我机器上的文本文档中。 到目前为止,我已经能够获取 URL 列表、转换它们并保存文本文档。问题是我
有没有办法自动执行这些步骤? 打开 LibreOffice ODT 更新 TOC 和其他字段(例如通过菜单工具|更新|全部更新) 保存并关闭文档 最佳答案 如果您使用的是 Windows,那么使用 A
在 Microsoft Power Automate 中,使用表达式 utcNow() 可以获得当前日期(和时间)。我正在尝试获取昨天的日期。我尝试了 dateadd(utcNow(), -1) 和类
我使用 Power Automate Desktop 创建了一个桌面流程。但我无法安排或让它自动运行。有什么办法吗? 我不希望使用云流和使用网关连接桌面流。我需要在我的台式机本身内自动运行桌面流程。有
列表开始为空。然后,如果满足特定条件,我想为循环中的每次迭代附加一个值。我在变量操作中没有看到附加选项。 最佳答案 您可以使用字符串分割来实现此目的,假设您知道一个永远不会出现在值列表中的分隔符。我使
我使用 Power Automate Desktop 创建了一个桌面流程。但我无法安排或让它自动运行。有什么办法吗? 我不希望使用云流和使用网关连接桌面流。我需要在我的台式机本身内自动运行桌面流程。有
我使用的是 Mac OS X 11.0.1 Big Sur 我使用 Automator 创建了一个“看我做”的 QuickAction。我已经保存了它(似乎默认保存在 ~/Library/Servic
我的问题的历史: 我正在研究 UI automator (2.1.3) 和 Espresso 测试 + 在简单的 Mac Air (2014) 上使用 android studio (3.0.1)。之
有人要求我将 Sharepoint 上的 Excel 在线电子表格中的数据提取到 Power BI 中以创建仪表板 - 没问题,对吧?好吧,“数据点”之一实际上是指示状态的单元格的填充颜色。我进行了一
在 Power Automate 中,我正在调用一个返回此 JSON 的 API: { "status":"200", "Suburbs":[ { "
更新到 Mojave 后,我无法再使用之前使用的 automator 服务,并出现以下警报。 在“安全与隐私”中,我已经选中了 AppleScript Editor。 您发现我的代码有任何问题吗?或者
我在 Windows 7 下使用 Powershell 4,并且我的 cmdlet 定义如下: Function Transfer-File { [CmdletBinding()]
我在 commands.js 中使用这个方法 Cypress.Commands.add( 'iframeLoaded', { prevSubject: 'element' }, ($iframe) =
我正在使用 UI Automation 插件来自动化和测试在 Java 窗口中包含 HTML 对象的应用程序。我已将 UIATable 识别并保存在我的对象存储库中,并且以下方法工作正常: MsgBo
在我的项目中,有一个叫做创建任务的东西。创建任务并关闭页面后,系统会提示我一个警报“您即将关闭此应用程序并保存所有更改......” 然后是 OK 和 Cancel。 使用 F12,我无法检测到警报和
我使用 Cmder 作为我的命令提示符/控制台。 我发现自己每天多次使用相同的命令。例如 git merge --no-ff my-long-branch-name 有什么方法可以将这些命令存储在快捷
我是 Applescript 的新手,目前无法访问提示窗口,要求输入密码。 我正在为我的日常使用应用程序创建一个启动器,我想自动化启动过程。 现在,我只启动了两个应用程序,VirtualHostX 和
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 想改进这个问题?将问题更新为 on-topic对于堆栈溢出。 5年前关闭。 Improve this qu
如何为具有常规安装程序的程序创建自动安装程序,其中包含以下问题: 安装目录, 接受许可, 在桌面上创建图标 等等... 假设我可以为每个我想单独安装的程序构建一个自动安装程序,或者我想将文件放在一个自
如何在预定时间运行我的苹果脚本。我希望它每 45 分钟运行一次,但我不知道该怎么做。我将我的苹果脚本保存为应用程序。我接下来该怎么做? 谢谢 (目前,我正在使用 on idle 函数,但有更好的方法吗
我是一名优秀的程序员,十分优秀!