如何使用 OneAPM 监控微软 Azure Cloud Service ?

不知不觉微软 Azure 已经进入中国市场近两年的时间。那么 Azure 平台的性能究竟如何?资源加载的延迟、虚拟机的稳定性等问题是否切实满足客户期许。这些都是大家对微软 Azure 这个国外的云服务使者非常关注的问题。

市场对 IaaS 云服务商的对比评测报告数不胜数,很难说谁家的评测报告准确可靠。况且国内公网网络稳定情况与国外存在一定的差距。在这样一个相对不稳定的环境下,公有云服务的 SLA 对于客户的最终使用体验很难完全保证。如何能够帮助客户及时了解自己用户的真实体验,采用有效的工具实时监控才是必由之路。

通过这篇培训文章,将教会大家如何在 Azure 上快速搭建一个博客,并使用国内性能监控的领军厂商 OneAPM 的产品,监测 Azure 云服务端到端的性能。

本文为了让大家能够快速上手,我们选择微软的 WINSR2012R2 系统和非常流行、性能强大的 Node.js 技术栈。整个过程基本是 Windows 环境的一键安装。另外采用 WINSR2012R2 是因为系统集成的 IIS 天生就实现了 NTLM 认证,服务器端不用写任何代码,这对于中小网站的后台权限管理提供了很多便利。我们使用 Node.js 的 Ghost 框架快速搭建博客站点,采用 OneAPM 的 Node.js 探针来监控这个站点前后端的所有服务。下面我们开始吧:

1.部署 Azure Cloud Service

请参考关于如何创建和部署云服务,唯一需要注意的是内部 IIS 设置完成后,不要忘记添加 Web 服务终结点。

如何使用 OneAPM 监控微软 Azure Cloud Service

2.搭建 Ghost 博客

nodejs 官网下载64位 Windows 的 MSI 安装包

如何使用 OneAPM 监控微软 Azure Cloud Service

然后基本都是下一步

如何使用 OneAPM 监控微软 Azure Cloud Service

  • 下载 Ghost 博客系统

推荐下载国内打包的完整版 Ghost 压缩包 ,下载后直接按步骤安装。

  • 打开 IIS 管理器

从 Web 平台安装程序安装两个模块

如何使用 OneAPM 监控微软 Azure Cloud Service

Application Request Route 实现请求路由

如何使用 OneAPM 监控微软 Azure Cloud Service

URLRewrite 实现重写

如何使用 OneAPM 监控微软 Azure Cloud Service

  • 新建反向代理规则

选择 URLRewrite 模块

如何使用 OneAPM 监控微软 Azure Cloud Service

添加新的规则,类型是 反向代理

如何使用 OneAPM 监控微软 Azure Cloud Service

进站规则填 Ghost 端口

如何使用 OneAPM 监控微软 Azure Cloud Service

  • 从命令行启动 Ghost 博客系统

如何使用 OneAPM 监控微软 Azure Cloud Service

一个 Azure + Ghost 框架的博客网站就部署成功了,然后打开浏览器就可以直接访问 Azure 分配的域名了...

http://msoapm01.chinacloudapp.cn

如何使用 OneAPM 监控微软 Azure Cloud Service

3.部署 OneAPM 监控服务

博客搭建成功,好的开始是成功的一半!查看一下微软 Azure 后台的控制台:

如何使用 OneAPM 监控微软 Azure Cloud Service

只有 CPU、内存 等基本指标,是不是简陋了点。OK,我们继续伟大的旅程。

  • 安装 Node.js 探针

注册 OneAPM -> 登录控制台 -> 获取授权编号 -> 下载和安装 -> 配置 -> 重启服务

如何使用 OneAPM 监控微软 Azure Cloud Service
如何使用 OneAPM 监控微软 Azure Cloud Service

  • 登录 Dashboard 监控后台应用

操作基本完毕,稍等片刻,登录 OneAPM 控制台...

An amazing world
如何使用 OneAPM 监控微软 Azure Cloud Service
如何使用 OneAPM 监控微软 Azure Cloud Service
如何使用 OneAPM 监控微软 Azure Cloud Service
如何使用 OneAPM 监控微软 Azure Cloud Service
如何使用 OneAPM 监控微软 Azure Cloud Service
如何使用 OneAPM 监控微软 Azure Cloud Service
如何使用 OneAPM 监控微软 Azure Cloud Service

前后台服务,网络拓扑,受访页面,响应时间,关键事务...一应俱全。

先让大家感性的认识下这个易用强大的 SaaS 监控服务。我们会在后续的教程中,详细地讲解 OneAPM 丰富强大的产品功能如何帮助客户和云厂商来监控 IaaS 云服务。

特别感谢 OneAPM 的 Node.js 高级开发工程师王龑提供的技术咨询

本文系 OneAPM 工程师编译整理。想阅读更多技术文章,请访问 OneAPM 官方博客

原文地址:https://www.cnblogs.com/oneapm/p/4746403.html