系统极客一直在努力
专注操作系统及软件使用技能

什么是Azure Operational Insights?如何使用?

Azure Operational Insights

Azure Operational Insights(OpInsights)是 Microsoft Operations Management Suite 的一个子产品,是为 IT 运营团队量身打造的 SaaS 解决方案。Azure Operational Insights 服务可以使用 Azure 的强大功能从几乎任何 Windows Server 和 Linux 、任何数据中心或云中收集、存储和分析日志数据,并将其转换为运营智慧,以帮助你做出更明智的决策。

简单点来说,就是使用 Azure Operational Insights 可以帮助管理员实现如下功能:

  • 日志管理:收集、合并、关联和可视化所有的机器数据
  • 容量规划:管理数据中心容量
  • 更新评估:确保服务器最新更新
  • 变更跟踪:跟踪服务器的配置变化

刚认识 Azure Operational Insights 时我以为其跟国内著名和「监控宝」及国外著名的「New Relic」等服务类似,后来越来越觉得该功能其实是 SCCM 和 SCOM 衍生出来的一项 SaaS 服务,有比较重的微软特色和风格。

虽然 OpInsights 可以分类监控及管理服务器及客户端的系统和安全状态等相关配置信息,但在我个人看来 OpInsights 更着重于使用数据分析工具来分析系统数据并实现可视化,目前尚不是一套成熟的监控解决方案。

Azure Operational Insights代理安装

Windows Server代理安装

在下面的内容中,我们将介绍如何在一台 Windows Server 上部署 OpInsights Agent:

1 在我写本文时,「Operational Insights 工作区」还没在 Azure 的新 Portal 上增加管理功能,因此大家可以到老版管理门户去创建「Operational Insights 工作区」。创建好之后,大家可以点击「访问你的 Operational Insights 帐户」进入到管理门户。

Azure Operational Insights

2 对于 Azure VM 可以直接在 Protal 上进行部署,不必管理员手动到服务器上进行安装。如果是本地服务器,管理员可以到「Overview」—「Settings」—「Connected Sources」中下载相应的 Agent 进行安装。

Azure Operational Insights

3 下载好适应系统版本的 OpInsights Agent 之后就是按向导安装,这个没什么好介绍的,但要注意在安装时需要选中「Connect the agent to Microsoft Azure Operational Insights」选项连接到 OpInsights SaaS 服务。

Azure Operational Insights

4 在安装向导中输入「工作区」中生成的「Workspace ID」「Primary Key」才能正常连接。

Azure Operational Insights

Linux代理安装

目前 Azure Operational Insights(OpInsights)也支持 Linux 系统的信息收集,大家可以选择相应的「OMS Agent for Linux」进行安装。

如下为微软写好的 Linux Agent 快速安装脚本:

# 64位Linux
wget https://github.com/Microsoft/OMS-Agent-for-Linux/releases/download/1.0.0-47/omsagent-1.0.0-47.universal.x64.sh
sha256sum omsagent-1.0.0-47.universal.x64.sh
sudo sh ./omsagent-1.0.0-47.universal.x64.sh --upgrade -w WORKSPACE ID -s PRIMARY KEY
# 32位Linux
wget https://github.com/Microsoft/OMS-Agent-for-Linux/releases/download/1.0.0-47/omsagent-1.0.0-47.universal.x86.sh
sha256sum./omsagent-1.0.0-47.universal.x64.sh
sudo sh ./omsagent-1.0.0-47.universal.x64.sh --upgrade -w WORKSPACE ID -s PRIMARY KEY

支持的 Linux 系统版本分别为:

  • Amazon Linux 2012.09 –> 2015.09 (x86/x64)
  • CentOS Linux 5-7 (x86/x64)
  • Oracle Linux 5-7 (x86/x64)
  • Red Hat Enterprise Linux Server 5-7 (x86/x64)
  • Debian GNU/Linux 6-8 (x86/x64)
  • Ubuntu 12.04 LTS、14.04 LTS、15.04、15.10 (x86/x64)
  • SUSE Linux Enteprise Server 11-12 (x86/x64)

PowerShell代理安装

如果你管理的 Windows Server 服务器过多,不希望一台一台服务器服务器手动安装 OpInsights Agent,可以使用如下 PowerShell 脚本来自动部署:

$servers = Get-Content C:\_install\Deploy_MMAgent\servers.txt
foreach($server in $servers) {
    Write-Host "Server =" $server
        Invoke-Command -ComputerName $server -ScriptBlock {
        Invoke-WebRequest "http://go.microsoft.com/fwlink/?LinkID=517476" -OutFile "c:\windows\temp\MMASetup-AMD64.exe"
    Start-process c:\windows\temp\MMASetup-AMD64.exe -Argumentlist '/C:"setup.exe /qn ADD_OPINSIGHTS_WORKSPACE=1 OPINSIGHTS_WORKSPACE_ID= OPINSIGHTS_WORKSPACE_KEY= AcceptEndUserLicenseAgreement=1"' -Wait
    }
}

OpInsights Agent 代理安装完成之后,大家便可以到「Overview」—「Usage」中查看到数据了,还可以到「My Dashboard」去定义报表的展示方式。

Azure Operational Insights

Azure Operational Insights定价

免费 标准 高级
价格 免费 $2.30/GB $3.50/GB
每日限制 500 MB 1
保留期限 7 天 1 月 12 月

对于达到每日 500MB 限制的客户,微软会停止数据分析,并在次日的一开始恢复。 一天的开始以 UTC 时区为准。

赞(0) 赞赏

评论 抢沙发

微信赞赏