AWS上获取监控数据(EC2/RDS都支持)
方法1:mon-cmd
http://docs.aws.amazon.com/zh_cn/AmazonCloudWatch/latest/cli/SetupCLI.html(安装连接)
● Step 1: Install the CLI
● Step 2: Configure the CLI for Your Credentials
● Step 3: Set the Region
● Step 4: Test Your CLI Configuration
安装过程:
一、安装java(1.5以上)
安装包:jre-8u-linux-x64.rpm
export JAVA_HOME=/usr/java/jre1.8.0_131/
export PATH=$PATH:$JAVA_HOME/bin
二、安装cloudwatch
1、下载CloudWatch-2010-08-01.zip包
export AWS_CLOUDWATCH_HOME=/usr/local/src/aws/CloudWatch-1.0.20.0
export PATH=$PATH:$AWS_CLOUDWATCH_HOME/bin
2、修改credential-file-path.template 文件
cat CloudWatch-1.0.20.0/credential-file-path.template
AWSAccessKeyId=
AWSSecretKey=
3、set the region
export AWS_CLOUDWATCH_URL=http://monitoring.us-west-1.amazonaws.com/
4、测试命令
venv) [root@virtul-test-xq aws]# mon-【tab】
mon-cmd mon-describe-alarms-for-metric.cmd mon-put-data
mon-cmd.cmd mon-disable-alarm-actions mon-put-data.cmd
mon-delete-alarms mon-disable-alarm-actions.cmd mon-put-metric-alarm
mon-delete-alarms.cmd mon-enable-alarm-actions mon-put-metric-alarm.cmd
mon-describe-alarm-history mon-enable-alarm-actions.cmd mon-set-alarm-state
mon-describe-alarm-history.cmd mon-get-stats mon-set-alarm-state.cmd
mon-describe-alarms mon-get-stats.cmd mon-version
mon-describe-alarms.cmd mon-list-metrics mon-version.cmd
mon-describe-alarms-for-metric mon-list-metrics.cmd
(venv) [root@virtul-test-xq aws]# mon-get-stats DatabaseConnections --dimensions="DBInstanceIdentifier=*******" --statistics= Average --namespace="AWS/RDS" --start-time 2017-06-21T09:00:00 --end-time 2017-06-21T12:00:00 --I ******** --S ******* --period 600
2017-06-21 09:00:00 30.0 Count
2017-06-21 09:10:00 30.0 Count
2017-06-21 09:20:00 30.0 Count
2017-06-21 09:30:00 29.1 Count
2017-06-21 09:40:00 29.0 Count
2017-06-21 09:50:00 29.0 Count
注意这里的时间参数:
The timestamp of the first datapoint to return, inclusive. For example,
2009-11-25T19:00:00+00:00Z. Timestamp will be rounded down to the nearest
minute. The dateTime type uses ISO 8601 (UTC). The default for this is 1
hour in the past.
参考连接:
Amazon RDS 指标
http://docs.aws.amazon.com/zh_cn/AmazonRDS/latest/UserGuide/CHAP_Monitoring.html#USER_Monitoring
Amazon RDS 指标和维度
http://docs.aws.amazon.com/zh_cn/AmazonCloudWatch/latest/monitoring/rds-metricscollected.html
boto3参考手册
https://boto3.readthedocs.io/en/latest/guide/cw-example-metrics.html
region地区查询
http://docs.aws.amazon.com/zh_cn/general/latest/gr/rande.html#cw_region
Amazon CloudWatch 工具下载
https://aws.amazon.com/items/2534
java下载地址
https://www.java.com/zh_CN/download/manual.jsp
一个不错的监控工具
https://app.datadoghq.com/account/settings#integrations
grafana监控aws
http://docs.grafana.org/features/datasources/cloudwatch/
PS:本文纯属记录个人实践经历,如有问题,可随时联系我。QQ505711559
AWS上获取监控数据(EC2/RDS都支持)的更多相关文章
- jquery autocomplete ajax获取动态数据,兼容各浏览器,支持中文
jquery.autocomplete.js经过改动,支持各种浏览器.支持中文输入! 1.效果图例如以下 2.HTML和ajax代码 <!DOCTYPE html> <html xm ...
- ADO.NET之使用DataGridView控件显示从服务器上获取的数据
今天回顾下ADO.NET中关于使用DataGridiew控件显示数据的相关知识 理论整理: 使用 DataGridView 控件,可以显示和编辑来自多种不同类型的数据源的表格数据. SqlDataAd ...
- 93服务器上获取json数据
jdf u -p上传html文件,上传到page域名下:jdf u 上传css和js 上传到misc域名下: json数据放在html下,因为ajax请求是按照html路径走的,所以json数据放在h ...
- 探索Windows Azure 监控和自动伸缩系列2 - 获取虚拟机的监控定义和监控数据
上一篇博文介绍了如何连接Windows Azure: http://www.cnblogs.com/teld/p/5113063.html 本篇我们继续上次的示例代码,获取虚拟机的监控定义和监控数据. ...
- [博客迁移]探索Windows Azure 监控和自动伸缩系列2 - 获取虚拟机的监控定义和监控数据
上一篇博文介绍了如何连接Windows Azure: http://www.cnblogs.com/teld/p/5113063.html 本篇我们继续上次的示例代码,获取虚拟机的监控定义和监控数据. ...
- 分布式监控数据采集系统Ganglia实战
一.什么是Ganglia 对于这个工具,大家可能比较陌生,但是它功能非常强大,如果我们想收集所有服务器.网络设备的数据,那么ganglia绝对是首选,在深入学习之前,还是先从基础概念了解起吧! Gan ...
- Telegraf和Grafana监控多平台上的SQL Server-自定义监控数据收集
问题 在上一篇文章中,我们使用Telegraf自带的Plugin配置好了的监控,但是自带的Plugin并不能完全覆盖我们想要的监控指标,就需要收集额外的自定义的监控数据,实现的方法有: 开发自己的Te ...
- 在亚马逊amazon的AWS上安装Node和MongoDB服务器
在亚马逊amazon的AWS上安装Node和MongoDB服务器 在建立AWS上账号.创建EC2 ,用putty链接上之后,就可以用下面的方法开始安装. !!! 如果不是是自己建立的EC2, 而是由B ...
- MVC在页面View上获取当前控制器名称、Action名称以及路由参数
有时候在封装MVC通用控件时需要在页面上获取这些数据. 用以下方法即可: //获取控制器名称: ViewContext.RouteData.Values["controller"] ...
随机推荐
- 关于python的itertools模块
这是一个强大的模块 先来看一下它都有什么工具 无穷循环器 迭代器 参数 结果 ...
- java 对象的初始化过程
PersonDemo p=new PersonDemo("lisi",20);这句话都做了什么事情? 因为new用到了PersonDemo.class,所以会先找到PersonDe ...
- 配置SQL Server on Linux(1)
1. 背景 SQL Server一般是在安装过程中进行相关的配置,安装完成之后,再去修改有一些配置就比较麻烦,比如更改SQL Server实例级别的排序规则.但在Linux下,安装过程并没有很多可以配 ...
- Swift 3.0在集合类数据结构上的一些新变化
一.Array数组的更改 array数组中修改的API示例如下: //创建大量相同元素的数组//创建有10个String类型元素的数组,并且每个元素都为字符串"Hello"//sw ...
- android JSON解析 fastjson和gson的使用
User user = new User(); user.setPhone("11111111"); user.setNmae("张三"); user.setP ...
- 【1】ArcGIS API for JavaScript 4.5/4.6 本地部署
惭愧,和我的学弟比起来,我所开始接触前端开发,ArcGIS API for JavaScript的时间和深度远远不及于他. 一年之尾,亦是一年之始,我也将正式开始我的博客生涯.本人在校学习并且做项目, ...
- AntData.ORM框架 之 DotnetCore
开源地址:https://github.com/yuzd/AntData.ORM CodeGen使用请参考http://www.cnblogs.com/yudongdong/p/6421312.h ...
- 51Nod1203 2012集训队答辩 JZPLCM
A1339. JZPLCM(顾昱洲) 时间限制:3.0s 内存限制:256.0MB 试题来源 2012中国国家集训队命题答辩 问题描述 给定一长度为n的正整数序列a,有q次询问,每次询问一段区 ...
- node学习心得
此次学习主要使用的是基于nodejs平台的web应用开发框架. 一.express的工程结构 1.bin/www:express的执行入口,存放可执行文件: 2.node_modules:存放pack ...
- 第二节 安装CentOS
Linux 第二节一.安装VNware workstation 10二.安装CentOS 1.root/123456 用户登录[root@localhost ~]# 2.关机 init 0 3.ifc ...