{"id":20139,"date":"2023-01-26T06:06:50","date_gmt":"2023-01-26T06:06:50","guid":{"rendered":"https:\/\/www.booksofall.com\/vi\/?post_type=product&#038;p=20139"},"modified":"2023-01-26T06:39:28","modified_gmt":"2023-01-26T06:39:28","slug":"watcher-documentation","status":"publish","type":"product","link":"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/","title":{"rendered":"Watcher Documentation"},"content":{"rendered":"<p><a href=\"https:\/\/www.openstack.org\/\">OpenStack<\/a> Watcher provides a flexible and scalable resource optimization service for multi-tenant OpenStack-based clouds. Watcher provides a complete optimization loopincluding everything from a metrics receiver, complex event processor and profiler, optimization processor and an action plan applier. This provides a robust framework to realize a wide range of cloud optimization goals, including the reduction of data center operating costs, increased system performance via intelligent virtual machine migration, increased energy efficiency and more!<\/p>\n<p>Watcher project consists of several <a href=\"https:\/\/www.techopedia.com\/definition\/547\/source-code\">source code<\/a> repositories:<\/p>\n<ul>\n<li><a href=\"https:\/\/opendev.org\/openstack\/watcher\/\"><strong>watcher<\/strong> <\/a>&#8211; is the main repository. It contains code for Watcher API server, Watcher Decision Engine and Watcher Applier.<\/li>\n<li><a href=\"https:\/\/opendev.org\/openstack\/python-watcherclient\/\"><strong>python-watcherclient<\/strong><\/a> &#8211; Client library and CLI client for Watcher.<\/li>\n<li><a href=\"https:\/\/opendev.org\/openstack\/watcher-dashboard\/\"><strong>watcher-dashboard<\/strong> <\/a>&#8211; Watcher Horizon plugin.<\/li>\n<\/ul>\n<p>The documentation provided here is continually kept up-to-date based on the latest code, and may not represent the state of the project at any specific prior release.<\/p>\n<h2><b>Chapter One &#8211; System Architecture<\/b><\/h2>\n<p>This page presents the current technical Architecture of the Watcher system.<\/p>\n<h3><b>1.1 Overview\u00a0<\/b><\/h3>\n<p>Below you will find a diagram, showing the main components of Watcher:<\/p>\n<p>(See Table on p.3)<\/p>\n<h3><b>1.2 Components <\/b><\/h3>\n<p><b>1.2.1 AMQP Bus\u00a0<\/b><\/p>\n<p>The <a href=\"https:\/\/www.amqp.org\/\">AMQP<\/a> message bus handles internal asynchronous communications between the different Watcher components.<\/p>\n<p><b>1.2.2 Datasource\u00a0<\/b><\/p>\n<p>This component stores the metrics related to the cluster. It can potentially rely on any appropriate storage system (<a href=\"https:\/\/www.influxdata.com\/\">InfluxDB<\/a>, <a href=\"http:\/\/opentsdb.net\/\">OpenTSDB<\/a>, <a href=\"https:\/\/www.mongodb.com\/\">MongoDB<\/a>,) but will probably be more performant when using Time Series Databases which are optimized for handling time series data, which are arrays of numbers indexed by time (a datetime or a datetime range).<\/p>\n<p><b>1.2.3 Watcher API\u00a0<\/b><\/p>\n<p>This component implements the REST API provided by the Watcher system to the external world. It enables the\u00a0<i>Administrator\u00a0<\/i>of a\u00a0<i>Cluster\u00a0<\/i>to control and monitor the Watcher system via any interaction mechanism connected to this API:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.techtarget.com\/searchwindowsserver\/definition\/command-line-interface-CLI\"><i>CLI <\/i><\/a><\/li>\n<li>Horizon plugin<\/li>\n<li>Python SDK<\/li>\n<\/ul>\n<p>You can also read the detailed description of Watcher API.<\/p>\n<p><b>1.2.4 Watcher Applier\u00a0<\/b><\/p>\n<p>This component is in charge of executing the\u00a0<i>Action Plan\u00a0<\/i>built by the\u00a0<i>Watcher Decision Engine<\/i>. Taskflow is the default workflow engine for Watcher.<\/p>\n<p>It connects to the\u00a0<i>message bus\u00a0<\/i>and launches the\u00a0<i>Action Plan\u00a0<\/i>whenever a triggering message is received on a dedicated AMQP queue.<\/p>\n<p>The triggering message contains the Action Plan UUID.<\/p>\n<p>It then gets the detailed information about the\u00a0<i>Action Plan\u00a0<\/i>from the\u00a0<i>Watcher Database\u00a0<\/i>which contains the list of\u00a0<i>Actions\u00a0<\/i>to launch.<\/p>\n<p>It then loops on each\u00a0<i>Action<\/i>, gets the associated class and calls the execute() method of this class. Most of the time, this method will first request a token to the Keystone API and if it is allowed, sends a request to the REST API of the OpenStack service which handles this kind of\u00a0<i>atomic Action<\/i>.<\/p>\n<p>Note that as soon as\u00a0<i>Watcher Applier\u00a0<\/i>starts handling a given\u00a0<i>Action\u00a0<\/i>from the list, a notification message is sent on the\u00a0<i>message bus\u00a0<\/i>indicating that the state of the action has changed to\u00a0<b>ONGOING<\/b>.<\/p>\n<p>If the\u00a0<i>Action\u00a0<\/i>is successful, the\u00a0<i>Watcher Applier\u00a0<\/i>sends a notification message on\u00a0<i>the bus\u00a0<\/i>informing the other components of this.<\/p>\n<p>If the\u00a0<i>Action\u00a0<\/i>fails, the\u00a0<i>Watcher Applier\u00a0<\/i>tries to rollback to the previous state of the\u00a0<i>Managed resource\u00a0<\/i>(i.e. before the command was sent to the underlying OpenStack service).<\/p>\n<p>In Stein, added a new config option action_execution_rule which is a dict type. Its key field is strategy name and the value is ALWAYS or ANY. ALWAYS means the callback function returns True as usual. ANY means the return depends on the result of previous action execution. The callback returns True if previous action gets failed, and the engine continues to run the next action. If previous action executes success, the callback returns False then the next action will be ignored. For strategies that arent in ac- tion_execution_rule, the callback always returns True. Please add the next section in the watcher.conf file if your strategy needs this feature.<\/p>\n<p>[watcher_workflow_engines.taskflow]<br \/>\naction_execution_rule = {&#8216;your strategy name&#8217;: &#8216;ANY&#8217;}<\/p>\n<p><b>1.2.5 Watcher CLI\u00a0<\/b><\/p>\n<p>The watcher command-line interface (CLI) can be used to interact with the Watcher system in order to control it or to know its current status. Please, read the detailed documentation about Watcher CLI.<\/p>\n<p><b>1.2.6 Watcher Dashboard\u00a0<\/b><\/p>\n<p>The Watcher Dashboard can be used to interact with the Watcher system through Horizon in order to control it or to know its current status. Please, read the detailed documentation about Watcher Dashboard.<\/p>\n<p><b>1.2.7 Watcher Database\u00a0<\/b><\/p>\n<p>This database stores all the Watcher domain objects which can be requested by the\u00a0<i>Watcher API\u00a0<\/i>or the\u00a0<i>Watcher CLI<\/i>:<\/p>\n<ul>\n<li><i>Goals<\/i><\/li>\n<li><i>Strategies<\/i><\/li>\n<li><i>Audit templates<\/i><\/li>\n<li><i>Audits <\/i><\/li>\n<li><i>Action plans <\/i><\/li>\n<li><i>Efficacy indicators\u00a0<\/i>via the Action Plan API.<\/li>\n<li><i>Actions<\/i><\/li>\n<\/ul>\n<p>The Watcher domain being here\u00a0<i>optimization of some resources provided by an OpenStack system<\/i>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><iframe style=\"width: 100%; height: 750px; border: none;\" src=\"https:\/\/online.visual-paradigm.com\/share\/book\/watcher-documentation-189x3hewen?p=1\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"featured_media":20146,"template":"","meta":{"_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"OpenStack Watcher is a service that provides a loop of different services including OpenStack to improve productivity. Learn more here!"},"product_brand":[],"product_cat":[286],"product_tag":[],"class_list":{"0":"post-20139","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-openstack","8":"first","9":"instock","10":"shipping-taxable","11":"product-type-simple"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Watcher Documentation - BooksOfAll Vietnamese<\/title>\n<meta name=\"description\" content=\"OpenStack Watcher is a service that provides a loop of different services including OpenStack to improve productivity. Learn more here!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Watcher Documentation - BooksOfAll Vietnamese\" \/>\n<meta property=\"og:description\" content=\"OpenStack Watcher is a service that provides a loop of different services including OpenStack to improve productivity. Learn more here!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/\" \/>\n<meta property=\"og:site_name\" content=\"BooksOfAll Vietnamese\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-26T06:39:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/01\/Watcher-Documentation.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/01\/Watcher-Documentation.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 ph\u00fat\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/\",\"url\":\"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/\",\"name\":\"Watcher Documentation - BooksOfAll Vietnamese\",\"isPartOf\":{\"@id\":\"https:\/\/www.booksofall.com\/vi\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/01\/Watcher-Documentation.jpg\",\"datePublished\":\"2023-01-26T06:06:50+00:00\",\"dateModified\":\"2023-01-26T06:39:28+00:00\",\"description\":\"OpenStack Watcher is a service that provides a loop of different services including OpenStack to improve productivity. Learn more here!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/#breadcrumb\"},\"inLanguage\":\"vi\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/#primaryimage\",\"url\":\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/01\/Watcher-Documentation.jpg\",\"contentUrl\":\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/01\/Watcher-Documentation.jpg\",\"width\":\"827\",\"height\":\"1169\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.booksofall.com\/vi\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Categories\",\"item\":\"https:\/\/www.booksofall.com\/vi\/categories\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Watcher Documentation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.booksofall.com\/vi\/#website\",\"url\":\"https:\/\/www.booksofall.com\/vi\/\",\"name\":\"BooksOfAll Vietnamese\",\"description\":\"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.\",\"publisher\":{\"@id\":\"https:\/\/www.booksofall.com\/vi\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.booksofall.com\/vi\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"vi\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.booksofall.com\/vi\/#organization\",\"name\":\"BooksOfAll Vietnamese\",\"url\":\"https:\/\/www.booksofall.com\/vi\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/www.booksofall.com\/vi\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2022\/06\/booksofall-logo-2.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2022\/06\/booksofall-logo-2.png\",\"width\":166,\"height\":30,\"caption\":\"BooksOfAll Vietnamese\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/vi\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Watcher Documentation - BooksOfAll Vietnamese","description":"OpenStack Watcher is a service that provides a loop of different services including OpenStack to improve productivity. Learn more here!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/","og_locale":"vi_VN","og_type":"article","og_title":"Watcher Documentation - BooksOfAll Vietnamese","og_description":"OpenStack Watcher is a service that provides a loop of different services including OpenStack to improve productivity. Learn more here!","og_url":"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/","og_site_name":"BooksOfAll Vietnamese","article_modified_time":"2023-01-26T06:39:28+00:00","og_image":[{"url":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/01\/Watcher-Documentation.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/01\/Watcher-Documentation.jpg","twitter_misc":{"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"4 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/","url":"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/","name":"Watcher Documentation - BooksOfAll Vietnamese","isPartOf":{"@id":"https:\/\/www.booksofall.com\/vi\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/#primaryimage"},"image":{"@id":"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/01\/Watcher-Documentation.jpg","datePublished":"2023-01-26T06:06:50+00:00","dateModified":"2023-01-26T06:39:28+00:00","description":"OpenStack Watcher is a service that provides a loop of different services including OpenStack to improve productivity. Learn more here!","breadcrumb":{"@id":"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.booksofall.com\/vi\/watcher-documentation\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/#primaryimage","url":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/01\/Watcher-Documentation.jpg","contentUrl":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/01\/Watcher-Documentation.jpg","width":"827","height":"1169"},{"@type":"BreadcrumbList","@id":"https:\/\/www.booksofall.com\/vi\/watcher-documentation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.booksofall.com\/vi\/"},{"@type":"ListItem","position":2,"name":"Categories","item":"https:\/\/www.booksofall.com\/vi\/categories\/"},{"@type":"ListItem","position":3,"name":"Watcher Documentation"}]},{"@type":"WebSite","@id":"https:\/\/www.booksofall.com\/vi\/#website","url":"https:\/\/www.booksofall.com\/vi\/","name":"BooksOfAll Vietnamese","description":"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.","publisher":{"@id":"https:\/\/www.booksofall.com\/vi\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.booksofall.com\/vi\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/www.booksofall.com\/vi\/#organization","name":"BooksOfAll Vietnamese","url":"https:\/\/www.booksofall.com\/vi\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/www.booksofall.com\/vi\/#\/schema\/logo\/image\/","url":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2022\/06\/booksofall-logo-2.png","contentUrl":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2022\/06\/booksofall-logo-2.png","width":166,"height":30,"caption":"BooksOfAll Vietnamese"},"image":{"@id":"https:\/\/www.booksofall.com\/vi\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/product\/20139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/media\/20146"}],"wp:attachment":[{"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/media?parent=20139"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/product_brand?post=20139"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/product_cat?post=20139"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/product_tag?post=20139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}