├── .coveragerc ├── .gitignore ├── .gitreview ├── .mailmap ├── .stestr.conf ├── .zuul.yaml ├── CONTRIBUTING.rst ├── HACKING.rst ├── LICENSE ├── README.rst ├── doc ├── requirements.txt └── source │ ├── conf.py │ ├── contributor │ ├── cli.rst │ ├── contributing.rst │ ├── index.rst │ ├── installation.rst │ ├── readme.rst │ └── usage.rst │ └── index.rst ├── releasenotes ├── notes │ ├── .placeholder │ ├── add-template-by-string-ab6aff3badc279cd.yaml │ ├── add_alarm_show_api-9a9d91cf69c45a8e.yaml │ ├── add_cli_flag_to_wait_on_template_add_delete-05ea5dd038b18cd8.yaml │ ├── add_service_list-0d0720c6bd41e10e.yaml │ ├── add_status-e3fdc1e61696ade0.yaml │ ├── add_template_versions-b4b5e87c06a795c7.yaml │ ├── added-pagination-support-71c3a4a0fec59c82.yaml │ ├── alarm-counts-cli-0e91f391024163f8.yaml │ ├── drop-py-2-7-4a355df72edbe12c.yaml │ ├── event-post-api-e30548bb0a6fa6ac.yaml │ ├── multi-tenancy-support-b8d4cd83e9ded7bc.yaml │ ├── osc-support-fab94b809caa7eac.yaml │ ├── osc_update_command-bc2ad6363daaf2e4.yaml │ ├── osprofiler-787e801596a792eb.yaml │ ├── resource-list-8e913ffa069c02e5.yaml │ ├── resource-show-d742fe60a7d4a9eb.yaml │ ├── resource_count-52fc0ec86b983197.yaml │ ├── resource_list_query-5f5763fbff70bdcb.yaml │ ├── support-alarm-history-ce9c184ef0a35777.yaml │ ├── support-template-parameters-766ec9420d2502c5.yaml │ ├── support-webhooks-c4f1caabf53f2b82.yaml │ ├── support_dot_format-37691ee68c5610b3.yaml │ ├── support_graphml_format-e00d0806a3eceb05.yaml │ ├── support_template_show_and_add_by_name-19f6ec71d2d5b14c.yaml │ └── template_crud-fcdfbb3ef23adc6a.yaml └── source │ ├── 2023.1.rst │ ├── 2023.2.rst │ ├── 2024.1.rst │ ├── 2024.2.rst │ ├── 2025.1.rst │ ├── _static │ └── .placeholder │ ├── _templates │ └── .placeholder │ ├── conf.py │ ├── index.rst │ ├── ocata.rst │ ├── pike.rst │ ├── queens.rst │ ├── rocky.rst │ ├── stein.rst │ ├── train.rst │ ├── unreleased.rst │ ├── ussuri.rst │ ├── victoria.rst │ ├── wallaby.rst │ ├── xena.rst │ ├── yoga.rst │ └── zed.rst ├── requirements.txt ├── setup.cfg ├── setup.py ├── test-requirements.txt ├── tools └── vitrage.bash_completion ├── tox.ini └── vitrageclient ├── __init__.py ├── auth.py ├── client.py ├── common ├── __init__.py ├── formatters.py ├── utils.py └── yaml_utils.py ├── exceptions.py ├── osc.py ├── shell.py ├── tests ├── __init__.py ├── cli │ ├── __init__.py │ ├── base.py │ ├── test_event_post.py │ └── test_topology_show.py ├── resources │ └── template1.yaml ├── test_template.py └── utils.py └── v1 ├── __init__.py ├── alarm.py ├── cli ├── __init__.py ├── alarm.py ├── event.py ├── healthcheck.py ├── rca.py ├── resource.py ├── service.py ├── status.py ├── template.py ├── topology.py └── webhook.py ├── client.py ├── event.py ├── healthcheck.py ├── rca.py ├── resource.py ├── service.py ├── status.py ├── template.py ├── topology.py └── webhook.py /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | source = vitrageclient 4 | 5 | [report] 6 | ignore_errors = True 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[cod] 2 | 3 | # C extensions 4 | *.so 5 | 6 | # Packages 7 | *.egg 8 | *.egg-info 9 | dist 10 | build 11 | .eggs 12 | eggs 13 | parts 14 | bin 15 | var 16 | sdist 17 | develop-eggs 18 | .installed.cfg 19 | lib 20 | lib64 21 | 22 | # Installer logs 23 | pip-log.txt 24 | 25 | # Unit test / coverage reports 26 | .coverage 27 | .tox 28 | nosetests.xml 29 | .stestr/ 30 | .venv 31 | 32 | # Translations 33 | *.mo 34 | 35 | # Mr Developer 36 | .mr.developer.cfg 37 | .project 38 | .pydevproject 39 | 40 | # Complexity 41 | output/*.html 42 | output/*/index.html 43 | 44 | # Sphinx 45 | doc/build 46 | 47 | # pbr generates these 48 | AUTHORS 49 | ChangeLog 50 | 51 | # Editors 52 | *~ 53 | .*.swp 54 | .*sw? 55 | .idea 56 | *.iml 57 | -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | [gerrit] 2 | host=review.opendev.org 3 | port=29418 4 | project=openstack/python-vitrageclient.git 5 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | # Format is: 2 | # 3 | # 4 | -------------------------------------------------------------------------------- /.stestr.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | test_path=./vitrageclient/tests/ 3 | top_dir=./ -------------------------------------------------------------------------------- /.zuul.yaml: -------------------------------------------------------------------------------- 1 | - project: 2 | templates: 3 | - check-requirements 4 | - openstack-python3-jobs 5 | - openstackclient-plugin-jobs 6 | - publish-openstack-docs-pti 7 | - release-notes-jobs-python3 8 | - openstack-cover-jobs 9 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | If you would like to contribute to the development of OpenStack, you must 2 | follow the steps in this page: 3 | 4 | https://docs.openstack.org/infra/manual/developers.html 5 | 6 | If you already have a good understanding of how the system works and your 7 | OpenStack accounts are set up, you can skip to the development workflow 8 | section of this documentation to learn how changes to OpenStack should be 9 | submitted for review via the Gerrit tool: 10 | 11 | https://docs.openstack.org/infra/manual/developers.html#development-workflow 12 | 13 | Pull requests submitted through GitHub will be ignored. 14 | 15 | Bugs should be filed on Storyboard, not GitHub: 16 | 17 | https://storyboard.openstack.org/#!/board/89 18 | -------------------------------------------------------------------------------- /HACKING.rst: -------------------------------------------------------------------------------- 1 | python-vitrageclient Style Commandments 2 | ======================================= 3 | 4 | Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/ 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | Team and repository tags 3 | ======================== 4 | 5 | .. image:: https://governance.openstack.org/tc/badges/python-vitrageclient.svg 6 | :target: https://governance.openstack.org/tc/reference/tags/index.html 7 | 8 | .. Change things from this point on 9 | 10 | .. 11 | Licensed under the Apache License, Version 2.0 (the "License"); you may 12 | not use this file except in compliance with the License. You may obtain 13 | a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 19 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 20 | License for the specific language governing permissions and limitations 21 | under the License. 22 | 23 | 24 | Python bindings to the Vitrage API 25 | ================================== 26 | 27 | This is a client library for Vitrage built to interface with the Vitrage API 28 | . It 29 | provides a Python API (the ``vitrageclient`` module) and a command-line tool 30 | (``vitrage``). 31 | 32 | 33 | .. contents:: Contents: 34 | :local: 35 | 36 | Ubuntu Install 37 | -------------- 38 | At the moment only manual install is available 39 | 40 | Manual Install Steps: 41 | - cd to your python-vitrageclient repo 42 | - sudo pip install -r requirements.txt 43 | - python setup.py install 44 | 45 | Building and Packaging 46 | ---------------------- 47 | Install the tool dependencies 48 | 49 | :: 50 | 51 | sudo apt-get install python-pip python-virtualenv 52 | 53 | 54 | In the python-vitrageclient source directory 55 | 56 | :: 57 | 58 | virtualenv --no-site-packages .venv 59 | 60 | source ./.venv/bin/activate 61 | 62 | pip install wheel 63 | 64 | python setup.py bdist_wheel 65 | 66 | pip install $(ls -1rt dist/*.whl | tail -1) --upgrade 67 | 68 | 69 | References 70 | ---------- 71 | 72 | Detailed documentation for the CLI see `CLI Spec `_ 73 | -------------------------------------------------------------------------------- /doc/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx>=2.0.0,!=2.1.0 # BSD 2 | openstackdocstheme>=2.2.0 # Apache-2.0 3 | reno>=3.1.0 # Apache-2.0 4 | -------------------------------------------------------------------------------- /doc/source/conf.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); 2 | # you may not use this file except in compliance with the License. 3 | # You may obtain a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, 9 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 10 | # implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | 14 | import os 15 | import sys 16 | 17 | sys.path.insert(0, os.path.abspath('../..')) 18 | # -- General configuration ---------------------------------------------------- 19 | 20 | # Add any Sphinx extension module names here, as strings. They can be 21 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 22 | extensions = [ 23 | 'sphinx.ext.autodoc', 24 | #'sphinx.ext.intersphinx', 25 | 'openstackdocstheme' 26 | ] 27 | 28 | # openstackdocstheme options 29 | openstackdocs_repo_name = 'openstack/python-vitrageclient' 30 | openstackdocs_use_storyboard = True 31 | 32 | # autodoc generation is a bit aggressive and a nuisance when doing heavy 33 | # text edit cycles. 34 | # execute "export SPHINX_DEBUG=1" in your terminal to disable 35 | 36 | # The suffix of source filenames. 37 | source_suffix = '.rst' 38 | 39 | # The master toctree document. 40 | master_doc = 'index' 41 | 42 | # General information about the project. 43 | project = 'python-vitrageclient' 44 | copyright = '2016, OpenStack Foundation' 45 | 46 | # If true, '()' will be appended to :func: etc. cross-reference text. 47 | add_function_parentheses = True 48 | 49 | # If true, the current module name will be prepended to all description 50 | # unit titles (such as .. function::). 51 | add_module_names = True 52 | 53 | # The name of the Pygments (syntax highlighting) style to use. 54 | pygments_style = 'native' 55 | 56 | # -- Options for HTML output -------------------------------------------------- 57 | 58 | # The theme to use for HTML and HTML Help pages. Major themes that come with 59 | # Sphinx are currently 'default' and 'sphinxdoc'. 60 | # html_theme_path = ["."] 61 | html_theme = 'openstackdocs' 62 | # html_static_path = ['static'] 63 | 64 | # Output file base name for HTML help builder. 65 | htmlhelp_basename = '%sdoc' % project 66 | 67 | # Grouping the document tree into LaTeX files. List of tuples 68 | # (source start file, target name, title, author, documentclass 69 | # [howto/manual]). 70 | latex_documents = [ 71 | ('index', 72 | '%s.tex' % project, 73 | '%s Documentation' % project, 74 | 'OpenStack Foundation', 'manual'), 75 | ] 76 | 77 | # Example configuration for intersphinx: refer to the Python standard library. 78 | #intersphinx_mapping = {'http://docs.python.org/': None} 79 | -------------------------------------------------------------------------------- /doc/source/contributor/cli.rst: -------------------------------------------------------------------------------- 1 | .. 2 | Licensed under the Apache License, Version 2.0 (the "License"); you may 3 | not use this file except in compliance with the License. You may obtain 4 | a copy of the License at 5 | 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | 8 | Unless required by applicable law or agreed to in writing, software 9 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 10 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 11 | License for the specific language governing permissions and limitations 12 | under the License. 13 | 14 | 15 | 16 | ================ 17 | Command-line API 18 | ================ 19 | Installing this distribution gets you a shell command, ``vitrage``, that you 20 | can use to interact with the Vitrage API server. 21 | 22 | Usage: 23 | vitrage 24 | 25 | vitrage help 26 | 27 | vitrage help 28 | 29 | 30 | Environmental Variables 31 | ----------------------- 32 | 33 | Environmental variables can be sourced, or optionally passed in as CLI arguments. 34 | It is easiest to source them first and then use the CLI. 35 | 36 | When using Keystone to obtain the token and endpoint:: 37 | 38 | export OS_USERNAME= 39 | export OS_PASSWORD= 40 | export OS_USER_DOMAIN_NAME= 41 | export OS_PROJECT_NAME= 42 | export OS_AUTH_URL= 43 | export OS_REGION_NAME= 44 | 45 | When OS_USER_DOMAIN_NAME is not set, then 'Default' is assumed. Alternatively IDs can be used instead of names. 46 | 47 | When using Keycloak instead of Keystone use the os-auth-type ``vitrage-keycloak`` 48 | and supply username, password, realm_name, endpoint, auth_url, openid_client_id. 49 | 50 | The parameters can be supplied in command line e.g --username,--realm-name 51 | or as environment variables with the prefix ``VITRAGE_`` e.g ``VITRAGE_REALM_NAME`` 52 | 53 | You'll find complete documentation on the shell by running 54 | ``vitrage help``:: 55 | 56 | vitrage help 57 | usage: vitrage [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug] 58 | [--vitrage-api-version VITRAGE_API_VERSION] 59 | [--profile HMAC_KEY] [--os-region-name ] 60 | [--os-interface ] [--insecure] 61 | [--os-cacert ] [--os-cert ] 62 | [--os-key ] [--timeout ] [--os-auth-type ] 63 | [--os-auth-url OS_AUTH_URL] [--os-domain-id OS_DOMAIN_ID] 64 | [--os-domain-name OS_DOMAIN_NAME] 65 | [--os-project-id OS_PROJECT_ID] 66 | [--os-project-name OS_PROJECT_NAME] 67 | [--os-project-domain-id OS_PROJECT_DOMAIN_ID] 68 | [--os-project-domain-name OS_PROJECT_DOMAIN_NAME] 69 | [--os-trust-id OS_TRUST_ID] 70 | [--os-default-domain-id OS_DEFAULT_DOMAIN_ID] 71 | [--os-default-domain-name OS_DEFAULT_DOMAIN_NAME] 72 | [--os-user-id OS_USER_ID] [--os-username OS_USERNAME] 73 | [--os-user-domain-id OS_USER_DOMAIN_ID] 74 | [--os-user-domain-name OS_USER_DOMAIN_NAME] 75 | [--os-password OS_PASSWORD] [--endpoint ENDPOINT] 76 | 77 | Vitrage command line interface 78 | 79 | optional arguments: 80 | --version show program's version number and exit 81 | -v, --verbose Increase verbosity of output. Can be repeated. 82 | -q, --quiet Suppress output except warnings and errors. 83 | --log-file LOG_FILE Specify a file to log output. Disabled by default. 84 | -h, --help Show help message and exit. 85 | --debug Show tracebacks on errors. 86 | --vitrage-api-version VITRAGE_API_VERSION 87 | Defaults to env[VITRAGE_API_VERSION] or 1. 88 | --profile HMAC_KEY HMAC key to use for encrypting context data for 89 | performance profiling of request. This key should be 90 | the value of the HMAC key configured for the 91 | osprofiler middleware in Vitrage api; it is specified 92 | in the Vitrage configuration file 93 | at"/etc/vitrage/vitrage.conf". Without the key, 94 | profiling will not be triggered even if osprofiler is 95 | enabled on the server side. 96 | --os-region-name 97 | Authentication region name (Env: OS_REGION_NAME) 98 | --os-interface 99 | Select an interface type. Valid interface types: 100 | [admin, public, internal]. (Env: OS_INTERFACE) 101 | --os-auth-type , --os-auth-plugin 102 | Authentication type to use 103 | --endpoint ENDPOINT Vitrage endpoint (Env: VITRAGE_ENDPOINT) 104 | 105 | API Connection Options: 106 | Options controlling the HTTP API Connections 107 | 108 | --insecure Explicitly allow client to perform "insecure" TLS 109 | (https) requests. The server's certificate will not be 110 | verified against any certificate authorities. This 111 | option should be used with caution. 112 | --os-cacert 113 | Specify a CA bundle file to use in verifying a TLS 114 | (https) server certificate. Defaults to 115 | env[OS_CACERT]. 116 | --os-cert 117 | Defaults to env[OS_CERT]. 118 | --os-key Defaults to env[OS_KEY]. 119 | --timeout Set request timeout (in seconds). 120 | 121 | Authentication Options: 122 | Options specific to the password plugin. 123 | 124 | --os-auth-url OS_AUTH_URL 125 | Authentication URL 126 | --os-domain-id OS_DOMAIN_ID 127 | Domain ID to scope to 128 | --os-domain-name OS_DOMAIN_NAME 129 | Domain name to scope to 130 | --os-project-id OS_PROJECT_ID, --os-tenant-id OS_PROJECT_ID 131 | Project ID to scope to 132 | --os-project-name OS_PROJECT_NAME, --os-tenant-name OS_PROJECT_NAME 133 | Project name to scope to 134 | --os-project-domain-id OS_PROJECT_DOMAIN_ID 135 | Domain ID containing project 136 | --os-project-domain-name OS_PROJECT_DOMAIN_NAME 137 | Domain name containing project 138 | --os-trust-id OS_TRUST_ID 139 | Trust ID 140 | --os-default-domain-id OS_DEFAULT_DOMAIN_ID 141 | Optional domain ID to use with v3 and v2 parameters. 142 | It will be used for both the user and project domain 143 | in v3 and ignored in v2 authentication. 144 | --os-default-domain-name OS_DEFAULT_DOMAIN_NAME 145 | Optional domain name to use with v3 API and v2 146 | parameters. It will be used for both the user and 147 | project domain in v3 and ignored in v2 authentication. 148 | --os-user-id OS_USER_ID 149 | User id 150 | --os-username OS_USERNAME, --os-user-name OS_USERNAME 151 | Username 152 | --os-user-domain-id OS_USER_DOMAIN_ID 153 | User's domain id 154 | --os-user-domain-name OS_USER_DOMAIN_NAME 155 | User's domain name 156 | --os-password OS_PASSWORD 157 | User's password 158 | 159 | Commands: 160 | alarm count Show a count of all alarms 161 | alarm list List all alarms 162 | alarm show Show an alarm 163 | complete print bash completion command (cliff) 164 | event post Post an event to Vitrage 165 | healthcheck Check api health status 166 | help print detailed help for another command (cliff) 167 | rca show Show the Root Cause Analysis for a certain alarm 168 | resource count Show a count of all resources 169 | resource list List resources 170 | resource show Show a resource 171 | service list List all services 172 | template add Add a template 173 | template delete Delete a template 174 | template list List all templates 175 | template show Show a template 176 | template validate Validate a template file 177 | topology show Show the topology of the system 178 | webhook add Add a new webhook to the database 179 | webhook delete Delete a webhook 180 | webhook list List all webhooks in the database 181 | webhook show Show a webhook 182 | 183 | Bash Completion 184 | --------------- 185 | Basic command tab completion can be enabled by sourcing the bash completion script. 186 | :: 187 | 188 | source /usr/local/share/vitrage.bash_completion 189 | 190 | 191 | Topology Example 192 | ---------------- 193 | Note: To see complete usage: 'vitrage help' and 'vitrage help ' 194 | 195 | topology show 196 | ^^^^^^^^^^^^^ 197 | :: 198 | 199 | vitrage topology show 200 | 201 | { 202 | "directed": true, 203 | "graph": {}, 204 | "nodes": [ 205 | { 206 | "category": "RESOURCE", 207 | "is_placeholder": false, 208 | "is_deleted": false, 209 | "name": "vm-8", 210 | "update_timestamp": "2015-12-01T12:46:41Z", 211 | "state": "ACTIVE", 212 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 213 | "type": "nova.instance", 214 | "id": "20d12a8a-ea9a-89c6-5947-83bea959362e", 215 | "vitrage_id": "RESOURCE:nova.instance:20d12a8a-ea9a-89c6-5947-83bea959362e" 216 | }, 217 | { 218 | "category": "RESOURCE", 219 | "is_placeholder": false, 220 | "is_deleted": false, 221 | "name": "vm-2", 222 | "update_timestamp": "2015-12-01T12:46:41Z", 223 | "state": "ACTIVE", 224 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 225 | "type": "nova.instance", 226 | "id": "dc35fa2f-4515-1653-ef6b-03b471bb395b", 227 | "vitrage_id": "RESOURCE:nova.instance:dc35fa2f-4515-1653-ef6b-03b471bb395b" 228 | }, 229 | { 230 | "category": "RESOURCE", 231 | "is_placeholder": false, 232 | "is_deleted": false, 233 | "name": "vm-13", 234 | "update_timestamp": "2015-12-01T12:46:41Z", 235 | "state": "ACTIVE", 236 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 237 | "type": "nova.instance", 238 | "id": "9879cf5a-bdcf-3651-3017-961ed887ec86", 239 | "vitrage_id": "RESOURCE:nova.instance:9879cf5a-bdcf-3651-3017-961ed887ec86" 240 | }, 241 | { 242 | "category": "RESOURCE", 243 | "is_placeholder": false, 244 | "is_deleted": false, 245 | "name": "vm-10", 246 | "update_timestamp": "2015-12-01T12:46:41Z", 247 | "state": "ACTIVE", 248 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 249 | "type": "nova.instance", 250 | "id": "fe124f4b-9ed7-4591-fcd1-803cf5c33cb1", 251 | "vitrage_id": "RESOURCE:nova.instance:fe124f4b-9ed7-4591-fcd1-803cf5c33cb1" 252 | }, 253 | { 254 | "category": "RESOURCE", 255 | "is_placeholder": false, 256 | "is_deleted": false, 257 | "name": "vm-11", 258 | "update_timestamp": "2015-12-01T12:46:41Z", 259 | "state": "ACTIVE", 260 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 261 | "type": "nova.instance", 262 | "id": "f2e48a97-7350-061e-12d3-84c6dc3e67c0", 263 | "vitrage_id": "RESOURCE:nova.instance:f2e48a97-7350-061e-12d3-84c6dc3e67c0" 264 | }, 265 | { 266 | "category": "RESOURCE", 267 | "is_placeholder": false, 268 | "is_deleted": false, 269 | "name": "host-2", 270 | "update_timestamp": "2015-12-01T12:46:41Z", 271 | "state": "available", 272 | "type": "nova.host", 273 | "id": "host-2", 274 | "vitrage_id": "RESOURCE:nova.host:host-2" 275 | }, 276 | { 277 | "category": "RESOURCE", 278 | "is_placeholder": false, 279 | "is_deleted": false, 280 | "name": "host-3", 281 | "update_timestamp": "2015-12-01T12:46:41Z", 282 | "state": "available", 283 | "type": "nova.host", 284 | "id": "host-3", 285 | "vitrage_id": "RESOURCE:nova.host:host-3" 286 | }, 287 | { 288 | "category": "RESOURCE", 289 | "is_placeholder": false, 290 | "is_deleted": false, 291 | "name": "host-0", 292 | "update_timestamp": "2015-12-01T12:46:41Z", 293 | "state": "available", 294 | "type": "nova.host", 295 | "id": "host-0", 296 | "vitrage_id": "RESOURCE:nova.host:host-0" 297 | }, 298 | { 299 | "category": "RESOURCE", 300 | "is_placeholder": false, 301 | "is_deleted": false, 302 | "name": "host-1", 303 | "update_timestamp": "2015-12-01T12:46:41Z", 304 | "state": "available", 305 | "type": "nova.host", 306 | "id": "host-1", 307 | "vitrage_id": "RESOURCE:nova.host:host-1" 308 | }, 309 | { 310 | "category": "RESOURCE", 311 | "is_placeholder": false, 312 | "is_deleted": false, 313 | "name": "vm-9", 314 | "update_timestamp": "2015-12-01T12:46:41Z", 315 | "state": "ACTIVE", 316 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 317 | "type": "nova.instance", 318 | "id": "275097cf-954e-8e24-b185-9514e24b8591", 319 | "vitrage_id": "RESOURCE:nova.instance:275097cf-954e-8e24-b185-9514e24b8591" 320 | }, 321 | { 322 | "category": "RESOURCE", 323 | "is_placeholder": false, 324 | "is_deleted": false, 325 | "name": "vm-1", 326 | "update_timestamp": "2015-12-01T12:46:41Z", 327 | "state": "ACTIVE", 328 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 329 | "type": "nova.instance", 330 | "id": "a0f0805f-c804-cffe-c25a-1b38f555ed68", 331 | "vitrage_id": "RESOURCE:nova.instance:a0f0805f-c804-cffe-c25a-1b38f555ed68" 332 | }, 333 | { 334 | "category": "RESOURCE", 335 | "is_placeholder": false, 336 | "is_deleted": false, 337 | "name": "vm-14", 338 | "update_timestamp": "2015-12-01T12:46:41Z", 339 | "state": "ACTIVE", 340 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 341 | "type": "nova.instance", 342 | "id": "56af57d2-34a4-19b1-5106-b613637a11a7", 343 | "vitrage_id": "RESOURCE:nova.instance:56af57d2-34a4-19b1-5106-b613637a11a7" 344 | }, 345 | { 346 | "category": "RESOURCE", 347 | "is_placeholder": false, 348 | "is_deleted": false, 349 | "name": "zone-1", 350 | "update_timestamp": "2015-12-01T12:46:41Z", 351 | "state": "available", 352 | "type": "nova.zone", 353 | "id": "zone-1", 354 | "vitrage_id": "RESOURCE:nova.zone:zone-1" 355 | }, 356 | { 357 | "category": "RESOURCE", 358 | "is_placeholder": false, 359 | "is_deleted": false, 360 | "name": "vm-3", 361 | "update_timestamp": "2015-12-01T12:46:41Z", 362 | "state": "ACTIVE", 363 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 364 | "type": "nova.instance", 365 | "id": "16e14c58-d254-2bec-53e4-c766e48810aa", 366 | "vitrage_id": "RESOURCE:nova.instance:16e14c58-d254-2bec-53e4-c766e48810aa" 367 | }, 368 | { 369 | "category": "RESOURCE", 370 | "is_placeholder": false, 371 | "is_deleted": false, 372 | "name": "vm-7", 373 | "update_timestamp": "2015-12-01T12:46:41Z", 374 | "state": "ACTIVE", 375 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 376 | "type": "nova.instance", 377 | "id": "f35a1e10-74ff-7332-8edf-83cd6ffcb2de", 378 | "vitrage_id": "RESOURCE:nova.instance:f35a1e10-74ff-7332-8edf-83cd6ffcb2de" 379 | }, 380 | { 381 | "category": "RESOURCE", 382 | "is_placeholder": false, 383 | "is_deleted": false, 384 | "name": "vm-4", 385 | "update_timestamp": "2015-12-01T12:46:41Z", 386 | "state": "ACTIVE", 387 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 388 | "type": "nova.instance", 389 | "id": "ea8a450e-cab1-2272-f431-494b40c5c378", 390 | "vitrage_id": "RESOURCE:nova.instance:ea8a450e-cab1-2272-f431-494b40c5c378" 391 | }, 392 | { 393 | "category": "RESOURCE", 394 | "is_placeholder": false, 395 | "is_deleted": false, 396 | "name": "vm-6", 397 | "update_timestamp": "2015-12-01T12:46:41Z", 398 | "state": "ACTIVE", 399 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 400 | "type": "nova.instance", 401 | "id": "6e42bdc3-b776-1b2c-2c7d-b7a8bb98f721", 402 | "vitrage_id": "RESOURCE:nova.instance:6e42bdc3-b776-1b2c-2c7d-b7a8bb98f721" 403 | }, 404 | { 405 | "category": "RESOURCE", 406 | "is_placeholder": false, 407 | "is_deleted": false, 408 | "name": "vm-5", 409 | "update_timestamp": "2015-12-01T12:46:41Z", 410 | "state": "ACTIVE", 411 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 412 | "type": "nova.instance", 413 | "id": "8c951613-c660-87c0-c18b-0fa3293ce8d8", 414 | "vitrage_id": "RESOURCE:nova.instance:8c951613-c660-87c0-c18b-0fa3293ce8d8" 415 | }, 416 | { 417 | "category": "RESOURCE", 418 | "is_placeholder": false, 419 | "is_deleted": false, 420 | "name": "zone-0", 421 | "update_timestamp": "2015-12-01T12:46:41Z", 422 | "state": "available", 423 | "type": "nova.zone", 424 | "id": "zone-0", 425 | "vitrage_id": "RESOURCE:nova.zone:zone-0" 426 | }, 427 | { 428 | "category": "RESOURCE", 429 | "is_placeholder": false, 430 | "is_deleted": false, 431 | "name": "vm-0", 432 | "update_timestamp": "2015-12-01T12:46:41Z", 433 | "state": "ACTIVE", 434 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 435 | "type": "nova.instance", 436 | "id": "78353ce4-2710-49b5-1341-b8cbb6000ebc", 437 | "vitrage_id": "RESOURCE:nova.instance:78353ce4-2710-49b5-1341-b8cbb6000ebc" 438 | },TODO 439 | { 440 | "category": "RESOURCE", 441 | "is_placeholder": false, 442 | "is_deleted": false, 443 | "name": "vm-12", 444 | "update_timestamp": "2015-12-01T12:46:41Z", 445 | "state": "ACTIVE", 446 | "project_id": "0683517e1e354d2ba25cba6937f44e79", 447 | "type": "nova.instance", 448 | "id": "35bf479a-75d9-80a9-874e-d3b50fb2dd2e", 449 | "vitrage_id": "RESOURCE:nova.instance:35bf479a-75d9-80a9-874e-d3b50fb2dd2e" 450 | }, 451 | { 452 | "category": "RESOURCE", 453 | "is_placeholder": false, 454 | "is_deleted": false, 455 | "name": "openstack.node", 456 | "type": "openstack.node", 457 | "id": "openstack.node", 458 | "vitrage_id": "RESOURCE:openstack.node" 459 | } 460 | ], 461 | "links": [ 462 | { 463 | "relationship_name": "contains", 464 | "is_deleted": false, 465 | "target": 3, 466 | "key": "contains", 467 | "source": 5 468 | }, 469 | { 470 | "relationship_name": "contains", 471 | "is_deleted": false, 472 | "target": 1, 473 | "key": "contains", 474 | "source": 5 475 | }, 476 | { 477 | "relationship_name": "contains", 478 | "is_deleted": false, 479 | "target": 16, 480 | "key": "contains", 481 | "source": 5 482 | }, 483 | { 484 | "relationship_name": "contains", 485 | "is_deleted": false, 486 | "target": 11, 487 | "key": "contains", 488 | "source": 5 489 | }, 490 | { 491 | "relationship_name": "contains", 492 | "is_deleted": false, 493 | "target": 13, 494 | "key": "contains", 495 | "source": 6 496 | }, 497 | { 498 | "relationship_name": "contains", 499 | "is_deleted": false, 500 | "target": 4, 501 | "key": "contains", 502 | "source": 6 503 | }, 504 | { 505 | "relationship_name": "contains", 506 | "is_deleted": false, 507 | "target": 14, 508 | "key": "contains", 509 | "source": 6 510 | }, 511 | { 512 | "relationship_name": "contains", 513 | "is_deleted": false, 514 | "target": 20, 515 | "key": "contains", 516 | "source": 7 517 | }, 518 | { 519 | "relationship_name": "contains", 520 | "is_deleted": false, 521 | "target": 0, 522 | "key": "contains", 523 | "source": 7 524 | }, 525 | { 526 | "relationship_name": "contains", 527 | "is_deleted": false, 528 | "target": 19, 529 | "key": "contains", 530 | "source": 7 531 | }, 532 | { 533 | "relationship_name": "contains", 534 | "is_deleted": false, 535 | "target": 15, 536 | "key": "contains", 537 | "source": 7 538 | }, 539 | { 540 | "relationship_name": "contains", 541 | "is_deleted": false, 542 | "target": 9, 543 | "key": "contains", 544 | "source": 8 545 | }, 546 | { 547 | "relationship_name": "contains", 548 | "is_deleted": false, 549 | "target": 10, 550 | "key": "contains", 551 | "source": 8 552 | }, 553 | { 554 | "relationship_name": "contains", 555 | "is_deleted": false, 556 | "target": 2, 557 | "key": "contains", 558 | "source": 8 559 | }, 560 | { 561 | "relationship_name": "contains", 562 | "is_deleted": false, 563 | "target": 17, 564 | "key": "contains", 565 | "source": 8 566 | }, 567 | { 568 | "relationship_name": "contains", 569 | "is_deleted": false, 570 | "target": 6, 571 | "key": "contains", 572 | "source": 12 573 | }, 574 | { 575 | "relationship_name": "contains", 576 | "is_deleted": false, 577 | "target": 8, 578 | "key": "contains", 579 | "source": 12 580 | }, 581 | { 582 | "relationship_name": "contains", 583 | "is_deleted": false, 584 | "target": 5, 585 | "key": "contains", 586 | "source": 18 587 | }, 588 | { 589 | "relationship_name": "contains", 590 | "is_deleted": false, 591 | "target": 7, 592 | "key": "contains", 593 | "source": 18 594 | }, 595 | { 596 | "relationship_name": "contains", 597 | "is_deleted": false, 598 | "target": 18, 599 | "key": "contains", 600 | "source": 21 601 | }, 602 | { 603 | "relationship_name": "contains", 604 | "is_deleted": false, 605 | "target": 12, 606 | "key": "contains", 607 | "source": 21 608 | } 609 | ], 610 | "multigraph": true 611 | } 612 | 613 | RCA Example 614 | ----------- 615 | Note: To see complete usage: 'vitrage help' and 'vitrage help ' 616 | 617 | rca show 618 | ^^^^^^^^ 619 | :: 620 | 621 | vitrage rca show 622 | 623 | { 624 | "directed": true, 625 | "graph": { 626 | 627 | }, 628 | "nodes": [ 629 | { 630 | "category": "ALARM", 631 | "type": "nagios", 632 | "name": "CPU load", 633 | "state": "Active", 634 | "severity": "WARNING", 635 | "update_timestamp": "2015-12-01T12:46:41Z", 636 | "info": "WARNING - 15min load 1.66 at 32 CPUs", 637 | "resource_type": "nova.host", 638 | "resource_name": "host-0", 639 | "resource_id": "host-0", 640 | "id": 0, 641 | "vitrage_id": "ALARM:nagios:host0:CPU load" 642 | }, 643 | { 644 | "category": "ALARM", 645 | "type": "vitrage", 646 | "name": "Machine Suboptimal", 647 | "state": "Active", 648 | "severity": "WARNING", 649 | "update_timestamp": "2015-12-01T12:46:41Z", 650 | "resource_type": "nova.instance", 651 | "resource_name": "vm0", 652 | "resource_id": "20d12a8a-ea9a-89c6-5947-83bea959362e", 653 | "id": 1, 654 | "vitrage_id": "ALARM:vitrage:vm0:Machine Suboptimal" 655 | }, 656 | { 657 | "category": "ALARM", 658 | "type": "vitrage", 659 | "name": "Machine Suboptimal", 660 | "state": "Active", 661 | "severity": "WARNING", 662 | "update_timestamp": "2015-12-01T12:46:41Z", 663 | "resource_type": "nova.instance", 664 | "resource_name": "vm1", 665 | "resource_id": "275097cf-954e-8e24-b185-9514e24b8591", 666 | "id": 2, 667 | "vitrage_id": "ALARM:vitrage:vm1:Machine Suboptimal" 668 | } 669 | ], 670 | "links": [ 671 | { 672 | "source": 0, 673 | "target": 1, 674 | "relationship": "causes" 675 | }, 676 | { 677 | "source": 0, 678 | "target": 2, 679 | "relationship": "causes" 680 | } 681 | ], 682 | "multigraph": false, 683 | "inspected_index": 0 684 | } 685 | 686 | 687 | Resources Examples 688 | ------------------ 689 | Note: To see complete usage: 'vitrage help' and 'vitrage help ' 690 | 691 | resource list 692 | ^^^^^^^^^^^^^ 693 | :: 694 | 695 | vitrage resource list 696 | +--------------------------------------+-------------------+--------------------------------------+------------+-------------------------------------------------------------------------------------------------------------------------------+ 697 | | ID | Type | Data Source ID | State | Metadata | 698 | +--------------------------------------+-------------------+--------------------------------------+------------+-------------------------------------------------------------------------------------------------------------------------------+ 699 | | 786efe03-55ff-41b2-bdc1-6cd94bc355ad | nova.instance | f3d6819a-5b52-4fae-93d4-ce58c263510b | SUBOPTIMAL | {'project_id': '4437e14f56904650af9eef83dff35263', 'name': 'vm-0', 'update_timestamp': '2018-01-03 09:06:06.339099+00:00'} | 700 | | d019ee2b-df2a-4c8f-bc59-f28a2296b0db | neutron.network | dafa8864-a04c-4688-bab2-c6dc3ce5c31b | OK | {'project_id': '4437e14f56904650af9eef83dff35263', 'name': 'public', 'update_timestamp': '2017-11-09T09:49:49Z'} | 701 | | 772d627f-90d7-4c5e-8c18-6587fa5b88ee | neutron.port | 75ff8ce5-26d9-4d77-875f-8d297918374c | OK | {'project_id': '4437e14f56904650af9eef83dff35263', 'update_timestamp': '2017-11-28T11:50:23Z'} | 702 | | 4ac47cef-419f-4e4b-9590-22c10bbd21fd | nova.host | compute-0-0 | OK | {'name': 'compute-0-0', 'update_timestamp': '2018-01-03 09:06:06.851229+00:00'} | 703 | | 99920528-2757-4fde-a2a0-3063bf0c4020 | openstack.cluster | OpenStack Cluster | OK | {'name': 'openstack.cluster'} | 704 | | 374203a6-e7bc-4bd6-bc32-1137f4f3d234 | nova.zone | nova | OK | {'name': 'nova', 'update_timestamp': '2018-01-03 09:06:07.628148+00:00'} | 705 | +--------------------------------------+-------------------+--------------------------------------+------------+-------------------------------------------------------------------------------------------------------------------------------+ 706 | 707 | resource show 708 | ^^^^^^^^^^^^^ 709 | :: 710 | 711 | vitrage resource show 786efe03-55ff-41b2-bdc1-6cd94bc355ad 712 | +---------------------------+--------------------------------------+ 713 | | Field | Value | 714 | +---------------------------+--------------------------------------+ 715 | | host_id | compute-0-0 | 716 | | id | f3d6819a-5b52-4fae-93d4-ce58c263510b | 717 | | is_real_vitrage_id | True | 718 | | name | vm-0 | 719 | | project_id | 4437e14f56904650af9eef83dff35263 | 720 | | state | ACTIVE | 721 | | update_timestamp | 2018-01-03 09:06:06.339099+00:00 | 722 | | vitrage_aggregated_state | SUBOPTIMAL | 723 | | vitrage_category | RESOURCE | 724 | | vitrage_id | 786efe03-55ff-41b2-bdc1-6cd94bc355ad | 725 | | vitrage_is_deleted | False | 726 | | vitrage_is_placeholder | False | 727 | | vitrage_operational_state | SUBOPTIMAL | 728 | | vitrage_sample_timestamp | 2018-01-03 09:06:06.339099+00:00 | 729 | | vitrage_state | SUBOPTIMAL | 730 | | vitrage_type | nova.instance | 731 | +---------------------------+--------------------------------------+ 732 | 733 | resource count 734 | ^^^^^^^^^^^^^^ 735 | :: 736 | 737 | vitrage resource count 738 | { 739 | "nova.instance": 394, 740 | "openstack.cluster": 1, 741 | "cinder.volume": 405, 742 | "nova.host": 16, 743 | "neutron.network": 7, 744 | "neutron.port": 1127, 745 | "nova.zone": 3, 746 | "tripleo.controller": 3 747 | } 748 | 749 | vitrage resource count --type nova.instance --group-by state 750 | { 751 | "ACTIVE": 359, 752 | "ERROR": 27, 753 | "SUBOPTIMAL": 8 754 | } 755 | 756 | 757 | Service Examples 758 | ---------------- 759 | Note: To see complete usage: 'vitrage help' and 'vitrage help ' 760 | 761 | service list 762 | ^^^^^^^^^^^^ 763 | 764 | A list of all vitrage services and their status:: 765 | 766 | vitrage service list 767 | +----------------------------------+------------+--------------+---------------------------+ 768 | | Name | Process Id | Hostname | Created At | 769 | +----------------------------------+------------+--------------+---------------------------+ 770 | | ApiWorker worker(0) | 23161 | controller-1 | 2019-02-10T11:07:15+00:00 | 771 | | EvaluatorWorker worker(0) | 23153 | controller-1 | 2019-02-10T11:07:15+00:00 | 772 | | EvaluatorWorker worker(1) | 23155 | controller-1 | 2019-02-10T11:07:15+00:00 | 773 | | EvaluatorWorker worker(2) | 23157 | controller-1 | 2019-02-10T11:07:15+00:00 | 774 | | EvaluatorWorker worker(3) | 23158 | controller-1 | 2019-02-10T11:07:15+00:00 | 775 | | MachineLearningService worker(0) | 23366 | controller-1 | 2019-02-10T11:07:33+00:00 | 776 | | PersistorService worker(0) | 23475 | controller-1 | 2019-02-10T11:07:35+00:00 | 777 | | SnmpParsingService worker(0) | 23164 | controller-1 | 2019-02-10T11:07:15+00:00 | 778 | | vitrageuWSGI worker 1 | 25698 | controller-1 | 2019-02-10T11:14:30+00:00 | 779 | | vitrageuWSGI worker 2 | 25699 | controller-1 | 2019-02-10T11:14:30+00:00 | 780 | | VitrageNotifierService worker(0) | 23352 | controller-1 | 2019-02-10T11:07:32+00:00 | 781 | +----------------------------------+------------+--------------+---------------------------+ 782 | 783 | 784 | Alarms Examples 785 | --------------- 786 | Note: To see complete usage: 'vitrage help' and 'vitrage help ' 787 | 788 | alarm list 789 | ^^^^^^^^^^ 790 | 791 | A list of all alarms (default limit of 1000 alarms):: 792 | 793 | vitrage alarm list 794 | +--------------------------------------+---------+----------------------------------------+---------------+--------------------------------------+----------+----------------------+ 795 | | ID | Type | Name | Resource Type | Resource ID | Severity | Update Time | 796 | +--------------------------------------+---------+----------------------------------------+---------------+--------------------------------------+----------+----------------------+ 797 | | f85ed0d2-3e28-47f9-9231-6fa72d6c882d | vitrage | VM network problem 3 | nova.instance | 786efe03-55ff-41b2-bdc1-6cd94bc355ad | CRITICAL | 2018-01-03T07:52:06Z | 798 | | 868b252a-4053-431c-a6d3-7cdabd91edd8 | zabbix | Lack of free swap space on compute-0-0 | nova.host | 4ac47cef-419f-4e4b-9590-22c10bbd21fd | WARNING | 2017-11-09T11:24:30Z | 799 | | c1ab17d4-8b6b-4d12-a4ec-3150bb89a5a5 | zabbix | Too many processes on compute-0-0 | nova.host | 4ac47cef-419f-4e4b-9590-22c10bbd21fd | WARNING | 2017-11-09T11:25:12Z | 800 | | 7468b7f5-5a89-49ee-b408-3cfafd68290a | zabbix | Public interface down on compute-0-0 | nova.host | 4ac47cef-419f-4e4b-9590-22c10bbd21fd | CRITICAL | 2017-12-13T07:34:08Z | 801 | | 608366ed-a737-4aab-a58f-8673a589e3aa | vitrage | VM network problem 2 | nova.instance | 786efe03-55ff-41b2-bdc1-6cd94bc355ad | CRITICAL | 2018-01-03T07:52:06Z | 802 | +--------------------------------------+---------+----------------------------------------+---------------+--------------------------------------+----------+----------------------+ 803 | 804 | A list of all alarms on the given resource:: 805 | 806 | vitrage alarm list 52b466ba-ef98-4bf5-93d8-5c3ca680fe01 807 | +--------------------------------------+---------+---------------+---------------+--------------------------------------+----------+----------------------+ 808 | | ID | Type | Name | Resource Type | Resource ID | Severity | Update Time | 809 | +--------------------------------------+---------+---------------+---------------+--------------------------------------+----------+----------------------+ 810 | | 3c1dda08-2c95-49f1-9155-35e5512a6f38 | vitrage | Instance down | nova.instance | 52b466ba-ef98-4bf5-93d8-5c3ca680fe01 | CRITICAL | 2018-07-22T11:42:57Z | 811 | +--------------------------------------+---------+---------------+---------------+--------------------------------------+----------+----------------------+ 812 | 813 | A list of ``limit`` number of alarms:: 814 | 815 | vitrage alarm list --limit 2 816 | +--------------------------------------+---------+---------------+---------------+--------------------------------------+----------+----------------------------+ 817 | | ID | Type | Name | Resource Type | Resource ID | Severity | Update Time | 818 | +--------------------------------------+---------+---------------+---------------+--------------------------------------+----------+----------------------------+ 819 | | f85ed0d2-3e28-47f9-9231-6fa72d6c882d | vitrage | Instance down | nova.instance | 52b466ba-ef98-4bf5-93d8-5c3ca680fe01 | CRITICAL | 2018-07-19 14:53:24.741108 | 820 | | 868b252a-4053-431c-a6d3-7cdabd91edd8 | vitrage | Instance down | nova.instance | 4ac47cef-419f-4e4b-9590-22c10bbd21fd | CRITICAL | 2018-07-19 14:53:24.773490 | 821 | +--------------------------------------+---------+---------------+---------------+--------------------------------------+----------+----------------------------+ 822 | 823 | Paging. Get next alarms, from ``marker`` which is a vitrage_id:: 824 | 825 | vitrage alarm list --limit 2 --marker 868b252a-4053-431c-a6d3-7cdabd91edd8 826 | +--------------------------------------+---------+---------------+---------------+--------------------------------------+----------+----------------------------+ 827 | | ID | Type | Name | Resource Type | Resource ID | Severity | Update Time | 828 | +--------------------------------------+---------+---------------+---------------+--------------------------------------+----------+----------------------------+ 829 | | c1ab17d4-8b6b-4d12-a4ec-3150bb89a5a5 | vitrage | Instance down | nova.instance | 52b466ba-ef98-4bf5-93d8-5c3ca680fe01 | CRITICAL | 2018-07-19 14:53:24.801490 | 830 | | 7468b7f5-5a89-49ee-b408-3cfafd68290a | vitrage | Instance down | nova.instance | 4ac47cef-419f-4e4b-9590-22c10bbd21fd | CRITICAL | 2018-07-19 14:53:24.828359 | 831 | +--------------------------------------+---------+---------------+---------------+--------------------------------------+----------+----------------------------+ 832 | 833 | alarm history 834 | ^^^^^^^^^^^^^ 835 | 836 | A list of all alarms that were active during the time frame of ``start`` and ``end``:: 837 | 838 | vitrage alarm history --start '2018-07-22 14:10:40.087709' --end '2018-07-23 16:10:41.354102' --limit 3 839 | +--------------------------------------+---------+---------------+---------------+--------------------------------------+----------+----------------------------+----------------------------+ 840 | | ID | Type | Name | Resource Type | Resource ID | Severity | Start Time | End Time | 841 | +--------------------------------------+---------+---------------+---------------+--------------------------------------+----------+----------------------------+----------------------------+ 842 | | f85ed0d2-3e28-47f9-9231-6fa72d6c882d | vitrage | Instance down | nova.instance | 4ac47cef-419f-4e4b-9590-22c10bbd21fd | CRITICAL | 2018-07-19 14:53:24.741108 | 2018-07-22 14:53:24.741108 | 843 | | 868b252a-4053-431c-a6d3-7cdabd91edd8 | vitrage | Instance down | nova.instance | 786efe03-55ff-41b2-bdc1-6cd94bc355ad | CRITICAL | 2018-07-19 14:53:24.773490 | | 844 | | c1ab17d4-8b6b-4d12-a4ec-3150bb89a5a5 | vitrage | Instance down | nova.instance | 52b466ba-ef98-4bf5-93d8-5c3ca680fe01 | CRITICAL | 2018-07-23 02:10:41.354102 | 845 | +--------------------------------------+---------+---------------+---------------+--------------------------------------+----------+----------------------------+----------------------------+ 846 | 847 | alarm show 848 | ^^^^^^^^^^ 849 | :: 850 | 851 | vitrage alarm show f85ed0d2-3e28-47f9-9231-6fa72d6c882d 852 | +------------------------------+--------------------------------------+ 853 | | Field | Value | 854 | +------------------------------+--------------------------------------+ 855 | | name | VM network problem 3 | 856 | | resource_id | 786efe03-55ff-41b2-bdc1-6cd94bc355ad | 857 | | severity | critical | 858 | | state | Active | 859 | | update_timestamp | 2018-01-03T07:52:06Z | 860 | | vitrage_aggregated_severity | CRITICAL | 861 | | vitrage_category | ALARM | 862 | | vitrage_id | f85ed0d2-3e28-47f9-9231-6fa72d6c882d | 863 | | vitrage_is_deleted | False | 864 | | vitrage_is_placeholder | False | 865 | | vitrage_operational_severity | CRITICAL | 866 | | vitrage_resource_id | 786efe03-55ff-41b2-bdc1-6cd94bc355ad | 867 | | vitrage_resource_type | nova.instance | 868 | | vitrage_sample_timestamp | 2018-01-03 07:52:06.306507+00:00 | 869 | | vitrage_type | vitrage | 870 | +------------------------------+--------------------------------------+ 871 | 872 | alarm count 873 | ^^^^^^^^^^^ 874 | :: 875 | 876 | vitrage alarm count 877 | 878 | { 879 | "WARNING": 2, 880 | "SEVERE": 0, 881 | "CRITICAL": 7, 882 | "OK": 0, 883 | "N/A": 0 884 | } 885 | 886 | 887 | Template Examples 888 | ----------------- 889 | **Note:** for templates version 2 --type