https://wiki.openstack.org/wiki/Watcher

Watcher为OS提供资源优化。主要是通过虚拟机迁移来提高整个数据中心的运营效率,降低TCO。

功能特点:

  1. 通过虚拟机迁移来提高整个数据中心的运营效率和各种优化
  2. advise mode (manual) or active mode (automatic),两种执行模式
  3. 通过plugin来扩展

架构图:

https://wiki.openstack.org/wiki/WatcherArchitecture

其中:

  • Complex Event Processing (CEP) 对event分析和做出相应的反应,数据会写到Time Series database,

如果该event会影响到优化的结果,输入到Decision Engine。

  • Time Series database存储数据中心/集群的各种state, metrics, events, ...,以便Decision Engine随时查询。
  • Watcher Actions Applier执行CEP的action,需要与Watcher DB连接来获取ation的描述,并把action的状态写入DB
  • REST API 提供Watcher中资源的操作,包括:Audit Templates Audits ActionPlans Actions,下面有说明例子。
  • Watcher Database保存以上Watcher中资源。
  • Watcher Decision Engine复杂根据优化目标来指定具体的优化措施。

影响最优操作的因素有:

  1. optimization goals
  2. deadline
  3. aggressiveness level
  • Watcher Logger 把从Watcher Message/Notification Bus 来的event转送到CEP

如何使用

https://factory.b-com.com/www/watcher/doc/watcher/deploy/user-guide.html

1, 创建 audit template来定义优化目标

$ watcher audit-template-create my_first_audit SERVERS_CONSOLIDATION

2, 创建audit来请求优化

$ watcher audit-create -a <your_audit_template_uuid>

3 等待audit产生action计划,list action:

$ watcher action-plan-list --audit <the_audit_uuid>

4 每个action plan的具体action:

watcher action-list --action-plan <the_action_plan_uuid>

5, 执行action plan:

$ watcher action-plan-start <the_action_plan_uuid>

6, 查看action执行情况:

$ watcher action-list

RESTAPI资源

https://factory.b-com.com/www/watcher/doc/watcher/webapi/v1.html

Audit Templates

{
"created_at": "2015-11-04T10:06:04.328837",
"deleted_at": null,
"description": "Description of my audit template",
"extra": {
"automatic": true
},
"goal": "SERVERS_CONSOLIDATION",
"host_aggregate": ,
"links": ..."name": "My Audit Template",
"updated_at": "2015-11-04T10:06:04.328840",
"uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
}

Audits

{
"audit_template_name": null,
"audit_template_uuid": "7ae81bb3-dec3-4289-8d6c-da80bd8001ae",
"created_at": "2015-11-04T10:06:04.465252",
"deadline": null,
"deleted_at": null,
"links": ..."state": "PENDING",
"type": "ONESHOT",
"updated_at": "2015-11-04T10:06:04.465255",
"uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
}

ActionPlans

{
"audit_uuid": "abcee106-14d3-4515-b744-5a26885cf6f6",
"created_at": "2015-11-04T10:06:04.599433",
"deleted_at": null,
"first_action_uuid": "57eaf9ab-5aaa-4f7e-bdf7-9a140ac7a720",
"links": ..."state": "ONGOING",
"updated_at": "2015-11-04T10:06:04.599439",
"uuid": "9ef4d84c-41e8-4418-9220-ce55be0436af"
}

Actions

{
"actions": [
{
"action_plan_uuid": "7ae81bb3-dec3-4289-8d6c-da80bd8001ae",
"links": ..."next_uuid": "7ae81bb3-dec3-4289-8d6c-da80bd8001ae",
"state": "PENDING",
"uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
}
]
}

watcher的更多相关文章

  1. node实现watcher的困境

    @(node,watcher) watcher,在如今的前端领域已经数见不鲜了.目前流行的gulp流程工具提供了watcher的选项,是我们在开发过程中不需要手动进行触发构建流程,转而根据文件(目录) ...

  2. ZooKeerper学习之Watcher

    ZooKeeper为我们提供了用于监视结点变化的Watcher机方法制: 1.可以注册Watcher的方法:getData().exists().getChildren().我们可以通过查看ZooKe ...

  3. ZooKeeper个人笔记客户端watcher和AsycCallback回调

    每一个Watcher具有如下属性: 1.KeeperState 2.EventType 3.path 4.process(WatchedEvent evnet)回掉方法 Watcher干嘛的?用户监听 ...

  4. 支持断线重连、永久watcher、递归操作并且能跨平台(.NET Core)的ZooKeeper异步客户端

    在公司内部的微服务架构中有使用到了"ZooKeeper",虽然官方有提供了.NET的SDK,但易用性非常的差,且搜遍github.nuget,没有发现一个可以跨平台且易用的组件,所 ...

  5. zookeeper Watcher API 说明

    Watcher 在 ZooKeeper 是一个核心功能,Watcher 可以监控目录节点的数据变化以及子目录的变化,一旦这些状态发生变化,服务器就会通知所有设置在这个目录节点上的 Watcher,从而 ...

  6. zookeeper中Watcher和Notifications

    问题导读:1.zookeeper观察者什么时候调用?2.传统远程轮询服务存在什么问题?3.zk中回调服务的机制是什么?4.zk中watcher为什么不永久注册?5.什么是znode? 在阅读之前首先明 ...

  7. XSS 自动化检测 Fiddler Watcher & x5s & ccXSScan 初识

    一.标题:XSS 自动化检测 Fiddler Watcher & x5s  & ccXSScan 初识     automated XSS testing assistant 二.引言 ...

  8. phpstorm-file watcher

    在项目中使用了sass,将scss编译成css的时候,每次都需要compass watch netbeans产品带有file watcher功能 三大类 1,less,scss,sass into c ...

  9. 轻松学习Ionic (三) 安装sass并在webstorm中为scss添加watcher

    1. 安装Ruby 最新为 2.1.5版本,不放心的话安装 Ruby 1.9.3-p551    安装过程中注意勾选上第二项!即将Ruby加入到可执行的环境变量中去.       安装结束后在命令行中 ...

  10. es watcher

    https://www.elastic.co/products/watcher https://www.elastic.co/blog/watcher-beta-goes-public-you-kno ...

随机推荐

  1. &#x编码转换成汉字

    import java.io.UnsupportedEncodingException; public class UnicodeDecoder { public static String esca ...

  2. cron_action

    crontab   using shell script to automate linux system maintenance tasks Linux中用crontab例行工作安排_Linux教程 ...

  3. SSH终端显示中文乱码

    出现这种关系,首先想到是因为字符集不匹配导致的.打开SSH客户端,连接到linux虚拟机 在虚拟机中输入#cd /etc#cd sysconfig/ 找到i18ncat i18n 会显示当前的编码类型 ...

  4. 002-unity3d插件使用

    一.导入第三方的工具包(.unitypackage文件) 1.NGUI项 NGUI是一款收费的插件,在Asset Store中大家可以看到价格.在未购买正版的前提下我们可以通过两种方法来使用NGUI, ...

  5. Java基础—类和对象

    基本概念 对象:对象是类的一个实例,有状态和行为.例如,一条狗是一个对象,它的状态有:颜色.名字.品种:行为有:摇尾巴.叫.吃等. 类:类是具有相同属性和方法的一组对象的集合,它为属于该类的所有对象提 ...

  6. 试着利用BAPI 寻找F-59创建凭证的函数

    功能块代码 F-59开发类 FIBP事务说明 支付请求 事物:FBP1Screen 0BKPF-BLART = AB________________________________________从程 ...

  7. 解释python中join()和split()函数

    join能让我们将指定字符添加至字符串中 a=') print(a) print(type(a)) #1,2,3,4,5,6 #<class 'str'> split()能让我们用指定字符 ...

  8. Python基础(19)_异常处理

    一.异常处理 错误和异常: 1.错误的种类: 1)语法错误:这种错误,根本过不了python解释器的语法检测,必须在程序执行前就改正 2)逻辑错误: 例如: res1=1/0  .es2=1+'str ...

  9. JQuery 获取父元素方法

    ---恢复内容开始--- <tr class="removerow" style=""> <td> <input type=&qu ...

  10. Apache commons-io实现多文件读取和写入

    需求: "E:/data/"目录下有四个文件夹,如下: 每个文件夹下有几个.csv文件,如下: 将每个文件夹下的.csv文件合并成一个以该文件夹命名的.csv文件. 做法: 找到& ...