diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 105cfe1..0000000 --- a/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -.build/ -zabbix_monitoring*.noarch.rpm -repositories/centos/*.rpm -repositories/ubuntu/*.deb -repositories/ubuntu/*/*.deb -.bundled_gems/ -.bundle/ -Gemfile.lock -.tox/ diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 68c771a..0000000 --- a/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - diff --git a/README.md b/README.md deleted file mode 100644 index fba67ec..0000000 --- a/README.md +++ /dev/null @@ -1,76 +0,0 @@ -Zabbix Plugin for Fuel -======================= - -Zabbix plugin --------------- - -Zabbix plugin for Fuel extends Mirantis OpenStack functionality by adding -Zabbix monitoring system. It installs Zabbix server, frontend and agent -components. The plugin configures Zabbix by adding templates to monitor nodes -and OpenStack services and APIs. - -Requirements ------------- - -| Requirement | Version/Comment | -|:---------------------------------|:------------------------------| -| Mirantis OpenStack compatibility | 7.0, 8.0, 9.0, 9.1, 9.2, 10.0 | - -Installation Guide -================== - -Zabbix plugin installation ---------------------------- - -To install Zabbix plugin, follow these steps: - -1. Download the plugin from - [Fuel Plugins Catalog](https://software.mirantis.com/fuel-plugins) - -2. Copy the plugin on already installed Fuel Master node; ssh can be used for - that. If you do not have the Fuel Master node yet, see - [Quick Start Guide](https://software.mirantis.com/quick-start/) : - - # scp zabbix_monitoring-.noarch.rpm root@:/tmp - -3. Install the plugin: - - # cd /tmp - # fuel plugins --install zabbix_monitoring-.noarch.rpm - -4. Check if the plugin was installed successfully: - - # fuel plugins - id | name | version | package_version - ---|-------------------|---------|---------------- - 1 | zabbix_monitoring | 2.5.3 | 3.0.0 - -For further details see the Zabbix Plugin Guide in the -[Fuel Plugins Catalog](https://software.mirantis.com/fuel-plugins) - -Zabbix plugin configuration ----------------------------- - -1. Create an environment. -2. Enable the plugin on the Settings tab of the Fuel web UI. -3. Optionally, change values in the form: - * username/password - access credentials for Zabbix Administrator - * database password - password for Zabbix database in MySQL -4. Deploy the environment. -5. Zabbix frontend is available at: http:///zabbix - -For more information and instructions, see the Zabbix Plugin Guide in the -[Fuel Plugins Catalog](https://software.mirantis.com/fuel-plugins) - - -Contributors ------------- - -Dmitry Klenov (PM) -Piotr Misiak (developer) -Szymon Bańka (developer) -Bartosz Kupidura (developer) -Alexander Zatserklyany (QA engineer) -Maciej Relewicz (developer) -Swann Croiset (developer) -Olivier Bourdon (developer) diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..86e34d6 --- /dev/null +++ b/README.rst @@ -0,0 +1,10 @@ +This project is no longer maintained. + +The contents of this repository are still available in the Git +source code management system. To see the contents of this +repository before it reached its end of life, please check out the +previous commit with "git checkout HEAD^1". + +For any further questions, please email +openstack-discuss@lists.openstack.org or join #openstack-dev on +Freenode. diff --git a/deployment_scripts/puppet/manifests/Gemfile b/deployment_scripts/puppet/manifests/Gemfile deleted file mode 100644 index b6bab59..0000000 --- a/deployment_scripts/puppet/manifests/Gemfile +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -source 'https://rubygems.org' - -group :development, :test do - gem 'rake' - gem "puppet", ENV['PUPPET_VERSION'] || '~> 3.4.0' - gem 'puppetlabs_spec_helper' - gem 'puppet-lint' -end diff --git a/deployment_scripts/puppet/manifests/Rakefile b/deployment_scripts/puppet/manifests/Rakefile deleted file mode 100644 index c124220..0000000 --- a/deployment_scripts/puppet/manifests/Rakefile +++ /dev/null @@ -1,13 +0,0 @@ -require 'puppet-lint/tasks/puppet-lint' -require 'puppet-syntax/tasks/puppet-syntax' - -PuppetLint.configuration.fail_on_warnings = true -PuppetLint.configuration.send('disable_80chars') -PuppetLint.configuration.send('disable_class_inherits_from_params_class') -PuppetLint.configuration.send('disable_class_parameter_defaults') - -desc "Run lint, and syntax tests." -task :test => [ - :lint, - :syntax, -] diff --git a/deployment_scripts/puppet/manifests/agent.pp b/deployment_scripts/puppet/manifests/agent.pp deleted file mode 100644 index 1f8603e..0000000 --- a/deployment_scripts/puppet/manifests/agent.pp +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -notice('fuel-plugin-external-zabbix: agent.pp') - -$fuel_version = 0 + hiera('fuel_version') -$network_metadata = hiera_hash('network_metadata') -$primary_controller_nodes = get_nodes_hash_by_roles($network_metadata, ['primary-controller']) -$controllers = get_nodes_hash_by_roles($network_metadata, ['primary-controller', 'controller']) -$controller_internal_addresses = get_node_to_ipaddr_map_by_network_role($controllers, 'management') -$controller_nodes = ipsort(values($controller_internal_addresses)) -$uid = hiera('uid') -$node_hostname = "node-${uid}" -$hostinfo = $network_metadata['nodes'][$node_hostname] -$netinfo = $hostinfo['network_roles'] -$internal_address = $netinfo['management'] -$public_address = $netinfo['ex'] -$swift_address = $netinfo['storage'] - -if $fuel_version < 8.0 { - $cur_node_roles = node_roles(hiera_array('nodes'), hiera('uid')) - $is_base_os = member($cur_node_roles, 'base-os') - $is_virt = member($cur_node_roles, 'virt') - $is_controller = member($cur_node_roles, 'controller') or - member($cur_node_roles, 'primary-controller') - $roles_nb = size($cur_node_roles) -} else { - $is_base_os = roles_include(['base-os']) - $is_virt = roles_include(['virt']) - $is_controller = roles_include(['controller', 'primary-controller']) - $roles_nb = size($network_metadata['nodes'][$node_hostname]['node_roles']) -} - -class { 'plugin_zabbix::monitoring': - server_ips => $controller_nodes, - roles_nb => $roles_nb, - has_role_baseos => $is_base_os, - has_role_virt => $is_virt, - has_role_controller => $is_controller, -} diff --git a/deployment_scripts/puppet/manifests/cleanup_apt_config.pp b/deployment_scripts/puppet/manifests/cleanup_apt_config.pp deleted file mode 100644 index dec49ad..0000000 --- a/deployment_scripts/puppet/manifests/cleanup_apt_config.pp +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2016 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -notice('fuel-plugin-external-zabbix: cleanup_apt_config.pp') - -case $::osfamily { - 'Debian': { - file { '/etc/apt/apt.conf.d/99norecommends': - ensure => absent, - } - } - default: { - # Currently only Debian like distributions need specific configuration. - } -} diff --git a/deployment_scripts/puppet/manifests/configure_apt.pp b/deployment_scripts/puppet/manifests/configure_apt.pp deleted file mode 100644 index 251e099..0000000 --- a/deployment_scripts/puppet/manifests/configure_apt.pp +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 2016 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -notice('fuel-plugin-external-zabbix: configure_apt.pp') - -$str = 'APT::Install-Suggests "0"; -APT::Install-Recommends "0"; -' - -case $::osfamily { - 'Debian': { - file { '/etc/apt/apt.conf.d/99norecommends': - ensure => file, - content => $str, - } - } - default: { - # Currently only Debian like distributions need specific configuration. - } -} - -$fuel_version = 0 + hiera('fuel_version') -if $fuel_version < 8.0 { - $cur_node_roles = node_roles(hiera_array('nodes'), hiera('uid')) - $is_controller = member($cur_node_roles, 'controller') or - member($cur_node_roles, 'primary-controller') -} else { - $is_controller = roles_include(['controller', 'primary-controller']) -} - -if $is_controller { - # The OCF script should exist before any node tries to configure the - # Zabbix with Pacemaker. This is why it is shipped by this manifest. - file { 'zabbix-server-ocf' : - ensure => present, - path => '/usr/lib/ocf/resource.d/fuel/zabbix-server', - mode => '0755', - owner => 'root', - group => 'root', - source => 'puppet:///modules/plugin_zabbix/zabbix-server.ocf', - } -} diff --git a/deployment_scripts/puppet/manifests/controller.pp b/deployment_scripts/puppet/manifests/controller.pp deleted file mode 100644 index 9d94c90..0000000 --- a/deployment_scripts/puppet/manifests/controller.pp +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -notice('fuel-plugin-external-zabbix: controller.pp') - -include plugin_zabbix::controller diff --git a/deployment_scripts/puppet/manifests/override_configuration.pp b/deployment_scripts/puppet/manifests/override_configuration.pp deleted file mode 100644 index fdc159e..0000000 --- a/deployment_scripts/puppet/manifests/override_configuration.pp +++ /dev/null @@ -1,10 +0,0 @@ -notice('zabbix_monitoring/override_configuration') - -file { '/etc/hiera/plugins/zabbix_monitoring.yaml': - ensure => present, - content => template('plugin_zabbix/config_override.erb'), - owner => root, - group => root, - mode => '0644', -} - diff --git a/deployment_scripts/puppet/manifests/primary_controller.pp b/deployment_scripts/puppet/manifests/primary_controller.pp deleted file mode 100644 index d8fa485..0000000 --- a/deployment_scripts/puppet/manifests/primary_controller.pp +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -notice('fuel-plugin-external-zabbix: primary_controller.pp') - -include plugin_zabbix::primary_controller diff --git a/deployment_scripts/puppet/manifests/zabbix_server_config.pp b/deployment_scripts/puppet/manifests/zabbix_server_config.pp deleted file mode 100644 index 452ee2c..0000000 --- a/deployment_scripts/puppet/manifests/zabbix_server_config.pp +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -notice('fuel-plugin-external-zabbix: zabbix_server_config.pp') - -include plugin_zabbix::server::config diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/AUTHORS.txt b/deployment_scripts/puppet/modules/plugin_zabbix/AUTHORS.txt deleted file mode 100644 index b8f5d0c..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/AUTHORS.txt +++ /dev/null @@ -1,6 +0,0 @@ -Damian Szeluga -Kamil Swiatkowski -Szymon Banka -Tomasz 'Zen' Napierala -Dmitry Nikishov -Piotr Misiak diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/Gemfile b/deployment_scripts/puppet/modules/plugin_zabbix/Gemfile deleted file mode 100644 index 0cbd9c1..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/Gemfile +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -source 'https://rubygems.org' - -group :development, :test do - gem 'rake' - gem "puppet", ENV['PUPPET_VERSION'] || '~> 3.4.0' - gem 'puppetlabs_spec_helper' - gem 'puppet-lint' -end - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/Rakefile b/deployment_scripts/puppet/modules/plugin_zabbix/Rakefile deleted file mode 100644 index d18b786..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/Rakefile +++ /dev/null @@ -1,17 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' -require 'puppet-syntax/tasks/puppet-syntax' - -PuppetLint.configuration.fail_on_warnings = true -PuppetLint.configuration.send('disable_80chars') -PuppetLint.configuration.send('disable_class_inherits_from_params_class') -PuppetLint.configuration.send('disable_class_parameter_defaults') -PuppetLint.configuration.send('disable_autoloader_layout') - -desc "Run lint, and syntax and spec tests." -task :test => [ - :lint, - :syntax, - :spec, -] - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Screens_Ceph_Cluster.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Screens_Ceph_Cluster.xml deleted file mode 100644 index 3c29ddf..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Screens_Ceph_Cluster.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - 2.0 - 2015-10-30T15:18:12Z - - - Ceph - 2 - 2 - - - 0 - 500 - 100 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - - - 0 - 0 - - PG breakdown by state - CephCluster - - 3 - - - - 0 - 500 - 100 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - - - 0 - 0 - - PG number vs Object number - CephCluster - - 3 - - - - 0 - 500 - 100 - 1 - 0 - 1 - 1 - 0 - 0 - 0 - - - 0 - 0 - - Storage capacity - CephCluster - - 3 - - - - 0 - 500 - 100 - 0 - 1 - 1 - 1 - 0 - 0 - 0 - - - 0 - 0 - - OSD breakdown by state - CephCluster - - 3 - - - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Screens_OpenStack_Cluster.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Screens_OpenStack_Cluster.xml deleted file mode 100644 index d62072a..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Screens_OpenStack_Cluster.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - 2.0 - 2014-12-10T10:36:40Z - - - Openstack Cluster - 2 - 3 - - - 0 - 500 - 100 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - - - 0 - 0 - - Cluster CPU Load - OpenStackCluster - - - - - 0 - 500 - 100 - 0 - 1 - 1 - 1 - 0 - 0 - 0 - - - 0 - 0 - - CPUs in Cluster - OpenStackCluster - - - - - 0 - 500 - 100 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - - - 0 - 0 - - RAM in Cluster - OpenStackCluster - - - - - 13 - 500 - 100 - 1 - 0 - 1 - 1 - 10 - 0 - 0 - - - 0 - 0 - 0 - - - - 0 - 500 - 100 - 0 - 2 - 1 - 1 - 0 - 0 - 0 - - - 0 - 0 - - Number of instances - OpenStackCluster - - - - - 0 - 500 - 100 - 1 - 2 - 1 - 1 - 0 - 0 - 0 - - - 0 - 0 - - Openstack Offline Services - OpenStackCluster - - - - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_HAProxy.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_HAProxy.xml deleted file mode 100644 index ae72ab7..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_HAProxy.xml +++ /dev/null @@ -1,1644 +0,0 @@ - - - 2.0 - 2013-07-31T09:48:06Z - - - Load Balancers - - - Templates - - - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_Iptables_Stats.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_Iptables_Stats.xml deleted file mode 100644 index f355321..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_Iptables_Stats.xml +++ /dev/null @@ -1,482 +0,0 @@ - - - 2.0 - 2013-07-10T21:14:51Z - - - Templates - - - - - - - - FLUX - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 1 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 3 - 1 - 00CC00 - 1 - 2 - 0 - - Template App Iptables Stats - iptstate.udp - - - - 2 - 1 - FFFF00 - 1 - 2 - 0 - - Template App Iptables Stats - iptstate.icmp - - - - 1 - 1 - FF3333 - 1 - 2 - 0 - - Template App Iptables Stats - iptstate.other - - - - 4 - 1 - 0000CC - 1 - 2 - 0 - - Template App Iptables Stats - iptstate.tcp - - - - - - TCP - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 1 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 1 - 1 - 0000CC - 1 - 2 - 0 - - Template App Iptables Stats - iptstate.tcp.established - - - - 3 - 1 - FFFF00 - 1 - 2 - 0 - - Template App Iptables Stats - iptstate.tcp.syn - - - - 2 - 1 - 009999 - 1 - 2 - 0 - - Template App Iptables Stats - iptstate.tcp.timewait - - - - 4 - 1 - 666666 - 1 - 2 - 0 - - Template App Iptables Stats - iptstate.tcp.close - - - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_Memcache.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_Memcache.xml deleted file mode 100644 index 902e60c..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_Memcache.xml +++ /dev/null @@ -1,1294 +0,0 @@ - - - 2.0 - 2013-07-16T21:38:19Z - - - Templates - - - - - - - - {Template App Memcache:proc.num[memcached,,,].last(0)}=0 - Memcached process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App Memcache:net.tcp.service[tcp,{$IP_MANAGEMENT},11211].last(0)}=0 - Memcache service is down on {HOSTNAME} - - 0 - 4 - - 0 - - - - - - Connections per second - 900 - 200 - 0.0000 - 100.0000 - 0 - 0 - 0 - 1 - 0 - 0.0000 - 0.0000 - 1 - 0 - 0 - 0 - - - 0 - 2 - 009900 - 0 - 2 - 0 - - Template App Memcache - memcache[total_connections] - - - - - - Current items - 900 - 200 - 0.0000 - 100.0000 - 0 - 0 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 2 - 009900 - 0 - 2 - 0 - - Template App Memcache - memcache[curr_items] - - - - - - Current open connections - 900 - 200 - 0.0000 - 100.0000 - 0 - 0 - 0 - 1 - 0 - 0.0000 - 0.0000 - 1 - 0 - 0 - 0 - - - 0 - 2 - 009900 - 0 - 2 - 0 - - Template App Memcache - memcache[curr_connections] - - - - - - Evictions - 900 - 200 - 0.0000 - 100.0000 - 0 - 0 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 2 - 990000 - 0 - 2 - 0 - - Template App Memcache - memcache[evictions] - - - - - - Items per second - 900 - 200 - 0.0000 - 100.0000 - 0 - 0 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 2 - 009900 - 0 - 2 - 0 - - Template App Memcache - memcache[total_items] - - - - - - Network traffic - 900 - 200 - 0.0000 - 100.0000 - 0 - 0 - 0 - 1 - 0 - 0.0000 - 0.0000 - 1 - 0 - 0 - 0 - - - 0 - 2 - 009900 - 0 - 2 - 0 - - Template App Memcache - memcache[bytes_read] - - - - 1 - 2 - 990000 - 0 - 2 - 0 - - Template App Memcache - memcache[bytes_written] - - - - - - Requests per second - 900 - 200 - 0.0000 - 100.0000 - 0 - 0 - 0 - 1 - 0 - 0.0000 - 0.0000 - 1 - 0 - 0 - 0 - - - 0 - 2 - 009900 - 0 - 2 - 0 - - Template App Memcache - memcache[cmd_get] - - - - 1 - 2 - 990000 - 0 - 2 - 0 - - Template App Memcache - memcache[cmd_set] - - - - - - Resource usage - 900 - 200 - 0.0000 - 100.0000 - 0 - 0 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 2 - 009900 - 0 - 2 - 0 - - Template App Memcache - memcache[rusage_user] - - - - 1 - 2 - 000099 - 0 - 2 - 0 - - Template App Memcache - memcache[rusage_system] - - - - - - Retrieval hit and miss per second - 900 - 200 - 0.0000 - 100.0000 - 0 - 0 - 0 - 1 - 0 - 0.0000 - 0.0000 - 1 - 0 - 0 - 0 - - - 0 - 2 - 009900 - 0 - 2 - 0 - - Template App Memcache - memcache[get_hits] - - - - 1 - 2 - 990000 - 0 - 2 - 0 - - Template App Memcache - memcache[get_misses] - - - - - - Storage usage - 900 - 200 - 0.0000 - 0.0000 - 0 - 0 - 0 - 1 - 0 - 0.0000 - 0.0000 - 1 - 0 - 0 - 0 - - - 0 - 1 - 009900 - 0 - 2 - 0 - - Template App Memcache - memcache[limit_maxbytes] - - - - 1 - 1 - 990000 - 0 - 2 - 0 - - Template App Memcache - memcache[bytes] - - - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceilometer.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceilometer.xml deleted file mode 100644 index f8003b0..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceilometer.xml +++ /dev/null @@ -1,430 +0,0 @@ - - - 2.0 - 2014-05-23T15:04:32Z - - - Templates - - - - - - - - {Template App OpenStack Ceilometer:proc.num[,ceilometer,,bin/python.*bin/ceilometer-agent-central].last(0)}=0 & {Template App OpenStack Ceilometer:crm.node.check[p_openstack-ceilometer-agent-central].last(0)}=1 - Ceilometer Alarm Agent Central service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Ceilometer:proc.num[,ceilometer,,bin/python.*bin/ceilometer-alarm-evaluator].last(0)}=0 & {Template App OpenStack Ceilometer:crm.node.check[p_openstack-ceilometer-alarm-evaluator].last(0)}=1 - Ceilometer Alarm Alarm Evaluator service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Ceilometer:proc.num[,ceilometer,,bin/python.*bin/ceilometer-alarm-notifier].last(0)}=0 - Ceilometer Alarm Notifier service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Ceilometer:proc.num[,ceilometer,,bin/python.*bin/ceilometer-api].last(0)}=0 - Ceilometer API Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Ceilometer:net.tcp.service[http,{$IP_MANAGEMENT},8777].last()}=0 - Ceilometer API Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Ceilometer:proc.num[,ceilometer,,bin/python.*bin/ceilometer-collector].last(0)}=0 - Ceilometer Collector service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceilometer_Compute.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceilometer_Compute.xml deleted file mode 100644 index 48beb44..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceilometer_Compute.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - 2.0 - 2014-06-27T08:32:31Z - - - Templates - - - - - - - - {Template App OpenStack Ceilometer Compute:proc.num[,ceilometer,,bin/python.*bin/ceilometer-agent-compute].last(0)}=0 - Ceilometer Agent Compute service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph.xml deleted file mode 100644 index a057a88..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - 2.0 - 2014-12-04T13:12:00Z - - - Templates - - - - - - - - {Template App OpenStack Ceph:ceph.health.last(0)}=0 - Ceph health is not OK from {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph_MON.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph_MON.xml deleted file mode 100644 index e07a538..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph_MON.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-02-25T14:34:53Z - - - Templates - - - - - - - - {Template App OpenStack Ceph MON:proc.num[,,,/usr/bin/ceph-mon].last(0)}=0 - Ceph MON is not running on {HOSTNAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph_OSD.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph_OSD.xml deleted file mode 100644 index 394656a..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph_OSD.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2015-10-26T16:42:00Z - - - Templates - - - - - - - - {Template App OpenStack Ceph OSD:proc.num[,,,/usr/bin/ceph-osd].last(0)}=0 - Ceph OSD process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Cinder_API.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Cinder_API.xml deleted file mode 100644 index 347a2d0..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Cinder_API.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - 2.0 - 2013-07-10T21:15:29Z - - - Templates - - - - - - - - {Template App OpenStack Cinder API:proc.num[,cinder,,bin/python.*bin/cinder-api].last(0)}=0 - Cinder API Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Cinder API:net.tcp.service[http,{$IP_MANAGEMENT},8776].last(0)}=0 - Cinder API Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Cinder_API_check.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Cinder_API_check.xml deleted file mode 100644 index 2ce06bb..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Cinder_API_check.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-10T21:15:49Z - - - Templates - - - - - - - - {Template App OpenStack Cinder API check:cinder.api.status.last(0)}=0 - Cinder API test failed - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Cinder_Scheduler.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Cinder_Scheduler.xml deleted file mode 100644 index 4244974..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Cinder_Scheduler.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-10T21:16:07Z - - - Templates - - - - - - - - {Template App OpenStack Cinder Scheduler:proc.num[,cinder,,bin/python.*bin/cinder-scheduler].last(0)}=0 - Cinder Scheduler process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Cinder_Volume.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Cinder_Volume.xml deleted file mode 100644 index bed6d7f..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Cinder_Volume.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - 2.0 - 2014-12-11T12:22:08Z - - - Templates - - - - - - - - {Template App OpenStack Cinder Volume:proc.num[,cinder,,bin/python.*bin/cinder-volume].last(0)}=0 - Cinder Volume process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Glance_API.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Glance_API.xml deleted file mode 100644 index 0873952..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Glance_API.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - 2.0 - 2013-07-10T21:16:32Z - - - Templates - - - - - - - - {Template App OpenStack Glance API:proc.num[,glance,,bin/python.*bin/glance-api].last(0)}=0 - Glance API Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Glance API:net.tcp.service[http,{$IP_MANAGEMENT},9292].last(0)}=0 - Glance API Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Glance_API_check.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Glance_API_check.xml deleted file mode 100644 index be5f590..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Glance_API_check.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-10T21:16:53Z - - - Templates - - - - - - - - {Template App OpenStack Glance API check:glance.api.status.last(0)}=0 - Glance API test failed on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Glance_Registry.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Glance_Registry.xml deleted file mode 100644 index 095ce29..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Glance_Registry.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - 2.0 - 2013-07-10T21:17:07Z - - - Templates - - - - - - - - {Template App OpenStack Glance Registry:proc.num[,glance,,bin/python.*bin/glance-registry].last(0)}=0 - Glance Registry Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Glance Registry:net.tcp.service[http,{$IP_MANAGEMENT},9191].last(0)}=0 - Glance Registry Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Horizon.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Horizon.xml deleted file mode 100644 index 7a30a69..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Horizon.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - 2.0 - 2013-07-10T21:17:23Z - - - Templates - - - - - - - - {Template App OpenStack Horizon:proc.num[,{$APACHE_USER},,/usr/sbin/{$APACHE_NAME}].last(0)}=0 - Horizon HTTP Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Horizon:net.tcp.service[http,{$IP_MANAGEMENT},80].last(0)}=0 - Horizon HTTP Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Horizon:net.tcp.service[https,{$IP_MANAGEMENT},443].last(0)}=0 - Horizon HTTPS Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Keystone.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Keystone.xml deleted file mode 100644 index 1bd378b..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Keystone.xml +++ /dev/null @@ -1,230 +0,0 @@ - - - 2.0 - 2013-07-10T21:17:37Z - - - Templates - - - - - - - - {Template App OpenStack Keystone:net.tcp.service[http,{$IP_MANAGEMENT},35357].last(0)}=0 - Keystone Admin API Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Keystone:net.tcp.service[http,{$IP_MANAGEMENT},5000].last(0)}=0 - Keystone API Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Keystone:proc.num[,keystone,,keystone-main].last(0)}=0 - Keystone Main Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Keystone:proc.num[,keystone,,keystone-admin].last(0)}=0 - Keystone Admin Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Keystone_API_check.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Keystone_API_check.xml deleted file mode 100644 index 4d7b36a..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Keystone_API_check.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - 2.0 - 2013-07-10T21:17:50Z - - - Templates - - - - - - - - {Template App OpenStack Keystone API check:keystone.api.status.last(0)}=0 - Keystone API test failed on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Keystone API check:keystone.service.api.status.last(0)}=0 - Keystone Service API test failed on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Libvirt.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Libvirt.xml deleted file mode 100644 index f06e6cc..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Libvirt.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-10T21:18:03Z - - - Templates - - - - - - - - {Template App OpenStack Libvirt:proc.num[libvirtd,root,,].last(0)}=0 - Libvirtd process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_API_check.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_API_check.xml deleted file mode 100644 index 4b632cc..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_API_check.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-10T21:19:34Z - - - Templates - - - - - - - - {Template App OpenStack Neutron API check:neutron.api.status.last(0)}=0 - Neutron API test failed on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_DHCP_Agent.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_DHCP_Agent.xml deleted file mode 100644 index ff82e75..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_DHCP_Agent.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - 2.0 - 2014-05-23T08:33:55Z - - - Templates - - - - - - - - {Template App OpenStack Neutron DHCP Agent:proc.num[,neutron,,bin/python.*bin/neutron-dhcp-agent].last(0)}=0 - Neutron DHCP Agent process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_L3_Agent.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_L3_Agent.xml deleted file mode 100644 index b4d6f28..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_L3_Agent.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - 2.0 - 2014-05-23T08:53:02Z - - - Templates - - - - - - - - {Template App OpenStack Neutron L3 Agent:proc.num[,neutron,,bin/python.*bin/neutron-l3-agent].last(0)}=0 - Neutron L3 Agent process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_Metadata_Agent.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_Metadata_Agent.xml deleted file mode 100644 index 689c7b1..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_Metadata_Agent.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-15T21:42:33Z - - - Templates - - - - - - - - {Template App OpenStack Neutron Metadata Agent:proc.num[,neutron,,bin/python.*bin/neutron-metadata-agent].last(0)}=0 - Neutron Metadata Agent process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_OVS_Agent.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_OVS_Agent.xml deleted file mode 100644 index d8ca9bf..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_OVS_Agent.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-15T21:42:33Z - - - Templates - - - - - - - - {Template App OpenStack Neutron OVS Agent:proc.num[,neutron,,bin/python.*bin/neutron-openvswitch-agent].last(0)}=0 - Neutron OVS Agent process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_Server.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_Server.xml deleted file mode 100644 index 5d362c8..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Neutron_Server.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - 2.0 - 2014-04-24T19:16:37Z - - - Templates - - - - - - - - {Template App OpenStack Neutron Server:proc.num[,neutron,,bin/python.*bin/neutron-server].last(0)}=0 - Neutron Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Neutron Server:net.tcp.service[http,{$IP_MANAGEMENT},9696].last(0)}=0 - Neutron Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API.xml deleted file mode 100644 index 4596db6..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-10T21:18:18Z - - - Templates - - - - - - - - {Template App OpenStack Nova API:proc.num[,nova,,bin/python.*bin/nova-api].last(0)}=0 - Nova API process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API_EC2.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API_EC2.xml deleted file mode 100644 index 2153a0a..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API_EC2.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-10T21:18:30Z - - - Templates - - - - - - - - {Template App OpenStack Nova API EC2:net.tcp.service[http,{$IP_MANAGEMENT},8773].last(0)}=0 - Nova API EC2 Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API_Metadata.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API_Metadata.xml deleted file mode 100644 index 717b25c..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API_Metadata.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-10T21:18:50Z - - - Templates - - - - - - - - {Template App OpenStack Nova API Metadata:net.tcp.service[http,{$IP_MANAGEMENT},8775].last(0)}=0 - Nova API Metadata Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API_OSAPI.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API_OSAPI.xml deleted file mode 100644 index 4a5b793..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API_OSAPI.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-10T21:19:04Z - - - Templates - - - - - - - - {Template App OpenStack Nova API OSAPI:net.tcp.service[http,{$IP_MANAGEMENT},8774].last(0)}=0 - Nova API OSAPI Compute Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API_OSAPI_check.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API_OSAPI_check.xml deleted file mode 100644 index cc7fda4..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_API_OSAPI_check.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-10T21:19:34Z - - - Templates - - - - - - - - {Template App OpenStack Nova API OSAPI check:nova.api.status.last(0)}=0 - Nova API test failed on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Cert.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Cert.xml deleted file mode 100644 index d3eca35..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Cert.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-15T21:42:33Z - - - Templates - - - - - - - - {Template App OpenStack Nova Cert:proc.num[,nova,,bin/python.*bin/nova-cert].last(0)}=0 - Nova Cert process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Compute.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Compute.xml deleted file mode 100644 index b5ccdbc..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Compute.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-15T21:55:39Z - - - Templates - - - - - - - - {Template App OpenStack Nova Compute:proc.num[,nova,,bin/python.*bin/nova-compute].last(0)}=0 - Nova Compute process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Conductor.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Conductor.xml deleted file mode 100644 index 1242fb6..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Conductor.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2015-10-22T13:53:19Z - - - Templates - - - - - - - - {Template App OpenStack Nova Conductor:proc.num[,nova,,bin/python.*bin/nova-conductor].last(0)}=0 - Nova Conductor process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_ConsoleAuth.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_ConsoleAuth.xml deleted file mode 100644 index 4e0ee5b..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_ConsoleAuth.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-15T21:36:18Z - - - Templates - - - - - - - - {Template App OpenStack Nova ConsoleAuth:proc.num[,nova,,bin/python.*bin/nova-consoleauth].last(0)}=0 - Nova ConsoleAuth process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Network.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Network.xml deleted file mode 100644 index 7fcb184..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Network.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-18T07:47:28Z - - - Templates - - - - - - - - {Template App OpenStack Nova Network:proc.num[,nova,,bin/python.*bin/nova-network].last(0)}=0 - Nova Network process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_NoVNCProxy.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_NoVNCProxy.xml deleted file mode 100644 index 3a7ecb9..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_NoVNCProxy.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2015-10-22T13:53:19Z - - - Templates - - - - - - - - {Template App OpenStack Nova novncproxy:proc.num[,nova,,bin/python.*bin/nova-novncproxy].last(0)}=0 - Nova novncproxy process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Scheduler.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Scheduler.xml deleted file mode 100644 index eb47e5a..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Nova_Scheduler.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 2.0 - 2013-07-15T22:01:03Z - - - Templates - - - - - - - - {Template App OpenStack Nova Scheduler:proc.num[,nova,,bin/python.*bin/nova-scheduler].last(0)}=0 - Nova Scheduler process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Open_vSwitch.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Open_vSwitch.xml deleted file mode 100644 index 3d0c125..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Open_vSwitch.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - 2.0 - 2013-07-10T21:21:22Z - - - Templates - - - - - - - - {Template App OpenStack Open vSwitch:proc.num[,root,,ovsdb-server].last(0)}=0 - Open vSwitch DB Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Open vSwitch:proc.num[,root,,ovs-vswitchd].last(0)}=0 - Open vSwitch Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_RabbitMQ_ha.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_RabbitMQ_ha.xml deleted file mode 100644 index b2ac73e..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_RabbitMQ_ha.xml +++ /dev/null @@ -1,494 +0,0 @@ - - - 2.0 - 2013-07-18T13:46:42Z - - - Templates - - - - - - - - {Template App OpenStack HA RabbitMQ:rabbitmq.unmirror.queues.last(0)}>0 - RabbitMQ queues are not mirrored - - 0 - 3 - - 0 - - - - {Template App OpenStack HA RabbitMQ:rabbitmq.missing.nodes.last(0)}>0 - RabbitMQ nodes missing from cluster - - 0 - 3 - - 0 - - - - {Template App OpenStack HA RabbitMQ:net.tcp.port[,4369].last(0)}=0 - RabbitMQ EPMD service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack HA RabbitMQ:proc.num[,,,epmd -(daemon|systemd)].last(0)}=0 - RabbitMQ EPMD process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack HA RabbitMQ:proc.num[,rabbitmq,,bin/beam].last(0)}=0 - RabbitMQ BEAM process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack HA RabbitMQ:net.tcp.port[{$IP_MANAGEMENT},5673].last(0)}=0 - RabbitMQ Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack HA RabbitMQ:net.tcp.port[,41055].last(0)}=0 - RabbitMQ Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Swift_Account.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Swift_Account.xml deleted file mode 100644 index 9ec4eab..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Swift_Account.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - 2.0 - 2013-07-10T21:22:14Z - - - Templates - - - - - - - - {Template App OpenStack Swift Account:proc.num[,swift,,bin/python.*bin/swift-account-replicator].last(0)}=0 - Swift Account Replicator process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Swift Account:proc.num[,swift,,bin/python.*bin/swift-account-server].last(0)}=0 - Swift Account Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Swift Account:net.tcp.service[http,{$IP_STORAGE},6002].last(0)}=0 - Swift Account Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Swift_Container.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Swift_Container.xml deleted file mode 100644 index 8222381..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Swift_Container.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - 2.0 - 2013-07-10T21:22:26Z - - - Templates - - - - - - - - {Template App OpenStack Swift Container:proc.num[,swift,,bin/python.*bin/swift-container-replicator].last(0)}=0 - Swift Container Replicator process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Swift Container:proc.num[,swift,,bin/python.*bin/swift-container-server].last(0)}=0 - Swift Container Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Swift Container:net.tcp.service[http,{$IP_STORAGE},6001].last(0)}=0 - Swift Container Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Swift_Object.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Swift_Object.xml deleted file mode 100644 index d4cb56d..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Swift_Object.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - 2.0 - 2013-07-10T21:22:38Z - - - Templates - - - - - - - - {Template App OpenStack Swift Object:proc.num[,swift,,bin/python.*bin/swift-object-replicator].last(0)}=0 - Swift Object Replicator process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Swift Object:proc.num[,swift,,bin/python.*bin/swift-object-server].last(0)}=0 - Swift Object Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Swift Object:net.tcp.service[http,{$IP_STORAGE},6000].last(0)}=0 - Swift Object Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Swift_Proxy.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Swift_Proxy.xml deleted file mode 100644 index 1c3cbd5..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Swift_Proxy.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - 2.0 - 2013-07-10T21:22:52Z - - - Templates - - - - - - - - {Template App OpenStack Swift Proxy:proc.num[,swift,,bin/python.*bin/swift-proxy-server].last(0)}=0 - Swift Proxy Server process is not running on {HOST.NAME} - - 0 - 4 - - 0 - - - - {Template App OpenStack Swift Proxy:net.tcp.service[http,{$IP_STORAGE},8080].last(0)}=0 - Swift Proxy Server service is down on {HOST.NAME} - - 0 - 4 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_Zabbix_Agent.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_Zabbix_Agent.xml deleted file mode 100644 index 849558e..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_Zabbix_Agent.xml +++ /dev/null @@ -1,183 +0,0 @@ - - - 2.0 - 2013-07-10T21:23:38Z - - - Templates - - - - - - - - {Template App Zabbix Agent:agent.hostname.diff(0)}>0 - Host name of zabbix_agentd was changed on {HOST.NAME} - - 0 - 1 - - 0 - - - - {Template App Zabbix Agent:agent.version.diff(0)}>0 - Version of zabbix_agent(d) was changed on {HOST.NAME} - - 0 - 1 - - 0 - - - - {Template App Zabbix Agent:agent.ping.nodata(5m)}=1 - Zabbix agent on {HOST.NAME} is unreachable for 5 minutes - - 0 - 3 - - 0 - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_Zabbix_Server.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_Zabbix_Server.xml deleted file mode 100644 index da60bd4..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_Zabbix_Server.xml +++ /dev/null @@ -1,1758 +0,0 @@ - - - 2.0 - 2013-07-10T21:23:51Z - - - Templates - - - - - - - - {Template App Zabbix Server:zabbix[rcache,buffer,pfree].min(600)}<25 - Less than 25% free in the configuration cache - - 0 - 3 - Consider increasing CacheSize in the zabbix_server.conf configuration file - 0 - - - - {Template App Zabbix Server:zabbix[wcache,history,pfree].min(600)}<25 - Less than 25% free in the history cache - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[wcache,text,pfree].min(600)}<25 - Less than 25% free in the text history cache - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[wcache,trend,pfree].min(600)}<25 - Less than 25% free in the trends cache - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[queue,10m].min(600)}>100 - More than 100 items having missing data for more than 10 minutes - - 0 - 2 - zabbix[queue,10m] item is collecting data about how many items are missing data for more than 10 minutes (next parameter) - 0 - - - - {Template App Zabbix Server:zabbix[process,alerter,avg,busy].min(600)}>75 - Zabbix alerter processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,configuration syncer,avg,busy].min(600)}>75 - Zabbix configuration syncer processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,db watchdog,avg,busy].min(600)}>75 - Zabbix db watchdog processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,discoverer,avg,busy].min(600)}>75 - Zabbix discoverer processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,escalator,avg,busy].min(600)}>75 - Zabbix escalator processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,history syncer,avg,busy].min(600)}>75 - Zabbix history syncer processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,housekeeper,avg,busy].min(1800)}>75 - Zabbix housekeeper processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,http poller,avg,busy].min(600)}>75 - Zabbix http poller processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,icmp pinger,avg,busy].min(600)}>75 - Zabbix icmp pinger processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,ipmi poller,avg,busy].min(600)}>75 - Zabbix ipmi poller processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,java poller,avg,busy].min(600)}>75 - Zabbix java poller processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,node watcher,avg,busy].min(600)}>75 - Zabbix node watcher processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,poller,avg,busy].min(600)}>75 - Zabbix poller processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,proxy poller,avg,busy].min(600)}>75 - Zabbix proxy poller processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,self-monitoring,avg,busy].min(600)}>75 - Zabbix self-monitoring processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,snmp trapper,avg,busy].min(600)}>75 - Zabbix snmp trapper processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,timer,avg,busy].min(600)}>75 - Zabbix timer processes more than 75% busy - - 0 - 3 - Timer processes usually are busy because they have to process time based trigger functions - 0 - - - - {Template App Zabbix Server:zabbix[process,trapper,avg,busy].min(600)}>75 - Zabbix trapper processes more than 75% busy - - 0 - 3 - - 0 - - - - {Template App Zabbix Server:zabbix[process,unreachable poller,avg,busy].min(600)}>75 - Zabbix unreachable poller processes more than 75% busy - - 0 - 3 - - 0 - - - - - - Zabbix cache usage, % free - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 1 - 1 - 0 - 0 - - - 0 - 0 - 009900 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[wcache,trend,pfree] - - - - 1 - 0 - DD0000 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[rcache,buffer,pfree] - - - - 2 - 0 - 00DDDD - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[wcache,text,pfree] - - - - 3 - 0 - 3333FF - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[wcache,history,pfree] - - - - - - Zabbix data gathering process busy % - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 1 - 1 - 0 - 0 - - - 0 - 0 - 990099 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,trapper,avg,busy] - - - - 1 - 0 - 990000 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,poller,avg,busy] - - - - 2 - 0 - 0000EE - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,ipmi poller,avg,busy] - - - - 3 - 0 - FF33FF - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,discoverer,avg,busy] - - - - 4 - 0 - 00EE00 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,icmp pinger,avg,busy] - - - - 5 - 0 - 003300 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,http poller,avg,busy] - - - - 6 - 0 - CCCC00 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,proxy poller,avg,busy] - - - - 7 - 0 - 33FFFF - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,unreachable poller,avg,busy] - - - - 8 - 0 - DD0000 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,java poller,avg,busy] - - - - 9 - 0 - 000099 - 0 - 7 - 0 - - Template App Zabbix Server - zabbix[process,snmp trapper,avg,busy] - - - - - - Zabbix internal process busy % - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 1 - 1 - 0 - 0 - - - 0 - 0 - 00EE00 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,timer,avg,busy] - - - - 1 - 0 - 007777 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,node watcher,avg,busy] - - - - 2 - 0 - 0000EE - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,escalator,avg,busy] - - - - 3 - 0 - FFAA00 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,housekeeper,avg,busy] - - - - 4 - 0 - 00EEEE - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,alerter,avg,busy] - - - - 5 - 0 - 990099 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,configuration syncer,avg,busy] - - - - 6 - 0 - 666600 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,db watchdog,avg,busy] - - - - 7 - 0 - EE0000 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,history syncer,avg,busy] - - - - 8 - 0 - FF66FF - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[process,self-monitoring,avg,busy] - - - - - - Zabbix server performance - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 5 - 00C800 - 0 - 2 - 0 - - Template App Zabbix Server - zabbix[wcache,values] - - - - 1 - 5 - C80000 - 1 - 2 - 0 - - Template App Zabbix Server - zabbix[queue] - - - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_Fuel_OS_Linux.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_Fuel_OS_Linux.xml deleted file mode 100644 index 46a01da..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_Fuel_OS_Linux.xml +++ /dev/null @@ -1,3013 +0,0 @@ - - - 2.0 - 2014-12-11T12:21:22Z - - - Templates - - - - - - - - {Template Fuel OS Linux:vfs.file.cksum[/etc/passwd].diff(0)}>0 - /etc/passwd has been changed on {HOST.NAME} - - 0 - 2 - - 0 - - - - {Template Fuel OS Linux:kernel.maxfiles.last(0)}<1024 - Configured max number of opened files is too low on {HOST.NAME} - - 0 - 1 - - 0 - - - - {Template Fuel OS Linux:kernel.maxproc.last(0)}<256 - Configured max number of processes is too low on {HOST.NAME} - - 0 - 1 - - 0 - - - - {Template Fuel OS Linux:system.cpu.util[,iowait].last(0)}>20 - Disk I/O is overloaded on {HOST.NAME} - - 0 - 2 - OS spends significant time waiting for I/O (input/output) operations. It could be indicator of performance issues with storage system. - 0 - - - - {Template Fuel OS Linux:net.dns[,zabbix.com,,2,1].count(#3,0)}>0 - DNS resolve error on {HOST.NAME} - - 1 - 4 - - 0 - - - - {Template Fuel OS Linux:system.uname.diff(0)}>0 - Host information was changed on {HOST.NAME} - - 0 - 1 - - 0 - - - - {Template Fuel OS Linux:system.hostname.diff(0)}>0 - Hostname was changed on {HOST.NAME} - - 0 - 1 - - 0 - - - - {Template Fuel OS Linux:vm.memory.size[available].last(0)}<20M - Lack of available memory on server {HOST.NAME} - - 0 - 3 - - 0 - - - - {Template Fuel OS Linux:system.swap.size[,pfree].last(0)}<50 - Lack of free swap space on {HOST.NAME} - - 0 - 2 - It probably means that the systems requires more physical memory. - 0 - - - - {Template Fuel OS Linux:proc.num[ntpd,,,].last(0)}=0 - NTP Server process is not running on {HOST.NAME} - - 0 - 2 - - 0 - - - - {Template Fuel OS Linux:system.cpu.load[percpu,avg1].last(0)}>5 - Processor load is too high on {HOST.NAME} - - 0 - 2 - - 0 - - - - {Template Fuel OS Linux:proc.num[rsyslogd,,,].last(0)}=0 - RsyslogD Server process is not running on {HOST.NAME} - - 0 - 2 - - 0 - - - - {Template Fuel OS Linux:proc.num[sshd,,,].last(0)}=0 - SSH Server process is not running on {HOST.NAME} - - 0 - 2 - - 0 - - - - {Template Fuel OS Linux:net.tcp.service[ssh,,22].last(0)}=0 - SSH Server service is down on {HOST.NAME} - - 0 - 2 - - 0 - - - - {Template Fuel OS Linux:proc.num[].last(0)}>1500 - Too many processes on {HOST.NAME} - - 0 - 2 - - 0 - - - - {Template Fuel OS Linux:proc.num[,,run].last(0)}>30 - Too many processes running on {HOST.NAME} - - 0 - 2 - - 0 - - - - {Template Fuel OS Linux:system.uptime.change(0)}<0 - {HOST.NAME} has just been restarted - - 0 - 1 - - 0 - - - - - - CPU jumps - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 1 - 0 - 009900 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.switches - - - - 2 - 0 - 000099 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.intr - - - - - - CPU load - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 1 - 0 - 0 - 0 - - - 0 - 0 - 009900 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.load[percpu,avg1] - - - - 1 - 0 - 000099 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.load[percpu,avg5] - - - - 2 - 0 - 990000 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.load[percpu,avg15] - - - - - - CPU utilization - 900 - 200 - 0.0000 - 100.0000 - 1 - 0 - 1 - 1 - 0 - 0.0000 - 0.0000 - 1 - 1 - 0 - 0 - - - 1 - 1 - FF5555 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.util[,steal] - - - - 2 - 1 - 55FF55 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.util[,softirq] - - - - 3 - 1 - 009999 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.util[,interrupt] - - - - 4 - 1 - 990099 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.util[,nice] - - - - 5 - 1 - 999900 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.util[,iowait] - - - - 6 - 1 - 990000 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.util[,system] - - - - 7 - 1 - 000099 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.util[,user] - - - - 8 - 1 - 009900 - 0 - 2 - 0 - - Template Fuel OS Linux - system.cpu.util[,idle] - - - - - - Swap usage - 600 - 340 - 0.0000 - 0.0000 - 0 - 0 - 2 - 1 - 1 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 0 - AA0000 - 0 - 2 - 2 - - Template Fuel OS Linux - system.swap.size[,total] - - - - 1 - 0 - 00AA00 - 0 - 2 - 0 - - Template Fuel OS Linux - system.swap.size[,free] - - - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_NTP_binding.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_NTP_binding.xml deleted file mode 100644 index 0350861..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_NTP_binding.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - 2.0 - 2014-12-11T12:21:22Z - - - Templates - - - - - - - - {Template NTP binding:net.udp.listen[123].last(0)}=0 - NTP Server service is down on {HOST.NAME} - - 0 - 2 - - 0 - - - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_OS_Controller.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_OS_Controller.xml deleted file mode 100644 index f71b627..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_OS_Controller.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - 2.0 - 2014-12-11T12:21:22Z - - - Templates - - - - - - - - {Template OS Controller:netns.udp.listen[vrouter,123].last(0)}=0 - NTP Server service is down on {HOST.NAME} - - 0 - 2 - - 0 - - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_OpenStack_Cluster.xml b/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_OpenStack_Cluster.xml deleted file mode 100644 index c687639..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_OpenStack_Cluster.xml +++ /dev/null @@ -1,1097 +0,0 @@ - - - 2.0 - 2015-07-27T12:25:30Z - - - Templates - - - - - - - - {Template OpenStack Cluster:db.services.offline.nova.query.last(0)}>0 - Nova service status offline test failed - - 0 - 3 - - 0 - - - - {Template OpenStack Cluster:db.services.offline.cinder.query.last(0)}>0 - Cinder service status offline test failed - - 0 - 3 - - 0 - - - - {Template OpenStack Cluster:db.services.offline.neutron.query.last(0)}>0 - Neutron service status offline test failed - - 0 - 3 - - 0 - - - - {Template OpenStack Cluster:vip.cinder.api.status.last(0)}=0 - Cinder VIP API test failed - - 0 - 5 - - 0 - - - - {Template OpenStack Cluster:vip.glance.api.status.last(0)}=0 - Glance VIP API test failed - - 0 - 5 - - 0 - - - - {Template OpenStack Cluster:vip.keystone.service.api.status.last(0)}=0 - Keystone service VIP API test failed - - 0 - 5 - - 0 - - - - {Template OpenStack Cluster:vip.keystone.api.status.last(0)}=0 - Keystone VIP API test failed - - 0 - 5 - - 0 - - - - {Template OpenStack Cluster:vip.nova.api.status.last(0)}=0 - Nova VIP API test failed - - 0 - 5 - - 0 - - - - - - Cluster CPU Load - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 0 - C80000 - 0 - 2 - 0 - - Template OpenStack Cluster - grpavg["Controllers", "system.cpu.load[percpu,avg1]", last, 0] - - - - 1 - 0 - 00C800 - 0 - 2 - 0 - - Template OpenStack Cluster - grpavg["Controllers", "system.cpu.load[percpu,avg5]", last, 0] - - - - 2 - 0 - 0000C8 - 0 - 2 - 0 - - Template OpenStack Cluster - grpavg["Controllers", "system.cpu.load[percpu,avg15]", last, 0] - - - - - - CPUs in Cluster - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 0 - C80000 - 0 - 2 - 0 - - Template OpenStack Cluster - db.cpu.used.query - - - - 1 - 0 - 00C800 - 0 - 2 - 0 - - Template OpenStack Cluster - db.cpu.total.query - - - - - - Number of instances - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 0 - C80000 - 0 - 2 - 0 - - Template OpenStack Cluster - db.instance.count.query - - - - 1 - 0 - 00C800 - 0 - 2 - 0 - - Template OpenStack Cluster - db.instance.error.query - - - - - - Openstack Offline Services - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 0 - C80000 - 0 - 2 - 0 - - Template OpenStack Cluster - db.services.offline.cinder.query - - - - 1 - 0 - 00C800 - 0 - 2 - 0 - - Template OpenStack Cluster - db.services.offline.nova.query - - - - 2 - 0 - 0000C8 - 0 - 2 - 0 - - Template OpenStack Cluster - db.services.offline.neutron.query - - - - - - RAM in Cluster - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 0 - C80000 - 0 - 2 - 0 - - Template OpenStack Cluster - db.ram.total.query - - - - 1 - 0 - 00C800 - 0 - 2 - 0 - - Template OpenStack Cluster - db.ram.used.query - - - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/base.py b/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/base.py deleted file mode 100644 index fdae883..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/base.py +++ /dev/null @@ -1,135 +0,0 @@ -#!/usr/bin/python -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import json -import logging -import re -import subprocess -import time -import traceback - -ERROR_RE = "[Ff]ailed: (\d+);" -OK_RE = "[Pp]rocessed: (\d+);" - -class ZabbixSender(object): - """ Base class for writing Python plugins. - """ - - def __init__(self, zbx_server_ip, zbx_hostname, zbx_server_port=10051, - timeout=5, debug=False, log_file='/var/log/zabbix/sender.log'): - self.timeout = timeout - self.debug = debug - if debug: - level = logging.DEBUG - else: - level = logging.INFO - logging.basicConfig(filename=log_file, level=level) - self.logger = logging - - self.server_port = zbx_server_port - self.server_ip = zbx_server_ip - self.hostname = zbx_hostname - - def execute(self, cmd, shell=True, cwd=None, outputs_on_error=False): - """ - Executes a program with arguments. - - Args: - cmd: a list of program arguments where the first item is the - program name. - shell: whether to use the shell as the program to execute (default= - True). - cwd: the directory to change to before running the program - (default=None). - - Returns: - A tuple containing the standard output and error strings if the - program execution has been successful. - - ("foobar\n", "") - - None if the command couldn't be executed or returned a non-zero - status code unless outputs_on_error is True - """ - start_time = time.time() - try: - proc = subprocess.Popen( - cmd, - cwd=cwd, - shell=shell, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE - ) - (stdout, stderr) = proc.communicate() - stdout = stdout.rstrip('\n') - except Exception as e: - self.logger.error("Cannot execute command '%s': %s : %s" % - (cmd, str(e), traceback.format_exc())) - return None - - returncode = proc.returncode - - if returncode != 0: - self.logger.error("Command '%s' failed (return code %d): %s %s" % - (cmd, returncode, stderr, stdout)) - if not outputs_on_error: - return None - - elapsedtime = time.time() - start_time - - if self.debug: - self.logger.info("Command '%s' returned %s in %0.3fs" % - (cmd, returncode, elapsedtime)) - - if not stdout and self.debug: - self.logger.info("Command '%s' returned no output!", cmd) - - return (stdout, stderr) - - def execute_to_json(self, *args, **kwargs): - """ - Executes a program and decodes the output as a JSON string. - - See execute(). - - Returns: - A Python object or None if the execution of the program failed. - """ - outputs = self.execute(*args, **kwargs) - if outputs: - return json.loads(outputs[0]) - return - - def _response_has_error(self, response): - err = re.findall(ERROR_RE, response) - ok = re.findall(OK_RE, response) - if (len(err) > 0 and err[0] != '0') or (len(ok) > 0 and int(ok[0]) == 0): - return True - return False - - def zabbix_sender(self, key, value): - """ Use zabbix_sender to send metrics to zabbix server. - - Return True if successfully processed else False - """ - - #TODO(scroiset): implement zabbix_sender in pure python to avoid forking process - cmd = "zabbix_sender -z {server_ip} -p {server_port} -s {hostname} "\ - "-k {key} -o {value}".format( - server_ip=self.server_ip, hostname=self.hostname, - server_port= self.server_port, key = key, value= value - ) - resp = self.execute(cmd, outputs_on_error=True) - return self._response_has_error(resp[0]) diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/ceph.py b/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/ceph.py deleted file mode 100755 index 8e7579c..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/ceph.py +++ /dev/null @@ -1,266 +0,0 @@ -#!/usr/bin/python -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import base -import socket -import sys - -class CephMonPlugin(base.ZabbixSender): - """ Collect states and information about ceph cluster and placement groups. - """ - def itermetrics_status(self): - status = self.execute_to_json('ceph -s --format json') - if not status: - return - - if 'mons' in status['monmap']: - monitor_nb = len(status['monmap']['mons']) - else: - monitor_nb = 0 - yield { - 'type': 'monitor_count', - 'value': monitor_nb - } - - yield { - 'type': 'quorum_count', - 'value': len(status.get('quorum', [])) - } - - pgmap = status['pgmap'] - yield { - 'type': 'pg_bytes_used', - 'value': pgmap['bytes_used'], - } - yield { - 'type': 'pg_bytes_free', - 'value': pgmap['bytes_avail'], - } - yield { - 'type': 'pg_bytes_total', - 'value': pgmap['bytes_total'], - } - yield { - 'type': 'pg_data_bytes', - 'value': pgmap['data_bytes'] - } - yield { - 'type': 'pg_count', - 'value': pgmap['num_pgs'] - } - - # see: http://ceph.com/docs/master/rados/operations/pg-states/ - pg_states = { - 'creating': 0, - 'active': 0, - 'clean': 0, - 'down': 0, - 'replay': 0, - 'splitting': 0, - 'scrubbing': 0, - 'deep': 0, - 'degraded': 0, - 'inconsistent': 0, - 'peering': 0, - 'repair': 0, - 'recovering': 0, - 'backfill': 0, - 'waitbackfill': 0, - 'backfilltoofull': 0, - 'incomplete': 0, - 'stale': 0, - 'remapped': 0, - 'undersized': 0, - 'peered': 0, - } - - for state in pgmap['pgs_by_state']: - if '+' in state['state_name']: - states = state['state_name'].split('+') - else: - states = [state['state_name']] - - if not states: - self.logger.error("Unknown state {}".format(state['state_name'])) - continue - - for s in states: - if s in pg_states: - pg_states[s] += state['count'] - else: - self.logger.warning("PG state not known {}".format(s)) - - for n, num in pg_states.iteritems(): - yield { - 'type': 'pg_state_count_{}'.format(n), - 'value': num - } - - def itermetrics_df(self): - df = self.execute_to_json('ceph df --format json') - if not df: - return - - objects_count = 0 - for pool in df['pools']: - objects_count += pool['stats'].get('objects', 0) - # TODO(scroiset): add low level discovery for pool names - #for m in ('bytes_used', 'max_avail', 'objects'): - # yield { - # 'type': 'pool_%s' % m, - # 'type_instance': pool['name'], - # 'value': pool['stats'].get(m, 0), - # } - - yield { - 'type': 'objects_count', - 'value': objects_count - } - yield { - 'type': 'pool_count', - 'value': len(df['pools']) - } - - if 'total_bytes' in df['stats']: - # compatibility with 0.84+ - total = df['stats']['total_bytes'] - used = df['stats']['total_used_bytes'] - avail = df['stats']['total_avail_bytes'] - else: - # compatibility with <0.84 - total = df['stats']['total_space'] * 1024 - used = df['stats']['total_used'] * 1024 - avail = df['stats']['total_avail'] * 1024 - - yield { - 'type': 'pool_total_bytes_used', - 'value': used - } - yield { - 'type': 'pool_total_bytes_free', - 'value': avail - } - yield { - 'type': 'pool_total_bytes_total', - 'value': total - } - yield { - 'type': 'pool_total_percent_used', - 'value': 100.0 * used / total - } - yield { - 'type': 'pool_total_percent_free', - 'value': 100.0 * avail / total - } - - # TODO(scroiset): add low level discovery for pool names - #def itermetrics_pool(self): - # stats = self.execute_to_json('ceph osd pool stats --format json') - # if not stats: - # return - - # for pool in stats: - # client_io_rate = pool.get('client_io_rate', {}) - # yield { - # 'type': 'pool_bytes_rate', - # 'type_instance': pool['pool_name'], - # 'value': [client_io_rate.get('read_bytes_sec', 0), - # client_io_rate.get('write_bytes_sec', 0)] - # } - # yield { - # 'type': 'pool_ops_rate', - # 'type_instance': pool['pool_name'], - # 'value': client_io_rate.get('op_per_sec', 0) - # } - - def itermetrics_osd(self): - osd = self.execute_to_json('ceph osd dump --format json') - if not osd: - return - - # TODO(scroiset): add low level discovery for pool names - #for pool in osd['pools']: - # for name in ('size', 'pg_num', 'pg_placement_num'): - # yield { - # 'type': 'pool_%s' % name, - # 'type_instance': pool['pool_name'], - # 'value': pool[name] - # } - - _up, _down, _in, _out = (0, 0, 0, 0) - for osd in osd['osds']: - if osd['up'] == 1: - _up += 1 - else: - _down += 1 - if osd['in'] == 1: - _in += 1 - else: - _out += 1 - - yield { - 'type': 'osd_count_up', - 'value': _up - } - yield { - 'type': 'osd_count_down', - 'value': _down - } - yield { - 'type': 'osd_count_in', - 'value': _in - } - yield { - 'type': 'osd_count_out', - 'value': _out - } - - def send(self): - has_error = False - for m in plugin.itermetrics_status(): - has_error = self.zabbix_sender(m['type'], m['value']) - for m in plugin.itermetrics_df(): - has_error = self.zabbix_sender(m['type'], m['value']) - for m in plugin.itermetrics_osd(): - has_error = self.zabbix_sender(m['type'], m['value']) - return has_error - - -# print and return codes: -# 0: no error -# 1: failed to send some/all metrics -# 2: exception occured while retrieving metrics -# 3: missing arguments - -if not len(sys.argv) == 3: - # missing arguments! - print 3 - sys.exit(3) - -hostname = sys.argv[1] -server_ip = sys.argv[2] -plugin = CephMonPlugin(zbx_server_ip=server_ip, zbx_hostname=hostname) - -try: - has_error = plugin.send() - if has_error: - print 1 - sys.exit(1) - else: - print 0 -except Exception as e: - plugin.logger.error(e) - print 2 - sys.exit(2) diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/ceph_health.sh b/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/ceph_health.sh deleted file mode 100755 index cf5b08d..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/ceph_health.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -sudo ceph health | grep -q HEALTH_OK; -if [ $? -eq 0 ]; then - echo 1 -else - echo 0 -fi diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/check_api.py b/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/check_api.py deleted file mode 100755 index 1dfc608..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/check_api.py +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/python -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -import urllib2 -import sys -import simplejson as json -import ConfigParser -from zabbix_checks_logger import get_logger - -CONF_FILE = '/etc/zabbix/check_api.conf' - - -class OSAPI(object): - """Openstack API""" - - def __init__(self, logger, config): - self.logger = logger - self.config = config - self.username = self.config.get('api', 'user') - self.password = self.config.get('api', 'password') - self.tenant_name = self.config.get('api', 'tenant') - self.endpoint_keystone = self.config.get('api', - 'keystone_endpoints' - ).split(',') - self.token = None - self.tenant_id = None - self.get_token() - - def get_timeout(self, service): - try: - return int(self.config.get('api', '%s_timeout' % service)) - except ConfigParser.NoOptionError: - return 1 - - def get_token(self): - data = json.dumps({ - "auth": - { - 'tenantName': self.tenant_name, - 'passwordCredentials': - { - 'username': self.username, - 'password': self.password - } - } - }) - for keystone in self.endpoint_keystone: - self.logger.info("Trying to get token from '%s'" % keystone) - try: - request = urllib2.Request( - '%s/tokens' % keystone, - data=data, - headers={ - 'Content-type': 'application/json' - }) - data = json.loads( - urllib2.urlopen( - request, timeout=self.get_timeout('keystone')).read()) - self.token = data['access']['token']['id'] - self.tenant_id = data['access']['token']['tenant']['id'] - self.logger.debug("Got token '%s'" % self.token) - return - except Exception as e: - self.logger.debug("Got exception '%s'" % e) - self.logger.critical(0) - sys.exit(1) - - def check_api(self, url, service): - self.logger.info("Trying '%s' on '%s'" % (service, url)) - try: - request = urllib2.Request(url, - headers={ - 'X-Auth-Token': self.token, - }) - urllib2.urlopen(request, timeout=self.get_timeout(service)) - except Exception as e: - self.logger.debug("Got exception from '%s' '%s'" % (service, e)) - self.logger.critical(0) - sys.exit(1) - self.logger.critical(1) - - -def main(): - config = ConfigParser.RawConfigParser() - config.read(CONF_FILE) - logger = get_logger(config.get('api', 'log_level')) - - API = OSAPI(logger, config) - - if len(sys.argv) < 5: - logger.critical('No argvs, dunno what to do') - sys.exit(1) - map = config.get('api', '%s_map' % sys.argv[1]) - - url = '%s://%s:%s/%s' % (sys.argv[2], sys.argv[3], sys.argv[4], map) - url = url % API.__dict__ - - API.check_api(url, sys.argv[1]) - -if __name__ == "__main__": - main() diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/check_rabbit.py b/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/check_rabbit.py deleted file mode 100755 index d40898c..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/check_rabbit.py +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/python -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -import urllib2 -import simplejson as json -import sys -import base64 -import ConfigParser -from zabbix_checks_logger import get_logger - -CONF_FILE = '/etc/zabbix/check_rabbit.conf' - - -class RabbitmqAPI(object): - def __init__(self, logger, config): - self.logger = logger - self.login = config.get('rabbitmq', 'user') - self.password = config.get('rabbitmq', 'password') - self.host = config.get('rabbitmq', 'host') - self.auth_string = base64.encodestring('%s:%s' % - (self.login, - self.password) - ).replace('\n', '') - self.max_queues = int(config.get('rabbitmq', 'max_queues')) - - def get_http(self, url): - try: - request = urllib2.Request('%s/api/%s' % (self.host, url)) - request.add_header("Authorization", "Basic %s" % self.auth_string) - return json.loads(urllib2.urlopen(request, timeout=2).read()) - except urllib2.URLError as e: - self.logger.error("URL error: '%s'" % e) - sys.exit(1) - except ValueError as e: - self.logger.error("Value error: '%s'" % e) - sys.exit(1) - - def get_queues_items(self): - response = self.get_http('overview') - if 'queue_totals' in response: - self.logger.critical(response['queue_totals']['messages']) - else: - self.logger.error('No queue_totals in response') - - def get_missing_queues(self): - queues = 0 - response = self.get_http('queues') - for queue in response: - queues += 1 - self.logger.critical(self.max_queues-queues) - - def get_queues_without_consumers(self): - queues_without_consumers = 0 - response = self.get_http('queues') - for queue in response: - queues_without_consumers += 1 - if ('consumers' in queue and - queue['consumers'] > 0): - queues_without_consumers -= 1 - self.logger.critical(queues_without_consumers) - - def get_missing_nodes(self): - missing_nodes = 0 - response = self.get_http('nodes') - for node in response: - if not node['running']: - missing_nodes += 1 - self.logger.critical(missing_nodes) - - def get_unmirror_queues(self): - response = self.get_http('nodes') - if (len(response) < 2): - self.logger.critical(0) - return - - response = self.get_http('queues') - unmirror_queues = 0 - for queue in response: - if ('policy' in queue and - queue['policy'] == 'ha-all'): - unmirror_queues += 1 - if ('synchronised_slave_nodes' in queue and - len(queue['synchronised_slave_nodes']) > 0): - unmirror_queues -= 1 - self.logger.critical(unmirror_queues) - -def usage(): - print("check_rabbit.py usage:\n \ - queues-items - item count in queues\n \ - queues-without-consumers - count queues without consumers\n \ - missing-nodes - count missing nodes from rabbitmq cluster\n \ - unmirror-queues - count unmirrored queues\n \ - missing-queues max_queues - compare queues count to max_queues\n") - - -def main(): - config = ConfigParser.RawConfigParser() - config.read(CONF_FILE) - logger = get_logger(config.get('rabbitmq', 'log_level')) - - API = RabbitmqAPI(logger, config) - - if len(sys.argv) < 2: - logger.critical('No argvs, dunno what to do') - sys.exit(1) - - if sys.argv[1] == 'missing-queues': - API.get_missing_queues() - elif sys.argv[1] == 'queues-items': - API.get_queues_items() - elif sys.argv[1] == 'queues-without-consumers': - API.get_queues_without_consumers() - elif sys.argv[1] == 'missing-nodes': - API.get_missing_nodes() - elif sys.argv[1] == 'unmirror-queues': - API.get_unmirror_queues() - else: - usage() - -if __name__ == "__main__": - main() diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/crm_node_check.sh b/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/crm_node_check.sh deleted file mode 100755 index 6ece2e6..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/crm_node_check.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -NODES=$(/usr/bin/sudo /usr/sbin/crm_resource --locate --quiet --resource $1) -HOSTNAME=$(/bin/hostname) - -for NODE in $NODES -do - if [ "$NODE" == "$HOSTNAME" ]; then - echo 1 - exit - fi -done -echo 0 diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/haproxy.sh b/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/haproxy.sh deleted file mode 100755 index 298971f..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/haproxy.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# This script is a wrapper to HAproxy statistics which are in a CSV format. -# Output format is compatible with Zabbix. -# It can be used for HAproxy frontends and/or backends discovery and for -# gathering statistics about particular frontend,backend or server. - -case $1 in - "-f") - OPER='discovery' - FESQ='grep FRONTEND' - ;; - "-b") - OPER='discovery' - FESQ='grep BACKEND' - ;; - "-s") - OPER='discovery' - FESQ='grep -v FRONTEND\|BACKEND\|^$\|^#' - ;; - "-v") - OPER='value' - HAPX=$2 - HASV=$3 - ITEM=$4 - FESQ="grep ^${HAPX},${HASV}," - ;; - *) - echo "Wrong arguments supplied, exiting... - - Usage: - $0 -f|-b|-s|-v .. - - -f frontend discovery - -b backend discovery - -s server discovery - -v .. get particular item value, for example: - - -v zabbix-agent.node-1.smax - will print smax item value for server node-1 in group zabbix-agent - -v zabbix-agent.FRONTEND.smax - will print smax item value for FRONTEND part of zabbix-agent group - -v zabbix-agent.BACKEND.smax - will print smax item value for BACKEND part of zabbix-agent group - " - exit 1 -esac -STATHEAD=( pxname svname qcur qmax scur smax slim stot bin bout dreq -dresp ereq econ eresp wretr wredis status weight act bck chkfail -chkdown lastchg downtime qlimit pid iid sid throttle lbtot tracked -type rate rate_lim rate_max check_status check_code check_duration -hrsp_1xx hrsp_2xx hrsp_3xx hrsp_4xx hrsp_5xx hrsp_other hanafail -req_rate req_rate_max req_tot cli_abrt srv_abrt ) - -FES=`echo "show stat" | sudo socat /var/lib/haproxy/stats stdio | sed 's/ /_/g' |grep -v -i 'zabbix-server' | $FESQ` -if [ "$OPER" == "discovery" ]; then - POSITION=1 - echo "{" - echo " \"data\":[" - for FE in $FES - do - IFS=$',' - FEA=($FE) - unset IFS - HAPX=${FEA[0]} - HASV=${FEA[1]} - HASTAT=${HAPX}-${HASV} - if [ $POSITION -gt 1 ] - then - echo "," - fi - echo -n " { \"{#HAPX}\": \"$HAPX\", \"{#HASTAT}\": \"$HASTAT\", \"{#HASV}\": \"$HASV\" }" - POSITION=$[POSITION+1] - done - echo "" - echo " ]" - echo "}" -elif [ "$OPER" == "value" ]; then - IFS=$',' - FEA=($FES) - unset IFS - cnt=0; for el in "${STATHEAD[@]}"; do - [[ "$el" == "$ITEM" ]] && echo ${FEA[$cnt]} && break - ((++cnt)) - done -fi diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/netns.listen.sh b/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/netns.listen.sh deleted file mode 100755 index 1d8091b..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/netns.listen.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -PROTO=$1 -NS=$2 -PORT=$3 -IP=$4 - -if test -z "$NS"; then - echo 0 - exit 1 -fi - -if test -z "$PROTO" -o -z "$PORT"; then - echo 0 - exit 1 -fi - -if [ -n "$IP" ]; then - ADDRESS="$PROTO""@""$IP:$PORT" -else - ADDRESS="$PROTO"":$PORT" -fi - -num=$(/bin/ip netns exec "$NS" /usr/bin/lsof -i"$ADDRESS" 2>/dev/null|wc -l) - -if [ "$num" -gt 0 ]; then - echo 1 -else - echo 0 -fi -exit 0 diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/query_db.py b/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/query_db.py deleted file mode 100755 index b859425..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/query_db.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/python -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -import ConfigParser -import sys -import sqlalchemy -from zabbix_checks_logger import get_logger - -CONF_FILE = '/etc/zabbix/check_db.conf' - - -def query_db(logger, connection_string, query_string): - try: - engine = sqlalchemy.create_engine(connection_string) - res = engine.execute(query_string).first() - except sqlalchemy.exc.OperationalError as e: - logger.critical("Operational error '%s'" % e) - except sqlalchemy.exc.ProgrammingError as e: - logger.critical("Programming error '%s'" % e) - else: - return res[0] - -config = ConfigParser.RawConfigParser() -config.read(CONF_FILE) - -logger = get_logger(config.get('query_db', 'log_level')) - -if __name__ == '__main__': - if len(sys.argv) < 2: - logger.critical('No argvs, dunno what to do') - sys.exit(1) - - item = sys.argv[1] - try: - sql_connection = config.get('query_db', '%s_connection' % item) - sql_query = config.get('query_db', '%s_query' % item) - except ConfigParser.NoOptionError as e: - logger.critical("Item '%s' not configured" % item) - sys.exit(2) - - logger.info("Get request for item '%s'" % item) - logger.debug("Sql connection: '%s', sql query: '%s'" % - (sql_connection, sql_query)) - logger.critical(query_db(logger, sql_connection, sql_query)) diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/vfs.dev.discovery.sh b/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/vfs.dev.discovery.sh deleted file mode 100755 index 7dffd74..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/vfs.dev.discovery.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -#Zabbix vfs.dev.discovery implementation - -echo -e "{\n\t\"data\" : [" - -# we have to end each line with a comma except the last one (JSON SIC!) -# so we have to manage the line separator manually in awk :/ -egrep -v 'major|^$|dm-|[0-9]$' /proc/partitions | awk ' - BEGIN{ORS="";n=0} - { - if (n++) print ",\n"; - print "\t{ \"{#DEVNAME}\" : \""$4"\" }" - } -' - -echo -e "\n\t]\n}" diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/vfs.mdadm.discovery.sh b/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/vfs.mdadm.discovery.sh deleted file mode 100755 index e464ca7..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/vfs.mdadm.discovery.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -#Zabbix vfs.mdadm.discovery implementation - -echo -e "{\n\t\"data\" : [" - -# we have to end each line with a comma except the last one (JSON SIC!) -# so we have to manage the line separator manually in awk :/ -awk -F: ' - BEGIN{ORS="";n=0} - $1 ~ /^md.?/ { - gsub(" *$","",$1); - if (n++) print ",\n"; - print "\t{ \"{#MDEVICE}\" : \""$1"\" }" - } -' /proc/mdstat - -echo -e "\n\t]\n}" diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/zabbix_checks_logger.py b/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/zabbix_checks_logger.py deleted file mode 100644 index 0aed9a6..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/zabbix_checks_logger.py +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -import sys -import logging - -LOGGING_LEVELS = { - 'CRITICAL': logging.CRITICAL, - 'WARNING': logging.WARNING, - 'INFO': logging.INFO, - 'DEBUG': logging.DEBUG -} - - -def get_logger(level): - logger = logging.getLogger() - ch = logging.StreamHandler(sys.stdout) - logger.setLevel(LOGGING_LEVELS[level]) - logger.addHandler(ch) - return logger diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-server-mysql.conf b/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-server-mysql.conf deleted file mode 100644 index 68254ab..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-server-mysql.conf +++ /dev/null @@ -1,2 +0,0 @@ -dbc_install='false' -dbc_upgrade='false' diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-server.ocf b/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-server.ocf deleted file mode 100644 index 59d1469..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-server.ocf +++ /dev/null @@ -1,273 +0,0 @@ -#!/bin/sh -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# Zabbix server OCF script -# -# Description: Manages Zabbix server process as a HA resource -# -# Authors: Mirantis inc. -# -# Support: openstack@lists.launchpad.net -# -# See usage() function below for more details ... -# -# OCF instance parameters: -# OCF_RESKEY_binary -# OCF_RESKEY_config -# OCF_RESKEY_user -# OCF_RESKEY_pid -# OCF_RESKEY_additional_parameters -# OCF_RESKEY_namespace -####################################################################### -# Initialization: - -: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} -. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs - -####################################################################### - -# Fill in some defaults if no values are specified - -SERVICE_NAME="Zabbix-server" - -OCF_RESKEY_binary_default="/usr/sbin/zabbix_server" -OCF_RESKEY_pid_default="/var/run/zabbix/zabbix_server.pid" -OCF_RESKEY_namespace_default="zabbix" - -: ${OCF_RESKEY_binary=${OCF_RESKEY_binary_default}} -: ${OCF_RESKEY_pid=${OCF_RESKEY_pid_default}} -: ${OCF_RESKEY_namespace=${OCF_RESKEY_namespace_default}} - -####################################################################### - -usage() { - cat < - - -1.0 - - -Manages Zabbix server daemon as a Pacemaker Resource. - -Manages Zabbix server - - - - -Name of zabbix-server file that will be run. - -zabbix-server binary file - - - - - -The pid file to use for this process - -zabbix-server pid file - - - - - -The namespace in which this process should be run - -zabbix-server namespace - - - - - - - - - - - - - - -END -} - -####################################################################### -# Functions invoked by resource manager actions - -service_validate() { - local rc - - check_binary $OCF_RESKEY_binary - - # A config file on shared storage that is not available - # during probes is OK. - #if [ ! -f $OCF_RESKEY_config ]; then - # if ! ocf_is_probe; then - # ocf_log err "Config $OCF_RESKEY_config doesn't exist" - # return $OCF_ERR_INSTALLED - # fi - # ocf_log_warn "Config $OCF_RESKEY_config not available during a probe" - #fi - - true -} - -service_status() { - local pid - local rc - - if [ ! -f $OCF_RESKEY_pid ]; then - ocf_log info "${SERVICE_NAME} is not running" - return $OCF_NOT_RUNNING - else - pid=`cat $OCF_RESKEY_pid` - fi - - ocf_run -warn kill -s 0 $pid - rc=$? - if [ $rc -eq 0 ]; then - return $OCF_SUCCESS - else - ocf_log info "Old PID file found, but ${SERVICE_NAME} is not running" - return $OCF_NOT_RUNNING - fi -} - -service_monitor() { - service_status -} - -service_start() { - local rc - - service_status - rc=$? - if [ $rc -eq $OCF_SUCCESS ]; then - ocf_log info "${SERVICE_NAME} is already running" - return $OCF_SUCCESS - fi - - ip netns exec ${OCF_RESKEY_namespace} ${OCF_RESKEY_binary} - - # Spin waiting for the server to come up. - # Let the CRM/LRM time us out if required - while true; do - service_monitor - rc=$? - [ $rc -eq $OCF_SUCCESS ] && break - if [ $rc -ne $OCF_NOT_RUNNING ]; then - ocf_log err "${SERVICE_NAME} start failed" - exit $OCF_ERR_GENERIC - fi - sleep 1 - done - - ocf_log info "${SERVICE_NAME} started" - return $OCF_SUCCESS -} - -service_stop() { - local rc - local pid - - service_status - rc=$? - if [ $rc -eq $OCF_NOT_RUNNING ]; then - ocf_log info "${SERVICE_NAME} is already stopped" - return $OCF_SUCCESS - fi - - # Try SIGTERM - pid=`cat $OCF_RESKEY_pid` - ocf_run kill -s TERM $pid - rc=$? - if [ $rc -ne 0 ]; then - ocf_log err "${SERVICE_NAME} couldn't be stopped" - exit $OCF_ERR_GENERIC - fi - - # stop waiting - shutdown_timeout=15 - if [ -n "$OCF_RESKEY_CRM_meta_timeout" ]; then - shutdown_timeout=$((($OCF_RESKEY_CRM_meta_timeout/1000)-5)) - fi - count=0 - while [ $count -lt $shutdown_timeout ]; do - service_status - rc=$? - if [ $rc -eq $OCF_NOT_RUNNING ]; then - break - fi - count=`expr $count + 1` - sleep 1 - ocf_log debug "${SERVICE_NAME} still hasn't stopped yet. Waiting ..." - done - - service_status - rc=$? - if [ "${rc}" -ne "${OCF_NOT_RUNNING}" ]; then - # SIGTERM didn't help either, try SIGKILL - ocf_log info "${SERVICE_NAME} failed to stop after ${shutdown_timeout}s using SIGTERM. Trying SIGKILL ..." - ocf_run kill -s KILL "${pid}" - fi - - ocf_log info "${SERVICE_NAME} stopped" - - rm -f "${OCF_RESKEY_pid}" - - return "${OCF_SUCCESS}" -} - -####################################################################### - -case "$1" in - meta-data) meta_data - exit $OCF_SUCCESS;; - usage|help) usage - exit $OCF_SUCCESS;; -esac - -# Anything except meta-data and help must pass validation -service_validate || exit $? - -# What kind of method was invoked? -case "$1" in - start) service_start;; - stop) service_stop;; - status) service_status;; - monitor) service_monitor;; - validate-all) ;; - *) usage - exit $OCF_ERR_UNIMPLEMENTED;; -esac - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-sudo b/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-sudo deleted file mode 100644 index 0cf7d2d..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-sudo +++ /dev/null @@ -1,6 +0,0 @@ -Defaults:zabbix !requiretty -zabbix ALL = NOPASSWD: /usr/bin/socat /var/lib/haproxy/stats stdio -zabbix ALL = NOPASSWD: /usr/sbin/iptstate -zabbix ALL = NOPASSWD: /usr/sbin/crm_resource --locate --quiet --resource * -zabbix ALL = NOPASSWD: /usr/bin/ceph health -zabbix ALL = NOPASSWD: /etc/zabbix/scripts/netns.listen.sh diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/facter/check_zabbix_pacemaker.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/facter/check_zabbix_pacemaker.rb deleted file mode 100755 index fac9c03..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/facter/check_zabbix_pacemaker.rb +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -# check_zabbix_pacemaker.rb - -Facter.add('check_zabbix_pacemaker') do - setcode do - crm_cmd = Facter::Util::Resolution.exec('/bin/which crm') - if crm_cmd.nil? then - '' - else - crm_res = Facter::Util::Resolution.exec(crm_cmd + ' status | grep zabbix' ) - end - end -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/facter/check_zabbix_version.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/facter/check_zabbix_version.rb deleted file mode 100755 index 2a45d8b..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/facter/check_zabbix_version.rb +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright 2017 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -# check_zabbix_version.rb - -Facter.add("check_zabbix_version") do - setcode do - qcmd = "/usr/bin/apt-cache" - if FileTest.exists?(qcmd) then - q = qcmd + ' policy zabbix-agent 2>/dev/null' - filter = "egrep 'Installed:|Candidate:' | grep -v 'Installed: (none)' | head -1" - parse = 'cut -d " " -f4 | cut -d: -f2 | cut -d. -f1,2' - res = Facter::Util::Resolution.exec(q + '|' + filter + '|' + parse) - if res.nil? then - '100.0' - else - res - end - else - '100.0' - end - end -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/parser/functions/defined_in_state.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/parser/functions/defined_in_state.rb deleted file mode 100644 index 2a3c296..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/parser/functions/defined_in_state.rb +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -Puppet::Parser::Functions::newfunction( - :defined_in_state, - :type => :rvalue, - :doc => 'Returns True when resource is defined in state.yaml file' -) do |args| - - yaml_file = '/var/lib/puppet/state/state.yaml' - - raise(Puppet::ParseError, "defined_in_state(): Wrong number of arguments " + - "given (#{args.size} for 1)") if args.size != 1 - - resource = args[0] - - begin - yaml = YAML.load_file(yaml_file) - if ! yaml["#{resource}"].nil? - return true - end - rescue Exception => e - Puppet.warning("#{e}") - end - - return false -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/parser/functions/get_server_by_role.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/parser/functions/get_server_by_role.rb deleted file mode 100644 index 9582e28..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/parser/functions/get_server_by_role.rb +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -Puppet::Parser::Functions::newfunction( - :get_server_by_role, - :type => :rvalue, - :doc => 'Returns server node hash by role' -) do |args| - fuel_nodes = args[0] - requested_roles = args[1] - server = "" - fuel_nodes.each do |node| - next unless requested_roles.include?(node['role']) - server = node - end - server -end - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix.rb deleted file mode 100644 index 6140153..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix.rb +++ /dev/null @@ -1,130 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -require 'puppet' -require 'json' -require 'net/http' -class Puppet::Provider::Plugin_zabbix < Puppet::Provider - - @@auth_hash = "" - - def self.message_json(body) - if body[:method] == "user.login" - message = { - :method => body[:method], - :params => body[:params], - :id => rand(9000), - :jsonrpc => '2.0' - } - else - message = { - :method => body[:method], - :params => body[:params], - :auth => auth_hash, - :id => rand(9000), - :jsonrpc => '2.0' - } - end - JSON.generate(message) - end - - def self.make_request(api, body) - uri = URI.parse(api["endpoint"]) - http = Net::HTTP.new(uri.host, uri.port) - http.use_ssl = uri.scheme == 'https' - http.verify_mode = OpenSSL::SSL::VERIFY_NONE - request = Net::HTTP::Post.new(uri.request_uri) - request.add_field("Content-Type", "application/json-rpc") - request.body = message_json(body) - response = http.request(request) - Puppet::debug("request = #{request.body}") - Puppet::debug("response = #{response.body}") - response.value - result = JSON.parse(response.body) - result - end - - def self.api_request(api, body, retries=10) - cooldown = 1 - Puppet.info("Trying to make a request to zabbix server, will try #{retries} times with #{cooldown} seconds between tries") - retries.times do |r| - begin - Puppet.info("Retry ##{r}/#{retries}:") - result = make_request(api, body) - - if result.has_key? "error" - raise(Puppet::Error, "Zabbix API returned error code #{result["error"]["code"]}: #{result["error"]["message"]}, #{result["error"]["data"]}") - end - - return result["result"] - - rescue => e - if r == retries - 1 - Puppet.warning("Out of retries to make a request to zabbix server (#{retries})") - raise e - else - Puppet.warning("Could not make request to zabbix: #{e}, sleeping #{cooldown*r} (retry (##{r}/#{retries}))") - sleep(cooldown*r) - end - end - end - end - - def self.auth(api) - body = {:method => "user.login", - :params => {:user => api["username"], - :password => api["password"]}} - @@auth_hash = api_request(api, body) - end - - def auth(api) - self.class.auth(api) - end - - def api_request(api, body) - self.class.api_request(api, body) - end - - def self.auth_hash - @@auth_hash - end - - def auth_hash - self.class.auth_hash - end - - def self.get_host(api, name) - Puppet::debug("gethost #{name}") - api_request(api, - {:method => "host.get", - :params => {:filter => {:name => [name]}}}) - end - - def self.get_hostgroup(api, name) - Puppet::debug("gethostgroup #{name}") - api_request(api, - {:method => "hostgroup.get", - :params => {:filter => {:name => [name]}}}) - end - - def get_host(api, name) - self.class.get_host(api, name) - end - - def get_hostgroup(api, name) - self.class.get_hostgroup(api, name) - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_configuration_import/ruby.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_configuration_import/ruby.rb deleted file mode 100644 index c27474d..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_configuration_import/ruby.rb +++ /dev/null @@ -1,116 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -$LOAD_PATH.push(File.join(File.dirname(__FILE__), '..', '..', '..')) -require 'puppet/provider/plugin_zabbix' -require 'digest/md5' - -Puppet::Type.type(:plugin_zabbix_configuration_import).provide(:ruby, - :parent => Puppet::Provider::Plugin_zabbix) do - - def exists? - auth(resource[:api]) - macroname = '{$TMPL_' + Pathname.new(resource[:xml_file]).basename.to_s.gsub('.', '_').upcase + '}' - macroid = nil - result = api_request(resource[:api], - {:method => 'usermacro.get', - :params => {:globalmacro => true, - :output => 'extend'}}) - result.each { |macro| macroid = macro['globalmacroid'] if macro['macro'] == macroname } - not macroid.nil? - end - - def create - macroname = '{$TMPL_' + Pathname.new(resource[:xml_file]).basename.to_s.gsub('.', '_').upcase + '}' - xml_file_checksum = config_import(resource[:xml_file]) - api_request(resource[:api], - {:method => 'usermacro.createglobal', - :params => {:macro => macroname, - :value => xml_file_checksum}}) - end - - def destroy - macroname = '{$TMPL_' + Pathname.new(resource[:xml_file]).basename.to_s.gsub('.', '_').upcase + '}' - macroid = nil - result = api_request(resource[:api], - {:method => 'usermacro.get', - :params => {:globalmacro => true, - :output => 'extend'}}) - result.each { |macro| macroid = macro['globalmacroid'] if macro['macro'] == macroname } - api_request(resource[:api], - {:method => 'usermacro.deleteglobal', - :params => [macroid]}) - end - - def xml_file - macrovalue = nil - macroname = '{$TMPL_' + Pathname.new(resource[:xml_file]).basename.to_s.gsub('.', '_').upcase + '}' - result = api_request(resource[:api], - {:method => 'usermacro.get', - :params => {:globalmacro => true, - :output => 'extend'}}) - result.each { |macro| macrovalue = macro['value'] if macro['macro'] == macroname } - macrovalue - end - - def xml_file=(v) - macroid = nil - xml_file_checksum = config_import(resource[:xml_file]) - macroname = '{$TMPL_' + Pathname.new(resource[:xml_file]).basename.to_s.gsub('.', '_').upcase + '}' - result = api_request(resource[:api], - {:method => 'usermacro.get', - :params => {:globalmacro => true, - :output => 'extend'}}) - result.each { |macro| macroid = macro['globalmacroid'] if macro['macro'] == macroname } - api_request(resource[:api], - {:method => 'usermacro.updateglobal', - :params => {:globalmacroid => macroid, - :value => xml_file_checksum}}) - end - - def config_import(xml_file) - xml_file_content = Puppet::Util::FileType.filetype(:flat).new(xml_file).read - xml_file_checksum = Digest::MD5.hexdigest(xml_file_content) - api_request(resource[:api], - {:method => 'configuration.import', - :params => {:format => 'xml', - :source => xml_file_content, - :rules => {:applications => {:createMissing => true, - :updateExisting => true}, - :discoveryRules => {:createMissing => true, - :updateExisting => true}, - :graphs => {:createMissing => true, - :updateExisting => true}, - :groups => {:createMissing => true, - :updateExisting => true}, - :images => {:createMissing => true, - :updateExisting => true}, - :items => {:createMissing => true, - :updateExisting => true}, - :maps => {:createMissing => true, - :updateExisting => true}, - :screens => {:createMissing => true, - :updateExisting => true}, - :templateLinkage => {:createMissing => true}, - :templates => {:createMissing => true, - :updateExisting => true}, - :templateScreens => {:createMissing => true, - :updateExisting => true}, - :triggers => {:createMissing => true, - :updateExisting => true}}}}) - xml_file_checksum - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_host/ruby.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_host/ruby.rb deleted file mode 100644 index 1f573f1..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_host/ruby.rb +++ /dev/null @@ -1,67 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -$LOAD_PATH.push(File.join(File.dirname(__FILE__), '..', '..', '..')) -require 'puppet/provider/plugin_zabbix' - -Puppet::Type.type(:plugin_zabbix_host).provide(:ruby, - :parent => Puppet::Provider::Plugin_zabbix) do - - def exists? - auth(resource[:api]) - result = get_host(resource[:api], resource[:name]) - not result.empty? - end - - def create - groups = Array.new - resource[:groups].each do |group| - group_id = get_hostgroup(resource[:api], group) - raise(Puppet::Error, "Group #{group} does not exist") unless not group_id.empty? - groups.push({ - :groupid => group_id[0]["groupid"] - }) - end - - params = {:host => resource[:host], - :status => resource[:status], - :interfaces => [{:type => resource[:type] == nil ? "1" : resource[:type], - :main =>1, - :useip => resource[:ip] == nil ? 0 : 1, - :usedns => resource[:ip] == nil ? 1 : 0, - :dns => resource[:host], - :ip => resource[:ip] == nil ? "" : resource[:ip], - :port => resource[:port] == nil ? "10050" : resource[:port],}], - :proxy_hostid => resource[:proxy_hostid] == nil ? 0 : resource[:proxy_hostid], - :groups => groups} - - api_request(resource[:api], - {:method => "host.create", - :params => params}) - end - - def destroy - hostid = get_host(resource[:api], resource[:name])[0]["hostid"] - # deactivate before removing - api_request(resource[:api], - {:method => 'host.update', - :params => {:hostid => hostid, - :status => 1}}) - - api_request(resource[:api], - {:method => 'host.delete', - :params => [{:hostid => hostid}]}) - end -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_hostgroup/ruby.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_hostgroup/ruby.rb deleted file mode 100644 index e6d8745..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_hostgroup/ruby.rb +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -$LOAD_PATH.push(File.join(File.dirname(__FILE__), '..', '..', '..')) -require 'puppet/provider/plugin_zabbix' - -Puppet::Type.type(:plugin_zabbix_hostgroup).provide(:ruby, - :parent => Puppet::Provider::Plugin_zabbix) do - - def exists? - auth(resource[:api]) - result = get_hostgroup(resource[:api], resource[:name]) - not result.empty? - end - - def create - api_request(resource[:api], - {:method => "hostgroup.create", - :params => {:name => resource[:name]}}) - end - - def destroy - groupid = get_hostgroup(resource[:api], resource[:name])[0]["groupid"] - api_request(resource[:api], - {:method => "hostgroup.delete", - :params => [groupid]}) - end -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_template_link/ruby.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_template_link/ruby.rb deleted file mode 100644 index 52bbd4a..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_template_link/ruby.rb +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -$LOAD_PATH.push(File.join(File.dirname(__FILE__), '..', '..', '..')) -require 'puppet/provider/plugin_zabbix' -require 'digest/md5' - -Puppet::Type.type(:plugin_zabbix_template_link).provide(:ruby, - :parent => Puppet::Provider::Plugin_zabbix) do - - def get_ids_by_host(hostid) - results = [] - api_request(resource[:api], - {:method => "template.get", - :params => {:hostids => [hostid]}}).each do |template| - results << template["templateid"] - end - results - end - - def exists? - auth(resource[:api]) - hostid = get_host(resource[:api], resource[:host]) - raise(Puppet::Error, "Host #{resource[:host]} does not exist") unless not hostid.empty? - templateid = api_request(resource[:api], - {:method => "template.get", - :params => {:filter => {:host => [resource[:template]]}}}) - raise(Puppet::Error, "Template #{resource[:template]} does not exist") unless not templateid.empty? - - get_ids_by_host(hostid[0]["hostid"]).include?(templateid[0]["templateid"]) - end - - def create - hostid = get_host(resource[:api], resource[:host]) - templateid = api_request(resource[:api], - {:method => "template.get", - :params => {:filter => {:host => [resource[:template]]}}}) - api_request(resource[:api], - {:method => "template.massAdd", - :params => {:hosts => [{:hostid => hostid[0]["hostid"]}], - :templates => [{:templateid => templateid[0]["templateid"]}]}}) - end - - def destroy - hostid = get_host(resource[:api], resource[:host]) - templateid = api_request(resource[:api], - {:method => "template.get", - :params => {:filter => {:host => [resource[:template]]}}}) - api_request(resource[:api], - {:method => "template.massRemove", - :params => {:hostids => [hostid[0]["hostid"]], - :templateids => templateid[0]["templateid"]}}) - end -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_usermacro/ruby.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_usermacro/ruby.rb deleted file mode 100644 index 4f008e1..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/provider/plugin_zabbix_usermacro/ruby.rb +++ /dev/null @@ -1,131 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -$LOAD_PATH.push(File.join(File.dirname(__FILE__), '..', '..', '..')) -require 'puppet/provider/plugin_zabbix' - -Puppet::Type.type(:plugin_zabbix_usermacro).provide(:ruby, - :parent => Puppet::Provider::Plugin_zabbix) do - - def exists? - auth(resource[:api]) - macroid = nil - if resource[:global] == :true - result = api_request(resource[:api], - {:method => "usermacro.get", - :params => {:globalmacro => true, - :output => "extend"}}) - result.each { |macro| macroid = macro["globalmacroid"] if macro['macro'] == resource[:macro] } - else - hostid = get_host(resource[:api], resource[:host]) - raise(Puppet::Error, "Host #{resource[:host]} does not exist") unless not hostid.empty? - result = api_request(resource[:api], - {:method => 'usermacro.get', - :params => {"hostids" => hostid[0]["hostid"], - :output => "extend"}}) - macroid = nil - result.each { |macro| macroid = macro['hostmacroid'] if macro['macro'] == resource[:macro] } - end - not macroid.nil? - end - - def create - if resource[:global] == :true - api_request(resource[:api], - {:method => 'usermacro.createglobal', - :params => {:macro => resource[:macro], - :value => resource[:value]}}) - else - hostid = get_host(resource[:api], resource[:host]) - api_request(resource[:api], - {:method => 'usermacro.create', - :params => {:macro => resource[:macro], - :value => resource[:value], - :hostid => hostid[0]["hostid"]}}) - end - end - - def destroy - macroid = nil - if resource[:global] == :true - result = api_request(resource[:api], - {:method => 'usermacro.get', - :params => {:globalmacro => true, - :output => "extend"}}) - result.each { |macro| macroid = macro['globalmacroid'] if macro['macro'] == resource[:macro] } - api_request(resource[:api], - {:method => 'usermacro.deleteglobal', - :params => [macroid]}) - else - hostid = get_host(resource[:api], resource[:host]) - result = api_request(resource[:api], - {:method => 'usermacro.get', - :params => {:hostids => hostid[0]["hostid"], - :output => "extend"}}) - result.each { |macro| macroid = macro['hostmacroid'] if macro['macro'] == resource[:macro] } - api_request(resource[:api], - {:method => 'usermacro.delete', - :params => [macroid]}) - end - end - - def value - #get value - macrovalue = nil - if resource[:global] == :true - result = api_request(resource[:api], - {:method => 'usermacro.get', - :params => {:globalmacro => true, - :output => "extend"}}) - result.each { |macro| macrovalue = macro['value'] if macro['macro'] == resource[:macro] } - else - hostid = get_host(resource[:api], resource[:host]) - result = api_request(resource[:api], - {:method => 'usermacro.get', - :params => {:hostids => hostid[0]["hostid"], - :output => "extend"}}) - result.each { |macro| macrovalue = macro['value'] if macro['macro'] == resource[:macro] } - end - macrovalue - end - - def value=(v) - #set value - macroid = nil - if resource[:global] == :true - result = api_request(resource[:api], - {:method => 'usermacro.get', - :params => {:globalmacro => true, - :output => "extend"}}) - result.each { |macro| macroid = macro['globalmacroid'].to_i if macro['macro'] == resource[:macro] } - api_request(resource[:api], - {:method => 'usermacro.updateglobal', - :params => {:globalmacroid => macroid, - :value => resource[:value]}}) - else - hostid = get_host(resource[:api], resource[:host]) - result = api_request(resource[:api], - {:method => 'usermacro.get', - :params => {:hostids => hostid[0]["hostid"], - :output => "extend"}}) - result.each { |macro| macroid = macro['hostmacroid'].to_i if macro['macro'] == resource[:macro] } - api_request(resource[:api], - {:method => 'usermacro.update', - :params => {:hostmacroid => macroid, - :value => resource[:value]}}) - end - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_configuration_import.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_configuration_import.rb deleted file mode 100644 index 885ebc0..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_configuration_import.rb +++ /dev/null @@ -1,74 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -require 'puppet/util/filetype' -require 'digest/md5' - -Puppet::Type.newtype(:plugin_zabbix_configuration_import) do - desc <<-EOT - Import Zabbix configuration from a file. - EOT - - ensurable - # do - # defaultvalues - # defaultto :present - # end - - newparam(:name, :namevar => true) do - desc 'Name of import.' - end - - newparam(:api) do - desc 'Zabbix api info: endpoint, username, password.' - isrequired - - validate do |value| - fail("api is not a hash") unless value.kind_of?(Hash) - fail("api hash does not contain username") unless value.has_key?("username") - fail("username is not valid") unless value['username'] =~ /.+/ - fail("api hash does not contain password") unless value.has_key?("password") - fail("password is not valid") unless value['password'] =~ /.+/ - fail("api hash does not contain endpoint") unless value.has_key?("endpoint") - fail("endpoint is not valid") unless value['endpoint'] =~ /http(s)?:\/\/.+/ - end - end - - newproperty(:xml_file) do - desc 'xml file' - isrequired - - validate do |value| - unless Pathname.new(value).absolute? - fail("Invalid xml_file path #{value}") - end - end - - def insync?(is) - xml_file_content = Puppet::Util::FileType.filetype(:flat).new(value).read - if is == Digest::MD5.hexdigest(xml_file_content) - true - else - false - end - end - - end - - autorequire(:file) do - [@parameters[:xml_file]] - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_host.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_host.rb deleted file mode 100644 index eb0a083..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_host.rb +++ /dev/null @@ -1,123 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -Puppet::Type.newtype(:plugin_zabbix_host) do - desc <<-EOT - Manage a host in Zabbix - EOT - - ensurable do - defaultvalues - defaultto :present - end - - newparam(:host, :namevar => true) do - desc 'Technical name of the host.' - newvalues(/.+/) - end - - newparam(:ip) do - desc <<-EOT - IP of the host. - - Set this for the default interface to be - ip based. Use zabbix_host_interface to add - additional interfaces if you want dns on - the main agent and an ip for others. - EOT - isrequired - newvalues(/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/) - end - - newparam(:type) do - desc <<-EOT - Zabbix host type. - 1 - ip interface - 2 - snmp interface - ... - EOT - end - - newparam(:port) do - desc <<-EOT - Port of the host. - - EOT - newvalues(/^[0-9]{1,5}$/) - end - - newparam(:groups) do - desc 'Host groups to add the host to.' - isrequired - - validate do |value| - fail("groups is not an array") unless value.kind_of?(Array) or value.kind_of?(String) - fail("groups array is empty") if value.empty? - if value.kind_of?(String) then - value = [value] - end - value.each do |item| - fail("group name is not a string") unless item.kind_of?(String) - fail("group name is empty") unless item =~ /.+/ - end - end - end - - newparam(:hostname) do - desc 'Visible name of the host.' - - validate do |value| - raise(Puppet::Error, 'Invalid value') unless value.kind_of?(String) - end - newvalues(/.+/) - end - - newparam(:proxy_hostid) do - desc 'ID of the proxy that is used to monitor the host.' - - validate do |value| - fail("proxy_hostid is not an integer or integer string") unless value.kind_of?(Integer) or value =~ /[0-9]+/ - end - end - - newparam(:status) do - desc <<-EOT - Status and function of the host. - - Possible values are: - * 0 - (default) monitored host; - * 1 - unmonitored host. - EOT - newvalues(0, 1) - defaultto 0 - end - - newparam(:api) do - desc 'Zabbix api info: endpoint, username, password.' - isrequired - - validate do |value| - fail("api is not a hash") unless value.kind_of?(Hash) - fail("api hash does not contain username") unless value.has_key?("username") - fail("username is not valid") unless value['username'] =~ /.+/ - fail("api hash does not contain password") unless value.has_key?("password") - fail("password is not valid") unless value['password'] =~ /.+/ - fail("api hash does not contain endpoint") unless value.has_key?("endpoint") - fail("endpoint is not valid") unless value['endpoint'] =~ /http(s)?:\/\/.+/ - end - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_hostgroup.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_hostgroup.rb deleted file mode 100644 index 99e7845..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_hostgroup.rb +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -Puppet::Type.newtype(:plugin_zabbix_hostgroup) do - desc <<-EOT - Manage a host group in Zabbix - EOT - - ensurable do - defaultvalues - defaultto :present - end - - newparam(:name, :namevar => true) do - desc 'Name of the host group.' - newvalues(/.+/) - end - - newparam(:api) do - desc 'Zabbix api info: endpoint, username, password.' - isrequired - - validate do |value| - fail("api is not a hash") unless value.kind_of?(Hash) - fail("api hash does not contain username") unless value.has_key?("username") - fail("username is not valid") unless value['username'] =~ /.+/ - fail("api hash does not contain password") unless value.has_key?("password") - fail("password is not valid") unless value['password'] =~ /.+/ - fail("api hash does not contain endpoint") unless value.has_key?("endpoint") - fail("endpoint is not valid") unless value['endpoint'] =~ /http(s)?:\/\/.+/ - end - end -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_template_link.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_template_link.rb deleted file mode 100644 index eee22d3..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_template_link.rb +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -Puppet::Type.newtype(:plugin_zabbix_template_link) do - desc <<-EOT - Manage a template link in Zabbix - EOT - - ensurable do - defaultvalues - defaultto :present - end - - newparam(:name, :namevar => true) do - desc 'Template link name.' - newvalues(/.+/) - end - - newparam(:host) do - desc 'Technical name of the host.' - newvalues(/.+/) - isrequired - end - - newparam(:template) do - desc 'Template name to link the host to.' - newvalues(/.+/) - isrequired - end - - newparam(:api) do - desc 'Zabbix api info: endpoint, username, password.' - isrequired - - validate do |value| - fail("api is not a hash") unless value.kind_of?(Hash) - fail("api hash does not contain username") unless value.has_key?("username") - fail("username is not valid") unless value['username'] =~ /.+/ - fail("api hash does not contain password") unless value.has_key?("password") - fail("password is not valid") unless value['password'] =~ /.+/ - fail("api hash does not contain endpoint") unless value.has_key?("endpoint") - fail("endpoint is not valid") unless value['endpoint'] =~ /http(s)?:\/\/.+/ - end - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_usermacro.rb b/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_usermacro.rb deleted file mode 100644 index 94441fb..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/lib/puppet/type/plugin_zabbix_usermacro.rb +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -Puppet::Type.newtype(:plugin_zabbix_usermacro) do - desc <<-EOT - Manage a macro in Zabbix. - EOT - - ensurable do - defaultvalues - defaultto :present - end - - newparam(:name, :namevar => true) do - desc 'namevar' - newvalues(/.+/) - end - - newparam(:api) do - desc 'Zabbix api info: endpoint, username, password.' - isrequired - - validate do |value| - fail("api is not a hash") unless value.kind_of?(Hash) - fail("api hash does not contain username") unless value.has_key?("username") - fail("username is not valid") unless value['username'] =~ /.+/ - fail("api hash does not contain password") unless value.has_key?("password") - fail("password is not valid") unless value['password'] =~ /.+/ - fail("api hash does not contain endpoint") unless value.has_key?("endpoint") - fail("endpoint is not valid") unless value['endpoint'] =~ /http(s)?:\/\/.+/ - end - end - - newparam(:macro) do - desc 'Macro name' - isrequired - newvalues(/.+/) - end - - newproperty(:value) do - desc 'Macro value' - isrequired - newvalues(/.+/) - end - - newparam(:global) do - desc <<-EOT - Macro global flag. If true macro is global. - If false macro belongs to host/template. - EOT - defaultto(:false) - newvalues(:true, :false) - end - - newparam(:host) do - desc 'Host' - newvalues(/.+/) - end - - validate do - fail('host should not be provided when global is true') if - self[:global] == :true and not self[:host].nil? - fail('host is required when global is false') if - self[:global] == :false and self[:host].nil? - end -end - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/agent.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/agent.pp deleted file mode 100644 index 0f32708..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/agent.pp +++ /dev/null @@ -1,112 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::agent( - $api_hash = undef, -) { - - include plugin_zabbix::params - - $fuel_version = 0 + hiera('fuel_version') - - if $fuel_version < 8.0 { - $cur_node_roles = node_roles(hiera_array('nodes'), hiera('uid')) - $is_controller = member($cur_node_roles, 'controller') or - member($cur_node_roles, 'primary-controller') - } else { - $is_controller = roles_include(['controller', 'primary-controller']) - } - - $zabbix_agent_port = $plugin_zabbix::params::zabbix_ports['backend_agent'] ? { - unset=>$plugin_zabbix::params::zabbix_ports['agent'], - default=>$plugin_zabbix::params::zabbix_ports['backend_agent'], - } - - firewall { '997 zabbix agent': - port => $zabbix_agent_port, - proto => 'tcp', - action => 'accept' - } - - package { $plugin_zabbix::params::agent_pkg: - ensure => present - } -> - package { $plugin_zabbix::params::sender_pkg: - ensure => present - } -> - package { $plugin_zabbix::params::get_pkg: - ensure => present - } -> - file { $plugin_zabbix::params::agent_include: - ensure => directory, - mode => '0500', - owner => 'zabbix', - group => 'zabbix' - } -> - file { $plugin_zabbix::params::agent_config: - ensure => present, - content => template($plugin_zabbix::params::agent_config_template), - notify => Service[$plugin_zabbix::params::agent_service] - } -> - service { $plugin_zabbix::params::agent_service: - ensure => running, - enable => true, - } - - if $is_controller { - $groups = union($plugin_zabbix::params::host_groups_base, $plugin_zabbix::params::host_groups_controller) - } elsif defined_in_state(Class['nova::compute']) { - $groups = union($plugin_zabbix::params::host_groups_base, $plugin_zabbix::params::host_groups_compute) - } else { - $groups = $plugin_zabbix::params::host_groups_base - } - - if defined_in_state(Class['ceph::osds']){ - $ceph_osd_group = $plugin_zabbix::params::host_groups_ceph_osd - $ceph_osd_used = true - } else { - $ceph_osd_group = [] - $ceph_osd_used = false - } - - if defined_in_state(Class['ceph::mon']){ - $ceph_mon_group = $plugin_zabbix::params::host_groups_ceph_mon - $ceph_mon_used = true - } else { - $ceph_mon_group = [] - $ceph_mon_used = false - } - - if $ceph_osd_used or $ceph_mon_used { - $ceph_cluster_group = $plugin_zabbix::params::host_groups_ceph_cluster - } else { - $ceph_cluster_group = [] - } - - if ! empty($ceph_cluster_group){ - $all_groups = parseyaml( - inline_template('<%= @groups.concat(@ceph_mon_group).concat(@ceph_osd_group).concat(@ceph_cluster_group).to_yaml %>') - ) - } else { - $all_groups = $groups - } - - plugin_zabbix_host { $plugin_zabbix::params::host_name: - host => $plugin_zabbix::params::host_name, - ip => $plugin_zabbix::params::host_ip, - groups => $all_groups, - api => $api_hash - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/agent/scripts.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/agent/scripts.pp deleted file mode 100644 index b08f2b3..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/agent/scripts.pp +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::agent::scripts { - - include plugin_zabbix::params - - file { $plugin_zabbix::params::agent_scripts: - ensure => directory, - recurse => true, - purge => true, - force => true, - mode => '0755', - source => 'puppet:///modules/plugin_zabbix/scripts', - } - - file { '/etc/zabbix/check_api.conf': - ensure => present, - content => template('plugin_zabbix/check_api.conf.erb'), - } - - file { '/etc/zabbix/check_rabbit.conf': - ensure => present, - content => template('plugin_zabbix/check_rabbit.conf.erb'), - } - - file { '/etc/zabbix/check_db.conf': - ensure => present, - content => template('plugin_zabbix/check_db.conf.erb'), - } - - if ! defined(Package['sudo']) { - package { 'sudo': - ensure => installed - } - } - - file { 'zabbix_no_requiretty': - path => '/etc/sudoers.d/zabbix', - mode => '0440', - owner => root, - group => root, - source => 'puppet:///modules/plugin_zabbix/zabbix-sudo', - require => Package['sudo'], - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/agent/userparameter.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/agent/userparameter.pp deleted file mode 100644 index c7c5703..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/agent/userparameter.pp +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -define plugin_zabbix::agent::userparameter ( - $ensure = present, - $command = undef, - $key = undef, - $index = undef, - $file = undef, - $template = 'plugin_zabbix/zabbix_agent_userparam.conf.erb' -) { - - include plugin_zabbix::params - - $key_real = $key ? { - undef => $name, - default => $key - } - - $index_real = $index ? { - undef => '', - default => "${index}_", - } - - $file_real = $file ? { - undef => "${::plugin_zabbix::params::agent_include}/${index_real}${name}.conf", - default => $file, - } - - file { $file_real: - ensure => $ensure, - content => template($template), - notify => Service[$plugin_zabbix::params::agent_service] - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/controller.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/controller.pp deleted file mode 100644 index cbbef20..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/controller.pp +++ /dev/null @@ -1,141 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -# This empty class is used further down to communicate properly with -# local MySQL server using existing .my.cnf configuration unchanged -class dummy::mysql::server { -} - -class plugin_zabbix::controller { - - $fuel_version = 0 + hiera('fuel_version') - - $zabbix_pcmk_managed = $::check_zabbix_pacemaker - - include plugin_zabbix::params - $host = regsubst($plugin_zabbix::params::db_ip,'^(\d+\.\d+\.\d+\.)\d+','\1%') - - file { '/etc/dbconfig-common': - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', - } - - file { '/etc/dbconfig-common/zabbix-server-mysql.conf': - ensure => present, - require => File['/etc/dbconfig-common'], - mode => '0600', - source => 'puppet:///modules/plugin_zabbix/zabbix-server-mysql.conf', - } - - package { $plugin_zabbix::params::server_pkg: - ensure => present, - require => File['/etc/dbconfig-common/zabbix-server-mysql.conf'], - } - - file { $plugin_zabbix::params::server_config: - ensure => present, - require => Package[$plugin_zabbix::params::server_pkg], - content => template($plugin_zabbix::params::server_config_template), - } - - file { $plugin_zabbix::params::zabbix_extra_conf_dir: - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', - require => Package[$plugin_zabbix::params::server_pkg], - } - - file { 'zabbix-server-ocf' : - ensure => present, - path => join([ - $plugin_zabbix::params::ocf_scripts_dir, - "/${plugin_zabbix::params::ocf_scripts_provider}", - "/${plugin_zabbix::params::server_service}"], ''), - mode => '0755', - owner => 'root', - group => 'root', - source => 'puppet:///modules/plugin_zabbix/zabbix-server.ocf', - } - if $zabbix_pcmk_managed == '' { - service { "${plugin_zabbix::params::server_service}-init-stopped": - ensure => 'stopped', - name => $plugin_zabbix::params::server_service, - enable => false, - require => File[$plugin_zabbix::params::server_config], - } - } - service { "${plugin_zabbix::params::server_service}-started": - ensure => running, - name => "p_${plugin_zabbix::params::server_service}", - enable => true, - provider => 'pacemaker', - } - - if $zabbix_pcmk_managed == '' { - File['zabbix-server-ocf'] -> - Service["${plugin_zabbix::params::server_service}-init-stopped"] -> - Service["${plugin_zabbix::params::server_service}-started"] - } else { - File['zabbix-server-ocf'] -> Service["${plugin_zabbix::params::server_service}-started"] - } - sysctl::value { 'kernel.shmmax': - value => $plugin_zabbix::params::sysctl_kernel_shmmax, - notify => Service["${plugin_zabbix::params::server_service}-started"], - } - - if $fuel_version < 9.0 { - class { '::mysql::server': - custom_setup_class => 'dummy::mysql::server', - } - } else { - # Class used to prevent the installation of a mysql-client-X.Y that may not be - # compatible with the mysql-client meta-package that is installed by - # mysql Puppet module. - class { '::mysql::client': - package_manage => false, - } - } - - mysql::db { $plugin_zabbix::params::db_name: - user => $plugin_zabbix::params::db_user, - password => $plugin_zabbix::params::db_password, - host => $host, - } - - if $plugin_zabbix::params::frontend { - class { 'plugin_zabbix::frontend': - require => File[$plugin_zabbix::params::server_config], - before => Class['plugin_zabbix::ha::haproxy'], - } - } - - include plugin_zabbix::ha::haproxy - - firewall { '998 zabbix agent vip': - proto => 'tcp', - action => 'accept', - port => $plugin_zabbix::params::zabbix_ports['agent'], - } - - firewall { '998 zabbix server vip': - proto => 'tcp', - action => 'accept', - port => $plugin_zabbix::params::zabbix_ports['server'], - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/db/mysql.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/db/mysql.pp deleted file mode 100644 index 766d697..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/db/mysql.pp +++ /dev/null @@ -1,80 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::db::mysql( - $db_ip = undef, - $db_password = 'zabbix', -) { - - include plugin_zabbix::params - $db_vip = hiera('database_vip') - $mysql_db = hiera('mysql') - $db_passwd = $mysql_db['root_password'] - - $fuel_version = 0 + hiera('fuel_version') - - if $fuel_version < 9.0 { - $mysql_extras_args = '' - $next_require = Database[$plugin_zabbix::params::db_name] - } else { - # For some reason on MOS 9.0 the mysql command does not seem to be using - # the existing /root/.my.cnf file therefore credentials and host - # have to be specified - $mysql_extras_args = "-h${db_vip} -uroot -p${db_passwd}" - $next_require = Mysql::Db[$plugin_zabbix::params::db_name] - } - - file { '/tmp/zabbix': - ensure => directory, - mode => '0755', - } - - file { '/tmp/zabbix/data_clean.sql': - ensure => present, - require => File['/tmp/zabbix'], - content => template('plugin_zabbix/data_clean.erb'), - } - - exec { 'prepare-schema-1': - command => $plugin_zabbix::params::prepare_schema_cmd, - creates => '/tmp/zabbix/schema.sql', - path => ['/usr/sbin', '/usr/bin', '/sbin', '/bin'], - require => [File['/tmp/zabbix'], Package[$plugin_zabbix::params::server_pkg]], - notify => Exec['prepare-schema-2'], - } - - exec { 'prepare-schema-2': - command => 'cat /tmp/zabbix/data_clean.sql >> /tmp/zabbix/schema.sql', - path => ['/usr/sbin', '/usr/bin', '/sbin', '/bin'], - refreshonly => true, - require => File['/tmp/zabbix/data_clean.sql'], - } - - exec { "${plugin_zabbix::params::db_name}-import": - command => "/usr/bin/mysql ${mysql_extras_args} ${plugin_zabbix::params::db_name} < /tmp/zabbix/schema.sql", - logoutput => true, - refreshonly => true, - subscribe => $next_require, - require => Exec['prepare-schema-2'], - } - - exec { 'purge-tmp-dir': - command => 'rm -rf /tmp/zabbix', - path => ['/usr/sbin', '/usr/bin', '/sbin', '/bin'], - logoutput => true, - refreshonly => true, - subscribe => Exec["${plugin_zabbix::params::db_name}-import"], - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/frontend.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/frontend.pp deleted file mode 100644 index 8ec51f9..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/frontend.pp +++ /dev/null @@ -1,171 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::frontend { - - include phpfpm - include plugin_zabbix::params - - $fuel_version = 0 + hiera('fuel_version') - - $php_conf_hash = { - 'date.timezone' => 'UTC', - 'memory_limit' => '256M', - 'max_execution_time' => '300', - 'post_max_size' => '16M', - 'upload_max_filesize' => '2M', - 'max_input_time' => '300', - } - if $fuel_version >= 10.0 { - # PHP 5.6.x version which is used on Xenial deprecates this variable - # and the recommended value is -1 - # See http://php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data - $php_conf_hash['always_populate_raw_post_data'] = -1 - } - - service { $plugin_zabbix::params::frontend_service: - ensure => 'running', - enable => true, - hasstatus => true, - hasrestart => true, - } - - package { $plugin_zabbix::params::frontend_pkg: - ensure => present, - require => [ - File['/etc/dbconfig-common/zabbix-server-mysql.conf'], - Package[$plugin_zabbix::params::php_fpm_pkg], - Package[$plugin_zabbix::params::php_mysql_pkg], - Package[$plugin_zabbix::params::apache_fcgi_pkg] - ], - } - - package { $plugin_zabbix::params::php_common_pkg: - ensure => present - } - - package { $plugin_zabbix::params::apache_fcgi_pkg: - ensure => present - } - - package { $plugin_zabbix::params::php_mysql_pkg: - ensure => present - } - - file { $plugin_zabbix::params::frontend_config: - ensure => present, - content => template($plugin_zabbix::params::frontend_config_template), - notify => Service[$plugin_zabbix::params::frontend_service], - require => Package[$plugin_zabbix::params::frontend_pkg], - } - - # do not use prefork as it is incompatible with MOS 8.0 / Liberty - # So need to enable a few more Apache modules to work with PHP-FPM - # and mod worker - case $::osfamily { - 'RedHat': { - # default line: "HTTPD=/usr/sbin/httpd.worker" - # target line: "HTTPD=/usr/sbin/httpd" - # we need to remove .worker suffix (to disable mpm_worker) - # match parameter must match the common part of default and target lines - file_line { 'httpd_mpm_prefork': - path => '/etc/sysconfig/httpd', - line => 'HTTPD=/usr/sbin/httpd', - match => '^HTTPD=/usr/sbin/httpd', - notify => Service[$plugin_zabbix::params::frontend_service], - require => Package[$plugin_zabbix::params::frontend_pkg], - } - } - 'Debian': { - # Activate all modules required by $frontend_service_template - exec { 'enable-apache-actions': - command => 'a2enmod actions', - path => ['/usr/sbin', '/usr/bin', '/sbin', '/bin'], - notify => Service[$plugin_zabbix::params::frontend_service], - require => Package[$plugin_zabbix::params::frontend_pkg], - } - - exec { 'enable-apache-rewrite': - command => 'a2enmod rewrite', - path => ['/usr/sbin', '/usr/bin', '/sbin', '/bin'], - notify => Service[$plugin_zabbix::params::frontend_service], - require => Package[$plugin_zabbix::params::frontend_pkg], - } - - exec { 'enable-apache-expires': - command => 'a2enmod expires', - path => ['/usr/sbin', '/usr/bin', '/sbin', '/bin'], - notify => Service[$plugin_zabbix::params::frontend_service], - require => Package[$plugin_zabbix::params::frontend_pkg], - } - - exec { 'enable-apache-fastcgi': - command => 'a2enmod fastcgi', - path => ['/usr/sbin', '/usr/bin', '/sbin', '/bin'], - notify => Service[$plugin_zabbix::params::frontend_service], - require => Package[$plugin_zabbix::params::frontend_pkg], - } - - # Cleanup existing default pools - phpfpm::pool { 'www': - ensure => 'absent', - } - - # Create Zabbix TCP pool using 127.0.0.1, port 9003 (default) - phpfpm::pool { 'zabbix': - listen => sprintf('127.0.0.1:%s', $plugin_zabbix::params::zabbix_ports['fcgi']), - require => Package[$plugin_zabbix::params::php_fpm_pkg], - notify => Service[$plugin_zabbix::params::php_fpm_service], - php_value => $php_conf_hash, - } - - file_line { 'set expose_php to off': - path => $plugin_zabbix::params::php_config, - match => 'expose_php =', - line => 'expose_php = Off', - require => Package[$plugin_zabbix::params::frontend_pkg], - } - } - default: {} - } - - # postinst script in zabbix-frontend-php package creates an invalid symlink - # hack: in debconf disable apache configuration and restarting - # and create the symlink manually then restart apache - case $::osfamily { - 'Debian': { - exec { 'configure zabbix-frontend-php package': - command => join([ - 'echo "zabbix-frontend-php zabbix-frontend-php/configure-apache', - ' boolean false\nzabbix-frontend-php', - ' zabbix-frontend-php/restart-webserver boolean false"', - ' | debconf-set-selections'], ''), - provider => 'shell', - before => Package[$plugin_zabbix::params::frontend_pkg], - } - - # Apache configuration from template - file { $plugin_zabbix::params::frontend_service_config: - ensure => present, - content => template($plugin_zabbix::params::frontend_service_template), - notify => Service[$plugin_zabbix::params::frontend_service], - require => Package[$plugin_zabbix::params::frontend_pkg], - } - } - default: { - fail("unsuported osfamily ${::osfamily}, currently Debian is the only supported platform") - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/ha/haproxy.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/ha/haproxy.pp deleted file mode 100644 index 8439787..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/ha/haproxy.pp +++ /dev/null @@ -1,177 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::ha::haproxy { - - include openstack::ha::haproxy_restart - - Haproxy::Service { use_include => true } - Haproxy::Balancermember { use_include => true } - Haproxy::Listen { use_include => true } - - $public_vip = hiera('public_vip') - $ssl = hiera('public_ssl') - $zabbix_vip = $plugin_zabbix::params::server_ip - $mgmt_vip = $plugin_zabbix::params::mgmt_vip - $network_metadata = hiera_hash('network_metadata') - $primary_controller_nodes = get_nodes_hash_by_roles($network_metadata, ['primary-controller']) - $controllers = get_nodes_hash_by_roles($network_metadata, ['primary-controller', 'controller']) - $server_names = keys($controllers) - $ipaddresses = values(get_node_to_ipaddr_map_by_network_role($controllers, 'management')) - Plugin_zabbix::Ha::Haproxy_service { - server_names => $server_names, - ipaddresses => $ipaddresses, - public_virtual_ip => $public_vip, - internal_virtual_ip => $zabbix_vip, - } - - plugin_zabbix::ha::haproxy_service { 'zabbix-agent': - order => '210', - listen_port => $plugin_zabbix::params::zabbix_ports['agent'], - balancermember_port => $plugin_zabbix::params::zabbix_ports['backend_agent'], - haproxy_config_options => { - 'option' => ['tcpka'], - 'timeout client' => '48h', - 'timeout server' => '48h', - 'balance' => 'roundrobin', - 'mode' => 'tcp' - }, - balancermember_options => 'check inter 5000 rise 2 fall 3', - notify => Exec['haproxy-restart'], - } - - $horizon_is_here = defined_in_state(Class['openstack::ha::horizon']) - - # Always configure HTTPS if a certificate is available - $use_ssl = $ssl[horizon] or $ssl[services] - - # Defaults for any haproxy_service within this class - # This is used only when horizon is not deployed on controllers - Openstack::Ha::Haproxy_service { - internal_virtual_ip => $zabbix_vip, - ipaddresses => $ipaddresses, - public_virtual_ip => $public_vip, - server_names => $server_names, - public => true, - internal => true, - } - - if $use_ssl { - if $horizon_is_here { - if $ssl[horizon] { - # Update Horizon configuration to be able to use HTTPS port - file_line { 'add binding to Zabbix VIP for horizon and zabbix via ssl': - path => '/etc/haproxy/conf.d/017-horizon-ssl.cfg', - after => 'listen horizon-ssl', - line => " bind ${zabbix_vip}:443 ssl crt /var/lib/astute/haproxy/public_haproxy.pem", - notify => Exec['haproxy-restart'] - } - -> - file_line { 'add binding to management VIP for horizon and zabbix via ssl': - path => '/etc/haproxy/conf.d/017-horizon-ssl.cfg', - after => 'listen horizon-ssl', - line => " bind ${mgmt_vip}:443 ssl crt /var/lib/astute/haproxy/public_haproxy.pem", - notify => Exec['haproxy-restart'] - } - } else { - # Update Horizon configuration to be able to use HTTP port - file_line { 'add binding to Zabbix VIP for horizon and zabbix': - path => '/etc/haproxy/conf.d/015-horizon.cfg', - after => 'listen horizon', - line => " bind ${zabbix_vip}:80", - notify => Exec['haproxy-restart'] - } - -> - file_line { 'add binding to management VIP for horizon and zabbix': - path => '/etc/haproxy/conf.d/015-horizon.cfg', - after => 'listen horizon', - line => " bind ${mgmt_vip}:80", - notify => Exec['haproxy-restart'] - } - } - } else { - openstack::ha::haproxy_service { 'zabbix-ui': - order => '211', - listen_port => 80, - server_names => undef, - ipaddresses => undef, - haproxy_config_options => { - 'redirect' => 'scheme https if !{ ssl_fc }' - }, - } - openstack::ha::haproxy_service { 'zabbix-ui-ssl': - order => '212', - listen_port => 443, - balancermember_port => 80, - public_ssl => true, - public_ssl_path => '/var/lib/astute/haproxy/public_haproxy.pem', - haproxy_config_options => { - 'option' => ['forwardfor', 'httpchk', 'httpclose', 'httplog'], - 'stick-table' => 'type ip size 200k expire 30m', - 'stick' => 'on src', - 'balance' => 'source', - 'timeout' => ['client 3h', 'server 3h'], - 'mode' => 'http', - 'reqadd' => 'X-Forwarded-Proto:\ https', - }, - balancermember_options => 'weight 1 check', - # The internal binding is configured below because the certificate - # is not configured by this resource - internal => false, - } - -> - file_line { 'add binding to Zabbix VIP for zabbix via ssl': - path => '/etc/haproxy/conf.d/212-zabbix-ui-ssl.cfg', - after => 'listen zabbix-ui-ssl', - line => " bind ${zabbix_vip}:443 ssl crt /var/lib/astute/haproxy/public_haproxy.pem", - notify => Exec['haproxy-restart'], - } - -> - file_line { 'add binding to management VIP for zabbix via ssl': - path => '/etc/haproxy/conf.d/212-zabbix-ui-ssl.cfg', - after => 'listen zabbix-ui-ssl', - line => " bind ${mgmt_vip}:443 ssl crt /var/lib/astute/haproxy/public_haproxy.pem", - notify => Exec['haproxy-restart'], - } - } - } else { - if $horizon_is_here { - # Update Horizon configuration to be able to use HTTP port - file_line { 'add binding to Zabbix VIP for horizon and zabbix': - path => '/etc/haproxy/conf.d/015-horizon.cfg', - after => 'listen horizon', - line => " bind ${zabbix_vip}:80", - notify => Exec['haproxy-restart'] - } - } else { - openstack::ha::haproxy_service { 'zabbix-ui': - order => '211', - listen_port => 80, - define_cookies => true, - internal => true, - haproxy_config_options => { - 'option' => ['forwardfor', 'httpchk', 'httpclose', 'httplog'], - 'rspidel' => '^Set-cookie:\ IP=', - 'balance' => 'source', - 'mode' => 'http', - 'cookie' => 'SERVERID insert indirect nocache', - 'capture' => 'cookie vgnvisitor= len 32', - 'timeout' => ['client 3h', 'server 3h'], - }, - balancermember_options => 'check inter 2000 fall 3', - } - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/ha/haproxy_service.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/ha/haproxy_service.pp deleted file mode 100644 index b7522d1..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/ha/haproxy_service.pp +++ /dev/null @@ -1,78 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# Register a service with HAProxy -define plugin_zabbix::ha::haproxy_service ( - $order, - $server_names, - $ipaddresses, - $listen_port, - $public_virtual_ip, - $internal_virtual_ip, - - $mode = undef, - $haproxy_config_options = { 'option' => ['httplog'], 'balance' => 'roundrobin' }, - $balancermember_options = 'check', - $balancermember_port = $listen_port, - $define_cookies = false, - - # use active-passive failover, mark all backends except the first one - # as backups - $define_backups = false, - - # by default, listen only on internal VIP - $public = false, - $internal = true, - - # if defined, restart this service before registering it with HAProxy - $require_service = undef, - - # if true, configure this service before starting the haproxy service; - # HAProxy will refuse to start with no listening services defined - $before_start = false, -) { - - if $public and $internal { - $virtual_ips = [$public_virtual_ip, $internal_virtual_ip] - } elsif $internal { - $virtual_ips = [$internal_virtual_ip] - } elsif $public { - $virtual_ips = [$public_virtual_ip] - } - - haproxy::listen { $name: - order => $order, - ipaddress => $virtual_ips, - ports => $listen_port, - options => $haproxy_config_options, - mode => $mode, - } - - haproxy::balancermember { $name: - order => $order, - listening_service => $name, - server_names => $server_names, - ipaddresses => $ipaddresses, - ports => $balancermember_port, - options => $balancermember_options, - define_cookies => $define_cookies, - define_backups => $define_backups, - } - - if $require_service { - Service[$require_service] -> Haproxy::Listen[$name] - Service[$require_service] -> Haproxy::Balancermember[$name] - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/init.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/init.pp deleted file mode 100644 index 29cb93a..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/init.pp +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix {} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring.pp deleted file mode 100644 index 6fa256e..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring.pp +++ /dev/null @@ -1,145 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring( - $server_ips = undef, - $roles_nb = 1, - $has_role_baseos = false, - $has_role_virt = false, - $has_role_controller = false, -) { - - # This should evaluate to false on base-os or virt only nodes - # and therefore Zabbix should not be installed neither configured in this case - $zabbix_agent_not_supported = ($has_role_baseos or $has_role_virt) and ($roles_nb == 1) - - if $zabbix_agent_not_supported { - notice('Skipping Zabbix configuration for base-os or virt only host') - } else { - include plugin_zabbix::params - - $api_hash = $plugin_zabbix::params::api_hash - - if !defined(Package['snmp-mibs-downloader']) { - package { 'snmp-mibs-downloader': - ensure => 'present', - } - } - - if is_ip_address($::public_address) { - plugin_zabbix_usermacro { "${plugin_zabbix::params::host_name} IP_PUBLIC": - host => $plugin_zabbix::params::host_name, - macro => '{$IP_PUBLIC}', - value => $::public_address, - api => $api_hash, - } - } - - if is_ip_address($::internal_address) { - plugin_zabbix_usermacro { "${plugin_zabbix::params::host_name} IP_MANAGEMENT": - host => $plugin_zabbix::params::host_name, - macro => '{$IP_MANAGEMENT}', - value => $::internal_address, - api => $api_hash, - } - } - - if is_ip_address($::swift_address) { - plugin_zabbix_usermacro { "${plugin_zabbix::params::host_name} IP_STORAGE": - host => $plugin_zabbix::params::host_name, - macro => '{$IP_STORAGE}', - value => $::swift_address, - api => $api_hash, - } - } - - class { 'plugin_zabbix::agent': - api_hash => $api_hash, - before => Class['plugin_zabbix::agent::scripts'], - } - - class { 'plugin_zabbix::agent::scripts': } - - plugin_zabbix::agent::userparameter { - 'vfs.dev.discovery': - ensure => 'present', - command => '/etc/zabbix/scripts/vfs.dev.discovery.sh'; - 'vfs.mdadm.discovery': - ensure => 'present', - command => '/etc/zabbix/scripts/vfs.mdadm.discovery.sh'; - 'proc.vmstat': - key => 'proc.vmstat[*]', - command => 'grep \'$1\' /proc/vmstat | awk \'{print $$2}\''; - 'crm.node.check': - key => 'crm.node.check[*]', - command => '/etc/zabbix/scripts/crm_node_check.sh $1'; - 'netns.udp.listen': - key => 'netns.udp.listen[*]', - command => '/usr/bin/sudo /etc/zabbix/scripts/netns.listen.sh UDP $1 $2 $3'; - } - - #Linux - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template Fuel OS Linux": - host => $plugin_zabbix::params::host_name, - template => 'Template Fuel OS Linux', - api => $api_hash, - } - - if ! $has_role_controller { - # default way to check NTP binding - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template NTP binding": - host => $plugin_zabbix::params::host_name, - template => 'Template NTP binding', - api => $api_hash, - } - } else { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template OS Controller": - host => $plugin_zabbix::params::host_name, - template => 'Template OS Controller', - api => $api_hash, - } - } - - #Zabbix Agent - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App Zabbix Agent": - host => $plugin_zabbix::params::host_name, - template => 'Template App Zabbix Agent', - api => $api_hash, - } - - Plugin_zabbix_usermacro { require => Class['plugin_zabbix::agent'] } - Plugin_zabbix_template_link { require => Class['plugin_zabbix::agent'] } - - # Auto-registration - include plugin_zabbix::monitoring::nova_mon - include plugin_zabbix::monitoring::keystone_mon - include plugin_zabbix::monitoring::glance_mon - include plugin_zabbix::monitoring::cinder_mon - include plugin_zabbix::monitoring::swift_mon - include plugin_zabbix::monitoring::rabbitmq_mon - include plugin_zabbix::monitoring::horizon_mon - include plugin_zabbix::monitoring::mysql_mon - include plugin_zabbix::monitoring::memcached_mon - include plugin_zabbix::monitoring::haproxy_mon - include plugin_zabbix::monitoring::zabbixserver_mon - include plugin_zabbix::monitoring::openstack_virtual_mon - include plugin_zabbix::monitoring::neutron_mon - include plugin_zabbix::monitoring::openvswitch_mon - include plugin_zabbix::monitoring::ceilometer_mon - include plugin_zabbix::monitoring::ceilometer_compute_mon - include plugin_zabbix::monitoring::ceph_mon - include plugin_zabbix::monitoring::firewall_mon - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/ceilometer_compute_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/ceilometer_compute_mon.pp deleted file mode 100644 index 7f366fd..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/ceilometer_compute_mon.pp +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::ceilometer_compute_mon { - - include plugin_zabbix::params - - #Ceilometer - if defined_in_state(Class['Ceilometer::Agent::Compute']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Ceilometer Compute": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Ceilometer Compute', - api => $plugin_zabbix::monitoring::api_hash, - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/ceilometer_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/ceilometer_mon.pp deleted file mode 100644 index c7194ff..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/ceilometer_mon.pp +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::ceilometer_mon { - - include plugin_zabbix::params - - #Ceilometer - if defined_in_state(Class['Openstack::Ceilometer']) and defined_in_state(Class['Openstack::Controller']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Ceilometer": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Ceilometer', - api => $plugin_zabbix::monitoring::api_hash, - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/ceph_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/ceph_mon.pp deleted file mode 100644 index 5a022b9..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/ceph_mon.pp +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::ceph_mon { - - include plugin_zabbix::params - - if defined_in_state(Class['ceph::mon']) { - - # Set read acl for zabbix user to be able to read the ceph keyring - exec { 'set_ceph_keyring_acl': - command => '/usr/bin/setfacl -m "u:zabbix:r" /etc/ceph/ceph.client.admin.keyring', - } - - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Ceph": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Ceph', - api => $plugin_zabbix::monitoring::api_hash, - } - plugin_zabbix::agent::userparameter { - 'ceph_health': - key => 'ceph.health', - command => '/etc/zabbix/scripts/ceph_health.sh' - } - - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Ceph MON": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Ceph MON', - api => $plugin_zabbix::monitoring::api_hash, - } - - plugin_zabbix::agent::userparameter { - 'probe.ceph': - key => 'probe.ceph', - command => join([ - '/etc/zabbix/scripts/ceph.py', - " ${plugin_zabbix::params::openstack::ceph_virtual_cluster_name}", - " ${plugin_zabbix::params::server_ip}"], '') - } - } - if defined_in_state(Class['ceph::osds']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Ceph OSD": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Ceph OSD', - api => $plugin_zabbix::monitoring::api_hash, - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/cinder_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/cinder_mon.pp deleted file mode 100644 index ae58772..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/cinder_mon.pp +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::cinder_mon { - - include plugin_zabbix::params - - #Cinder - if defined_in_state(Class['cinder::api']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Cinder API": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Cinder API', - api => $plugin_zabbix::monitoring::api_hash, - } - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Cinder API check": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Cinder API check', - api => $plugin_zabbix::monitoring::api_hash, - } - plugin_zabbix::agent::userparameter { - 'cinder.api.status': - command => "/etc/zabbix/scripts/check_api.py cinder http ${::internal_address} 8776"; - } - } - - if defined_in_state(Class['cinder::scheduler']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Cinder Scheduler": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Cinder Scheduler', - api => $plugin_zabbix::monitoring::api_hash, - } - } - - if defined_in_state(Class['cinder::volume']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Cinder Volume": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Cinder Volume', - api => $plugin_zabbix::monitoring::api_hash, - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/firewall_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/firewall_mon.pp deleted file mode 100644 index 3a1f369..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/firewall_mon.pp +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::firewall_mon { - - include plugin_zabbix::params - - #Iptables stats - if defined_in_state(Class['firewall']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App Iptables Stats": - host => $plugin_zabbix::params::host_name, - template => 'Template App Iptables Stats', - api => $plugin_zabbix::monitoring::api_hash, - } - package { 'iptstate': - ensure => present; - } - plugin_zabbix::agent::userparameter { - 'iptstate.tcp': - command => 'sudo iptstate -1 | grep tcp | wc -l'; - 'iptstate.tcp.syn': - command => 'sudo iptstate -1 | grep SYN | wc -l'; - 'iptstate.tcp.timewait': - command => 'sudo iptstate -1 | grep TIME_WAIT | wc -l'; - 'iptstate.tcp.established': - command => 'sudo iptstate -1 | grep ESTABLISHED | wc -l'; - 'iptstate.tcp.close': - command => 'sudo iptstate -1 | grep CLOSE | wc -l'; - 'iptstate.udp': - command => 'sudo iptstate -1 | grep udp | wc -l'; - 'iptstate.icmp': - command => 'sudo iptstate -1 | grep icmp | wc -l'; - 'iptstate.other': - command => 'sudo iptstate -1 -t | head -2 |tail -1 | sed -e \'s/^.*Other: \(.*\) (.*/\1/\'' - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/glance_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/glance_mon.pp deleted file mode 100644 index 0e650bb..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/glance_mon.pp +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::glance_mon { - - include plugin_zabbix::params - - #Glance - if defined_in_state(Class['glance::api']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Glance API": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Glance API', - api => $plugin_zabbix::monitoring::api_hash, - } - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Glance API check": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Glance API check', - api => $plugin_zabbix::monitoring::api_hash, - } - plugin_zabbix::agent::userparameter { - 'glance.api.status': - command => "/etc/zabbix/scripts/check_api.py glance http ${::internal_address} 9292"; - } - } - - if defined_in_state(Class['glance::registry']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Glance Registry": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Glance Registry', - api => $plugin_zabbix::monitoring::api_hash, - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/haproxy_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/haproxy_mon.pp deleted file mode 100644 index dbe7229..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/haproxy_mon.pp +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::haproxy_mon { - - include plugin_zabbix::params - - if defined_in_state(Class[Cluster::Haproxy]) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App HAProxy": - host => $plugin_zabbix::params::host_name, - template => 'Template App HAProxy', - api => $plugin_zabbix::monitoring::api_hash, - } - plugin_zabbix::agent::userparameter { - 'haproxy.be.discovery': - key => 'haproxy.be.discovery', - command => '/etc/zabbix/scripts/haproxy.sh -b'; - 'haproxy.be': - key => 'haproxy.be[*]', - command => '/etc/zabbix/scripts/haproxy.sh -v $1 $2 $3'; - 'haproxy.fe.discovery': - key => 'haproxy.fe.discovery', - command => '/etc/zabbix/scripts/haproxy.sh -f'; - 'haproxy.fe': - key => 'haproxy.fe[*]', - command => '/etc/zabbix/scripts/haproxy.sh -v $1 $2 $3'; - 'haproxy.sv.discovery': - key => 'haproxy.sv.discovery', - command => '/etc/zabbix/scripts/haproxy.sh -s'; - 'haproxy.sv': - key => 'haproxy.sv[*]', - command => '/etc/zabbix/scripts/haproxy.sh -v $1 $2 $3'; - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/horizon_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/horizon_mon.pp deleted file mode 100644 index 2030669..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/horizon_mon.pp +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::horizon_mon { - - include plugin_zabbix::params - include apache::params - - #Horizon - if defined_in_state(Class['horizon']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Horizon": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Horizon', - api => $plugin_zabbix::monitoring::api_hash, - } - - plugin_zabbix_usermacro { 'Apache bin name': - host => $plugin_zabbix::params::host_name, - macro => '{$APACHE_NAME}', - value => $apache::params::apache_name, - api => $plugin_zabbix::monitoring::api_hash, - } - - plugin_zabbix_usermacro { 'Apache user': - host => $plugin_zabbix::params::host_name, - macro => '{$APACHE_USER}', - value => $apache::params::user, - api => $plugin_zabbix::monitoring::api_hash, - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/keystone_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/keystone_mon.pp deleted file mode 100644 index 0c8cd42..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/keystone_mon.pp +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::keystone_mon { - - include plugin_zabbix::params - - #Keystone - if defined_in_state(Class['keystone']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Keystone": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Keystone', - api => $plugin_zabbix::monitoring::api_hash, - } - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Keystone API check": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Keystone API check', - api => $plugin_zabbix::monitoring::api_hash, - } - plugin_zabbix::agent::userparameter { - 'keystone.api.status': - command => "/etc/zabbix/scripts/check_api.py keystone http ${::internal_address} 5000"; - 'keystone.service.api.status': - command => "/etc/zabbix/scripts/check_api.py keystone_service http ${::internal_address} 5000"; - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/memcached_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/memcached_mon.pp deleted file mode 100644 index 7492e18..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/memcached_mon.pp +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::memcached_mon { - - include plugin_zabbix::params - - if defined_in_state(Class['memcached']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App Memcache": - host => $plugin_zabbix::params::host_name, - template => 'Template App Memcache', - api => $plugin_zabbix::monitoring::api_hash, - } - plugin_zabbix::agent::userparameter { - 'memcache': - key => 'memcache[*]', - command => "/bin/echo -e \"stats\\nquit\" | nc ${plugin_zabbix::params::host_ip} 11211 | grep \"STAT \$1 \" | awk \'{print \$\$3}\'" - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/mysql_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/mysql_mon.pp deleted file mode 100644 index b7c4c43..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/mysql_mon.pp +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::mysql_mon { - - include plugin_zabbix::params - - if defined_in_state(Class['mysql::server']) { - - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App MySQL": - host => $plugin_zabbix::params::host_name, - template => 'Template App MySQL', - api => $plugin_zabbix::monitoring::api_hash, - } - - plugin_zabbix::agent::userparameter { - 'mysql.status': - key => 'mysql.status[*]', - command => join([ - 'echo "show global status where Variable_name=\'$1\';"', - ' | mysql --defaults-extra-file=/var/lib/zabbix/.my.cnf -N', - ' | awk \'{print $$2}\''], ''); - 'mysql.ping': - command => 'mysqladmin --defaults-extra-file=/var/lib/zabbix/.my.cnf ping | grep -c alive'; - 'mysql.version': - command => 'mysql -V'; - 'db.wsrep.status.query': - command => '/etc/zabbix/scripts/query_db.py wsrep_status'; - 'db.wsrep.ready.query': - command => '/etc/zabbix/scripts/query_db.py wsrep_ready'; - 'db.wsrep.connected.query': - command => '/etc/zabbix/scripts/query_db.py wsrep_connected'; - } - - file { "${::plugin_zabbix::params::agent_include}/userparameter_mysql.conf": - ensure => absent, - } - - file { '/var/lib/zabbix': - ensure => directory, - } - - file { '/var/lib/zabbix/.my.cnf': - ensure => present, - content => template('plugin_zabbix/my.cnf.erb'), - require => File['/var/lib/zabbix'], - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/neutron_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/neutron_mon.pp deleted file mode 100644 index 4f52f8c..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/neutron_mon.pp +++ /dev/null @@ -1,76 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::neutron_mon { - - include plugin_zabbix::params - - # Neutron server - if defined_in_state(Class['::neutron']) and !defined_in_state(Class['nova::compute']) { - - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Neutron Server": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Neutron Server', - api => $plugin_zabbix::monitoring::api_hash, - } - - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Neutron API check": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Neutron API check', - api => $plugin_zabbix::monitoring::api_hash, - } - - plugin_zabbix::agent::userparameter { - 'neutron.api.status': - command => "/etc/zabbix/scripts/check_api.py neutron http ${::internal_address} 9696"; - } - } - - # Neutron OVS agent - if defined_in_state(Class[Neutron::Agents::Ml2::Ovs]) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Neutron OVS Agent": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Neutron OVS Agent', - api => $plugin_zabbix::monitoring::api_hash, - } - } - - # Neutron Metadata agent - if defined_in_state(Class['::neutron::agents::metadata']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Neutron Metadata Agent": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Neutron Metadata Agent', - api => $plugin_zabbix::monitoring::api_hash, - } - } - - # Neutron L3 agent - if defined_in_state(Class['::neutron::agents::l3']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Neutron L3 Agent": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Neutron L3 Agent', - api => $plugin_zabbix::monitoring::api_hash, - } - } - - # Neutron DHCP agent - if defined_in_state(Class['::neutron::agents::dhcp']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Neutron DHCP Agent": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Neutron DHCP Agent', - api => $plugin_zabbix::monitoring::api_hash, - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/nova_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/nova_mon.pp deleted file mode 100644 index ba4101b..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/nova_mon.pp +++ /dev/null @@ -1,138 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::nova_mon { - - include plugin_zabbix::params - - $fuel_version = 0 + hiera('fuel_version') - - if $fuel_version < 8.0 { - $cur_node_roles = node_roles(hiera_array('nodes'), hiera('uid')) - $is_controller = member($cur_node_roles, 'controller') or - member($cur_node_roles, 'primary-controller') - } else { - $is_controller = roles_include(['controller', 'primary-controller']) - } - - # Nova (controller) - if $is_controller { - - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Nova API": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Nova API', - api => $plugin_zabbix::monitoring::api_hash, - } - - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Nova API OSAPI": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Nova API OSAPI', - api => $plugin_zabbix::monitoring::api_hash, - } - - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Nova API OSAPI check": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Nova API OSAPI check', - api => $plugin_zabbix::monitoring::api_hash, - } - - # Removed in MOS 9.0 - if $fuel_version < 8.0 { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Nova API EC2": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Nova API EC2', - api => $plugin_zabbix::monitoring::api_hash, - } - } - - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Nova Cert": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Nova Cert', - api => $plugin_zabbix::monitoring::api_hash, - } - - plugin_zabbix::agent::userparameter { - 'nova.api.status': - command => "/etc/zabbix/scripts/check_api.py nova_os http ${::internal_address} 8774"; - } - } - - #Nova (compute) - if defined_in_state(Class['nova::compute']) { - - if ! hiera('quantum',false) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Nova API Metadata": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Nova API Metadata', - api => $plugin_zabbix::monitoring::api_hash, - } - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Nova Network": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Nova Network', - api => $plugin_zabbix::monitoring::api_hash, - } - } - } - - if defined_in_state(Class['nova::consoleauth']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Nova ConsoleAuth": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Nova ConsoleAuth', - api => $plugin_zabbix::monitoring::api_hash, - } - } - - if defined_in_state(Class['nova::scheduler']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Nova Scheduler": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Nova Scheduler', - api => $plugin_zabbix::monitoring::api_hash, - } - } - - if defined_in_state(Class['nova::conductor']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Nova Conductor": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Nova Conductor', - api => $plugin_zabbix::monitoring::api_hash, - } - } - - if defined_in_state(Class['nova::vncproxy']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Nova novncproxy": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Nova novncproxy', - api => $plugin_zabbix::monitoring::api_hash, - } - } - - #Nova compute - if defined_in_state(Class['nova::compute']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Nova Compute": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Nova Compute', - api => $plugin_zabbix::monitoring::api_hash, - } - } - - #Libvirt - if defined_in_state(Class['nova::compute::libvirt']) { - plugin_zabbix_template_link { "${::fqdn} Template App OpenStack Libvirt": - host => $::fqdn, - template => 'Template App OpenStack Libvirt', - api => $plugin_zabbix::monitoring::api_hash, - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/openstack_virtual_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/openstack_virtual_mon.pp deleted file mode 100644 index 9ce7c7e..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/openstack_virtual_mon.pp +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::openstack_virtual_mon { - - include plugin_zabbix::params - - $fuel_version = 0 + hiera('fuel_version') - - if $fuel_version < 8.0 { - $cur_node_roles = node_roles(hiera_array('nodes'), hiera('uid')) - $is_controller = member($cur_node_roles, 'controller') or - member($cur_node_roles, 'primary-controller') - } else { - $is_controller = roles_include(['controller', 'primary-controller']) - } - - if $is_controller { - plugin_zabbix::agent::userparameter { - 'db.token.count.query': - command => '/etc/zabbix/scripts/query_db.py token_count'; - 'db.instance.error.query': - command => '/etc/zabbix/scripts/query_db.py instance_error'; - 'db.services.offline.nova.query': - command => '/etc/zabbix/scripts/query_db.py services_offline_nova'; - 'db.services.offline.neutron.query': - command => '/etc/zabbix/scripts/query_db.py services_offline_neutron'; - 'db.instance.count.query': - command => '/etc/zabbix/scripts/query_db.py instance_count'; - 'db.cpu.total.query': - command => '/etc/zabbix/scripts/query_db.py cpu_total'; - 'db.cpu.used.query': - command => '/etc/zabbix/scripts/query_db.py cpu_used'; - 'db.ram.total.query': - command => '/etc/zabbix/scripts/query_db.py ram_total'; - 'db.ram.used.query': - command => '/etc/zabbix/scripts/query_db.py ram_used'; - 'db.services.offline.cinder.query': - command => '/etc/zabbix/scripts/query_db.py services_offline_cinder'; - 'vip.nova.api.status': - command => "/etc/zabbix/scripts/check_api.py nova_os http ${::plugin_zabbix::params::openstack::nova_vip} 8774"; - 'vip.glance.api.status': - command => "/etc/zabbix/scripts/check_api.py glance http ${::plugin_zabbix::params::openstack::glance_vip} 9292"; - 'vip.keystone.api.status': - command => "/etc/zabbix/scripts/check_api.py keystone http ${::plugin_zabbix::params::openstack::keystone_vip} 5000"; - 'vip.keystone.service.api.status': - command => "/etc/zabbix/scripts/check_api.py keystone_service http ${::plugin_zabbix::params::openstack::keystone_vip} 5000"; - 'vip.cinder.api.status': - command => "/etc/zabbix/scripts/check_api.py cinder http ${::plugin_zabbix::params::openstack::cinder_vip} 8776"; - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/openvswitch_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/openvswitch_mon.pp deleted file mode 100644 index 4263a03..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/openvswitch_mon.pp +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::openvswitch_mon { - - include plugin_zabbix::params - - # Open vSwitch - - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Open vSwitch": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Open vSwitch', - api => $plugin_zabbix::monitoring::api_hash, - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/rabbitmq_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/rabbitmq_mon.pp deleted file mode 100644 index 1a151b7..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/rabbitmq_mon.pp +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::rabbitmq_mon { - - include plugin_zabbix::params - $service_name = 'rabbitmq-server' - - #RabbitMQ server - if defined_in_state(Class['Rabbitmq']) { - - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack RabbitMQ": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack HA RabbitMQ', - api => $plugin_zabbix::monitoring::api_hash, - } - - exec { 'enable rabbitmq management plugin': - command => 'rabbitmq-plugins enable rabbitmq_management', - path => ['/usr/sbin', '/usr/bin', '/sbin', '/bin' ], - unless => 'rabbitmq-plugins list -m -E rabbitmq_management | grep -q rabbitmq_management', - environment => 'HOME=/root', - notify => Service['rabbitmq-server'], - } - - service { 'rabbitmq-server': - ensure => 'running', - name => "p_${service_name}", - enable => true, - provider => 'pacemaker', - } - - firewall {'992 rabbitmq management': - port => '15672', - proto => 'tcp', - action => 'accept', - } - - plugin_zabbix::agent::userparameter { - 'rabbitmq.queue.items': - command => '/etc/zabbix/scripts/check_rabbit.py queues-items'; - 'rabbitmq.queues.without.consumers': - command => '/etc/zabbix/scripts/check_rabbit.py queues-without-consumers'; - 'rabbitmq.missing.nodes': - command => '/etc/zabbix/scripts/check_rabbit.py missing-nodes'; - 'rabbitmq.unmirror.queues': - command => '/etc/zabbix/scripts/check_rabbit.py unmirror-queues'; - 'rabbitmq.missing.queues': - command => '/etc/zabbix/scripts/check_rabbit.py missing-queues'; - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/swift_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/swift_mon.pp deleted file mode 100644 index 19bbb65..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/swift_mon.pp +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::swift_mon { - - include plugin_zabbix::params - - $fuel_version = 0 + hiera('fuel_version') - - if $fuel_version < 8.0 { - $swift_class_name = 'openstack::swift::storage_node' - } else { - $swift_class_name = 'openstack_tasks::swift::parts::storage_node' - } - - #Swift - if defined_in_state(Class[$swift_class_name]) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Swift Account": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Swift Account', - api => $plugin_zabbix::monitoring::api_hash, - } - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Swift Container": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Swift Container', - api => $plugin_zabbix::monitoring::api_hash, - } - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Swift Object": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Swift Object', - api => $plugin_zabbix::monitoring::api_hash, - } - } - - if defined_in_state(Class['swift::proxy']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App OpenStack Swift Proxy": - host => $plugin_zabbix::params::host_name, - template => 'Template App OpenStack Swift Proxy', - api => $plugin_zabbix::monitoring::api_hash, - } - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/zabbixserver_mon.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/zabbixserver_mon.pp deleted file mode 100644 index 94c1432..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/monitoring/zabbixserver_mon.pp +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::monitoring::zabbixserver_mon { - - if defined_in_state(Class['plugin_zabbix::controller']) { - plugin_zabbix_template_link { "${plugin_zabbix::params::host_name} Template App Zabbix Server": - host => $plugin_zabbix::params::host_name, - template => 'Template App Zabbix Server', - api => $plugin_zabbix::monitoring::api_hash, - } - } - -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp deleted file mode 100644 index c168236..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp +++ /dev/null @@ -1,200 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::params { - - include plugin_zabbix::params::openstack - - $zabbix_version = $::check_zabbix_version - $zabbix_hash = hiera('zabbix_monitoring') - $network_metadata = hiera_hash('network_metadata') - $ssl = hiera('public_ssl') - $zabbix_base_conf_dir = '/etc/zabbix' - $zabbix_extra_conf_subdir = 'conf.d' - $zabbix_extra_conf_dir = "${zabbix_base_conf_dir}/${zabbix_extra_conf_subdir}" - $zabbix_base_run_dir = '/var/run/zabbix' - $zabbix_base_log_dir = '/var/log/zabbix' - - if versioncmp($zabbix_version, '2.4') < 0 { - $zabbix_includes = $zabbix_extra_conf_dir - $zabbix_trigger_exp_not_equal = '#' - } else { - $zabbix_includes = "${zabbix_extra_conf_dir}/*.conf" - $zabbix_trigger_exp_not_equal = '<>' - } - - $zabbix_ports = { - server => '10051', - agent => '10049', - backend_agent => '10050', - fcgi => '9003', - } - - case $::operatingsystem { - 'Ubuntu', 'Debian': { - $php_fpm_pkg = 'php5-fpm' - $php_fpm_config = '/etc/php5/fpm/pool.d/www.conf' - $php_fpm_service = 'php5-fpm' - $php_common_pkg = 'php5-common' - $apache_fcgi_pkg = 'libapache2-mod-fastcgi' - $agent_pkg = 'zabbix-agent' - $server_pkg = 'zabbix-server-mysql' - $frontend_pkg = 'zabbix-frontend-php' - $sender_pkg = 'zabbix-sender' - $get_pkg = 'zabbix-get' - - $agent_service = 'zabbix-agent' - $server_service = 'zabbix-server' - - $agent_log_file = "${zabbix_base_log_dir}/zabbix_agentd.log" - $server_log_file = "${zabbix_base_log_dir}/zabbix_server.log" - - $prepare_schema_cmd = join([ - 'cat /usr/share/zabbix-server-mysql/schema.sql', - ' /usr/share/zabbix-server-mysql/images.sql', - ' > /tmp/zabbix/schema.sql'], '') - - $frontend_service = 'apache2' - $frontend_service_template = 'plugin_zabbix/zabbix_apache.conf.erb' - # For some unknown reason putting the file in conf-available - # and running 'a2enconf zabbix' does not work, so keeping conf file - # in conf.d for now - $frontend_service_config = '/etc/apache2/conf.d/zabbix.conf' - $frontend_config = "${zabbix_base_conf_dir}/web/zabbix.conf.php" - $php_config = '/etc/php5/fpm/php.ini' - $php_mysql_pkg = 'php5-mysql' - $zabbix_document_root = '/usr/share/zabbix' - } - 'CentOS', 'RedHat': { - $agent_pkg = 'zabbix-agent' - $server_pkg = 'zabbix-server-mysql' - $frontend_pkg = 'zabbix-web-mysql' - $sender_pkg = 'zabbix-sender' - $get_pkg = 'zabbix-get' - - $agent_service = 'zabbix-agent' - $server_service = 'zabbix-server' - - $agent_log_file = "${zabbix_base_log_dir}/zabbix_agentd.log" - $server_log_file = "${zabbix_base_log_dir}/zabbix_server.log" - - $prepare_schema_cmd = join([ - 'cat /usr/share/doc/zabbix-server-mysql-`zabbix_server -V', - ' | awk \'/v[0-9].[0-9].[0-9]/{print substr($3, 2)}\'', - '`/create/schema.sql /usr/share/doc/zabbix-server-mysql-`zabbix_server -V', - ' | awk \'/v[0-9].[0-9].[0-9]/{print substr($3, 2)}\'', - '`/create/images.sql > /tmp/zabbix/schema.sql'], '') - - $frontend_service = 'httpd' - $frontend_service_config = '/etc/httpd/conf.d/zabbix.conf' - $frontend_config = "${zabbix_base_conf_dir}/web/zabbix.conf.php" - $php_config = '/etc/php.ini' - $php_mysql_pkg = 'php-mysql' - } - default: { - fail("unsuported osfamily ${::osfamily}, currently Debian and Redhat are the only supported platforms") - } - } - - $agent_listen_ip = $::internal_address - $agent_source_ip = $::internal_address - - $agent_config_template = 'plugin_zabbix/zabbix_agentd.conf.erb' - $agent_config = "${zabbix_base_conf_dir}/zabbix_agentd.conf" - $agent_pid_file = "${zabbix_base_run_dir}/zabbix_agentd.pid" - - $agent_include = "${zabbix_base_conf_dir}/zabbix_agentd.d" - $agent_scripts = "${zabbix_base_conf_dir}/scripts" - $has_userparameters = true - $agent_start_agents = '10' - $agent_log_file_size = '1024' - $agent_timeout = '30' - - #server parameters - $vip_name = 'zbx_vip_mgmt' - $server_ip = $network_metadata['vips'][$vip_name]['ipaddr'] - $server_public_ip = $network_metadata['vips']['public']['ipaddr'] - $mgmt_vip = $network_metadata['vips']['management']['ipaddr'] - $server_config = "${zabbix_base_conf_dir}/zabbix_server.conf" - $server_config_template = 'plugin_zabbix/zabbix_server.conf.erb' - $server_node_id = 0 - $server_ensure = present - $ocf_scripts_dir = '/usr/lib/ocf/resource.d' - $ocf_scripts_provider = 'fuel' - $server_start_pollers = '30' - $server_start_pollers_unreachable = '30' - $server_start_trappers = '15' - $server_cache_update_frequency = '60' - if $::memoryfree_mb >= 800 { - $server_cache_size = '32M' - $server_history_cache_size = '128M' - $server_trend_cache_size = '512M' - $server_history_text_cache_size = '128M' - } else { # use minimal configuration - $server_cache_size = '16M' - $server_history_cache_size = '8M' - $server_trend_cache_size = '4M' - $server_history_text_cache_size = '16M' - } - $server_log_slow_queries = '1000' - # 1Gb allowed for shared memory - $sysctl_kernel_shmmax = '1073741824' - - #frontend parameters - $frontend = true - $frontend_ensure = present - $frontend_base = '/zabbix' - $frontend_config_template = 'plugin_zabbix/zabbix.conf.php.erb' - - #common parameters - $db_type = 'MYSQL' - $db_ip = hiera('management_vip') - $db_port = '3306' - $db_name = 'zabbix' - $db_user = 'zabbix' - $db_password = $zabbix_hash['db_password'] - - #zabbix hosts params - $host_name = $::fqdn - $host_ip = $::internal_address - $host_groups = ['ManagedByPuppet', 'Controllers', 'Computes', 'Ceph Cluster', 'Ceph MONs', 'Ceph OSDs'] - $host_groups_base = ['ManagedByPuppet', 'Linux servers'] - $host_groups_controller = ['Controllers'] - $host_groups_compute = ['Computes'] - $host_groups_ceph_cluster = ['Ceph Cluster'] - $host_groups_ceph_mon = ['Ceph MONs'] - $host_groups_ceph_osd = ['Ceph OSDs'] - - #zabbix admin - $zabbix_admin_username = $zabbix_hash['username'] - $zabbix_admin_password = $zabbix_hash['password'] - $zabbix_admin_password_md5 = md5($zabbix_hash['password']) - - #api - $use_ssl = $ssl[horizon] or $ssl[services] - if $use_ssl { - if $ssl[horizon] { - $api_url = "https://${server_public_ip}${frontend_base}/api_jsonrpc.php" - } else { - $api_url = "http://${server_public_ip}${frontend_base}/api_jsonrpc.php" - } - } else { - $api_url = "http://${server_public_ip}${frontend_base}/api_jsonrpc.php" - } - - $api_hash = { endpoint => $api_url, - username => $zabbix_admin_username, - password => $zabbix_admin_password, } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params/openstack.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params/openstack.pp deleted file mode 100644 index ea9b5e6..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params/openstack.pp +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::params::openstack { - - $virtual_cluster_name = 'OpenStackCluster' - $ceph_virtual_cluster_name = 'CephCluster' - - $keystone_vip = hiera('management_vip') - $db_vip = hiera('management_vip') - $nova_vip = hiera('management_vip') - $glance_vip = hiera('management_vip') - $cinder_vip = hiera('management_vip') - $rabbit_vip = hiera('management_vip') - $zabbix_hash = hiera('zabbix_monitoring') - - - $access_hash = hiera('access') - $keystone_hash = hiera('keystone') - $nova_hash = hiera('nova') - $neutron_hash = hiera('neutron_config') - $cinder_hash = hiera('cinder') - $rabbit_hash = hiera('rabbit') - - $access_user = 'monitoring' - $access_password = $zabbix_hash['monitoring_password'] - $access_tenant = 'services' - $keystone_db_password = $keystone_hash['db_password'] - $nova_db_password = $nova_hash['db_password'] - $neutron_db_password = $neutron_hash['database']['passwd'] - $cinder_db_password = $cinder_hash['db_password'] - $rabbit_password = $rabbit_hash['password'] - $rabbitmq_service_name = 'rabbitmq-server' - - if !$rabbit_hash['user'] { - $rabbit_user = 'nova' - } else { - $rabbit_user = $rabbit_hash['user'] - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/primary_controller.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/primary_controller.pp deleted file mode 100644 index 0ffde53..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/primary_controller.pp +++ /dev/null @@ -1,104 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::primary_controller { - - include plugin_zabbix::controller - - $fuel_version = 0 + hiera('fuel_version') - - keystone_user { $plugin_zabbix::params::openstack::access_user: - ensure => 'present', - enabled => true, - password => $plugin_zabbix::params::openstack::access_password, - email => "${plugin_zabbix::params::openstack::access_user}@localhost", - } -> - keystone_user_role {"${plugin_zabbix::params::openstack::access_user}@${plugin_zabbix::params::openstack::access_tenant}": - ensure => present, - roles => '_member_', - } - - if $fuel_version < 9.0 { - $next_service = Cs_resource["p_${plugin_zabbix::params::server_service}"] - } else { - $next_service = Pacemaker::Service["p_${plugin_zabbix::params::server_service}"] - } - - class { 'plugin_zabbix::db::mysql': - db_ip => $plugin_zabbix::params::db_ip, - db_password => $plugin_zabbix::params::db_password, - require => Package[$plugin_zabbix::params::server_pkg], - before => [ Class['plugin_zabbix::frontend'], $next_service ], - } - - $operations = { - 'monitor' => {'interval' => '5s', 'timeout' => '30s' }, - 'start' => {'interval' => '0', 'timeout' => '30s' } - } - - if $fuel_version < 9.0 { - cs_resource { "p_${plugin_zabbix::params::server_service}": - before => Cs_rsc_colocation['vip-with-zabbix'], - primitive_class => 'ocf', - provided_by => $plugin_zabbix::params::ocf_scripts_provider, - primitive_type => $plugin_zabbix::params::server_service, - operations => $operations, - metadata => { - 'migration-threshold' => '3', - 'failure-timeout' => '120', - }, - } - - cs_rsc_colocation { 'vip-with-zabbix': - ensure => present, - score => 'INFINITY', - primitives => ["vip__${plugin_zabbix::params::vip_name}", "p_${plugin_zabbix::params::server_service}"], - } - - File[$plugin_zabbix::params::server_config] -> File['zabbix-server-ocf'] -> Cs_resource["p_${plugin_zabbix::params::server_service}"] - if $plugin_zabbix::controller::zabbix_pcmk_managed == '' { - Service["${plugin_zabbix::params::server_service}-init-stopped"] -> Cs_resource["p_${plugin_zabbix::params::server_service}"] - } - Cs_rsc_colocation['vip-with-zabbix'] -> Service["${plugin_zabbix::params::server_service}-started"] - } else { - pacemaker::service { "p_${plugin_zabbix::params::server_service}": - before => Pcmk_colocation['vip-with-zabbix'], - primitive_class => 'ocf', - primitive_provider => $plugin_zabbix::params::ocf_scripts_provider, - primitive_type => $plugin_zabbix::params::server_service, - operations => $operations, - metadata => { - 'migration-threshold' => '3', - 'failure-timeout' => '120', - }, - prefix => false, - use_handler => false, - } - - pcmk_colocation { 'vip-with-zabbix': - ensure => present, - score => 'INFINITY', - second => "vip__${plugin_zabbix::params::vip_name}", - first => "p_${plugin_zabbix::params::server_service}", - require => Pacemaker::Service["p_${plugin_zabbix::params::server_service}"], - } - - File[$plugin_zabbix::params::server_config] -> File['zabbix-server-ocf'] -> Pcmk_colocation['vip-with-zabbix'] - if $plugin_zabbix::controller::zabbix_pcmk_managed == '' { - Service["${plugin_zabbix::params::server_service}-init-stopped"] -> Pcmk_colocation['vip-with-zabbix'] - } - Pcmk_colocation['vip-with-zabbix'] -> Service["${plugin_zabbix::params::server_service}-started"] - } -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/server/config.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/server/config.pp deleted file mode 100644 index 9bd55ec..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/server/config.pp +++ /dev/null @@ -1,395 +0,0 @@ -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -class plugin_zabbix::server::config { - - include plugin_zabbix::params - - $settings = hiera(storage) - $use_ceph = $settings['volumes_ceph'] - - $api_hash = $plugin_zabbix::params::api_hash - - plugin_zabbix_hostgroup { $plugin_zabbix::params::host_groups: - ensure => present, - api => $api_hash, - } - - file { '/etc/zabbix/import': - ensure => directory, - recurse => true, - purge => true, - force => true, - source => 'puppet:///modules/plugin_zabbix/import' - } - - file { '/etc/zabbix/import/Template_App_MySQL.xml': - ensure => present, - require => File['/etc/zabbix/import'], - content => template('plugin_zabbix/Template_App_MySQL.xml.erb'), - } - - file { '/etc/zabbix/import/Template_App_OpenStack_Ceph_Cluster.xml': - ensure => present, - require => File['/etc/zabbix/import'], - content => template('plugin_zabbix/Template_App_OpenStack_Ceph_Cluster.xml.erb'), - } - - Plugin_zabbix_configuration_import { - require => File['/etc/zabbix/import'], - } - - plugin_zabbix_configuration_import { 'Template_App_Zabbix_Agent.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_Zabbix_Agent.xml', - api => $api_hash, - } - - plugin_zabbix_configuration_import { 'Template_Fuel_OS_Linux.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_Fuel_OS_Linux.xml', - api => $api_hash, - } - - plugin_zabbix_configuration_import { 'Template_NTP_binding Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_NTP_binding.xml', - api => $api_hash, - } - - plugin_zabbix_configuration_import { 'Template_OS_Controller Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_OS_Controller.xml', - api => $api_hash, - } - - # Nova templates - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Nova_API_EC2.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Nova_API_EC2.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Nova_API.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Nova_API.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Nova_API_Metadata.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Nova_API_Metadata.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Nova_API_OSAPI.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Nova_API_OSAPI.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Nova_API_OSAPI_check.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Nova_API_OSAPI_check.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Nova_Cert.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Nova_Cert.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Nova_ConsoleAuth.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Nova_ConsoleAuth.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Nova_Scheduler.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Nova_Scheduler.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Nova_Conductor.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Nova_Conductor.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Nova_NoVNCProxy.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Nova_NoVNCProxy.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Nova_Compute.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Nova_Compute.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Libvirt.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Libvirt.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Nova_Network.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Nova_Network.xml', - api => $api_hash, - } - - # Keystone templates - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Keystone.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Keystone.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Keystone_API_check.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Keystone_API_check.xml', - api => $api_hash, - } - - # Glance templates - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Glance_API.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Glance_API.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Glance_API_check.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Glance_API_check.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Glance_Registry.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Glance_Registry.xml', - api => $api_hash, - } - - # Cinder templates - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Cinder_API.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Cinder_API.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Cinder_API_check.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Cinder_API_check.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Cinder_Scheduler.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Cinder_Scheduler.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Cinder_Volume.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Cinder_Volume.xml', - api => $api_hash, - } - - # Swift templates - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Swift_Account.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Swift_Account.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Swift_Container.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Swift_Container.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Swift_Object.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Swift_Object.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Swift_Proxy.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Swift_Proxy.xml', - api => $api_hash, - } - - if $use_ceph { - # Ceph templates - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Ceph.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Ceph.xml', - api => $api_hash, - } - - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Ceph_OSD.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Ceph_OSD.xml', - api => $api_hash, - } - - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Ceph_MON.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Ceph_MON.xml', - api => $api_hash, - } - - # Virtual Ceph Cluser - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Ceph_Cluster.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Ceph_Cluster.xml', - api => $api_hash, - } - -> - plugin_zabbix_host { $plugin_zabbix::params::openstack::ceph_virtual_cluster_name: - host => $plugin_zabbix::params::openstack::ceph_virtual_cluster_name, - ip => $plugin_zabbix::params::server_ip, - port => $plugin_zabbix::params::zabbix_ports['agent'], - groups => concat($plugin_zabbix::params::host_groups_ceph_cluster, $plugin_zabbix::params::host_groups_base), - api => $plugin_zabbix::params::api_hash, - } - -> - plugin_zabbix_template_link { "${plugin_zabbix::params::openstack::ceph_virtual_cluster_name} Template Ceph Cluster": - host => $plugin_zabbix::params::openstack::ceph_virtual_cluster_name, - template => 'Template App OpenStack Ceph Cluster', - api => $plugin_zabbix::params::api_hash, - } - -> - plugin_zabbix_configuration_import { 'Screens_Ceph_Cluster.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Screens_Ceph_Cluster.xml', - api => $plugin_zabbix::params::api_hash, - } - } - - # RabbitMQ template - plugin_zabbix_configuration_import { 'Template_App_OpenStack_RabbitMQ_ha.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_RabbitMQ_ha.xml', - api => $api_hash, - } - - # Horizon - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Horizon.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Horizon.xml', - api => $api_hash, - } - - # MySQL - plugin_zabbix_configuration_import { 'Template_App_MySQL.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_MySQL.xml', - api => $api_hash, - } - - # memcached - plugin_zabbix_configuration_import { 'Template_App_Memcache.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_Memcache.xml', - api => $api_hash, - } - - # HAProxy - plugin_zabbix_configuration_import { 'Template_App_HAProxy.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_HAProxy.xml', - api => $api_hash, - } - - # Zabbix server - plugin_zabbix_configuration_import { 'Template_App_Zabbix_Server.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_Zabbix_Server.xml', - api => $api_hash, - } - - - # Neutron - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Neutron_Server.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Neutron_Server.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Neutron_OVS_Agent.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Neutron_OVS_Agent.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Neutron_Metadata_Agent.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Neutron_Metadata_Agent.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Neutron_L3_Agent.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Neutron_L3_Agent.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Neutron_DHCP_Agent.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Neutron_DHCP_Agent.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Neutron_API_check.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Neutron_API_check.xml', - api => $api_hash, - } - - # Open vSwitch - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Open_vSwitch.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Open_vSwitch.xml', - api => $api_hash, - } - - # Ceilometer - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Ceilometer.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Ceilometer.xml', - api => $api_hash, - } - plugin_zabbix_configuration_import { 'Template_App_OpenStack_Ceilometer_Compute.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_OpenStack_Ceilometer_Compute.xml', - api => $api_hash, - } - - # Firewall - plugin_zabbix_configuration_import { 'Template_App_Iptables_Stats.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_App_Iptables_Stats.xml', - api => $api_hash, - } - - # Virtual OpenStack Cluster - plugin_zabbix_configuration_import { 'Template_OpenStack_Cluster.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Template_OpenStack_Cluster.xml', - api => $api_hash, - } - -> - plugin_zabbix_host { $plugin_zabbix::params::openstack::virtual_cluster_name: - host => $plugin_zabbix::params::openstack::virtual_cluster_name, - ip => $plugin_zabbix::params::server_ip, - port => $plugin_zabbix::params::zabbix_ports['agent'], - groups => $plugin_zabbix::params::host_groups_base, - api => $plugin_zabbix::params::api_hash, - } - -> - plugin_zabbix_template_link { "${plugin_zabbix::params::openstack::virtual_cluster_name} Template OpenStack Cluster": - host => $plugin_zabbix::params::openstack::virtual_cluster_name, - template => 'Template OpenStack Cluster', - api => $plugin_zabbix::params::api_hash, - } - -> - plugin_zabbix_configuration_import { 'Template_Screens_OpenStack_Cluster.xml Import': - ensure => present, - xml_file => '/etc/zabbix/import/Screens_OpenStack_Cluster.xml', - api => $plugin_zabbix::params::api_hash, - } - - Plugin_zabbix_hostgroup<||> -> Plugin_zabbix_host <||> - -} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/spec/spec_helper.rb b/deployment_scripts/puppet/modules/plugin_zabbix/spec/spec_helper.rb deleted file mode 100644 index 1b3e1f2..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/spec/spec_helper.rb +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/provider/plugin_zabbix_host/ruby_spec.rb b/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/provider/plugin_zabbix_host/ruby_spec.rb deleted file mode 100644 index 36bfba4..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/provider/plugin_zabbix_host/ruby_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -require 'puppet' -require 'spec_helper' -require 'puppet/provider/plugin_zabbix_host/ruby' - -cls = Puppet::Type.type(:plugin_zabbix_host).provider(:ruby) -fake_api = {"username" => "username", - "password" => "password", - "endpoint" => "http://endpoint"} -resource = Puppet::Type.type(:plugin_zabbix_host).new(:name => 'test', :host => 'test', :groups => ['test'], :ip => '192.168.0.1', :api => fake_api) -provider = resource.provider - -describe cls do - - it 'should fail to create a zabbix host if any of provided groups do not exist' do - provider.expects(:get_hostgroup).returns([]) - expect { - provider.create - }.to raise_error(Puppet::Error, /Group.+?does not exist/) - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/provider/plugin_zabbix_spec.rb b/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/provider/plugin_zabbix_spec.rb deleted file mode 100644 index eecb8cb..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/provider/plugin_zabbix_spec.rb +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -require 'puppet' -require 'spec_helper' -require 'puppet/provider/plugin_zabbix' - -cls = Puppet::Provider::Plugin_zabbix - -describe Puppet::Provider::Plugin_zabbix do - - describe 'when making an API request' do - - it 'should fail if Zabbix returns error' do - mock = {'error' => {'code' => 0, - 'message' => 'test error', - 'data' => 'not a real error'}} - Puppet::Provider::Plugin_zabbix.expects(:make_request).at_least(2).returns(mock) - fake_api = {'endpoint' => 'http://localhost', - 'username' => 'Admin', - 'password' => 'zabbix'} - expect { - cls.api_request(fake_api, {}, 2) - }.to raise_error(Puppet::Error, /Zabbix API returned/) - end - - it 'should return "result" sub-hash from json returned by API' do - mock = {'result' => {'code' => 0, - 'message' => 'test result', - 'data' => 'just a test'}} - Puppet::Provider::Plugin_zabbix.expects(:make_request).returns(mock) - fake_api = {'endpoint' => 'http://localhost', - 'username' => 'Admin', - 'password' => 'zabbix'} - cls.api_request(fake_api, {}) == {'code' => 0, - 'message' => 'test result', - 'data' => 'just a test'} - end - - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/provider/plugin_zabbix_template_link/ruby_spec.rb b/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/provider/plugin_zabbix_template_link/ruby_spec.rb deleted file mode 100644 index a034e5d..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/provider/plugin_zabbix_template_link/ruby_spec.rb +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -require 'puppet' -require 'spec_helper' -require 'puppet/provider/plugin_zabbix_template_link/ruby' - -cls = Puppet::Type.type(:plugin_zabbix_template_link).provider(:ruby) -fake_api = {"username" => "username", - "password" => "password", - "endpoint" => "http://endpoint"} -resource = Puppet::Type.type(:plugin_zabbix_template_link).new(:name => 'test link', :host => 'test', :template => 'test', :api => fake_api) -provider = resource.provider - -describe cls do - - it 'should fail if provided host does not exist' do - provider.expects(:auth).with(fake_api).returns("auth_hash") - provider.expects(:get_host).returns([]) - expect { - provider.exists? - }.to raise_error(Puppet::Error, /Host.+?does not exist/) - end - - it 'should fail if provided template does not exist' do - provider.expects(:auth).with(fake_api).returns("auth_hash") - provider.expects(:get_host).returns(['0']) - provider.expects(:api_request).with(fake_api, - {:method => "template.get", - :params => {:filter => {:host => [resource[:template]]}}}).returns([]) - expect { - provider.exists? - }.to raise_error(Puppet::Error, /Template.+?does not exist/) - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/provider/plugin_zabbix_usermacro/ruby_spec.rb b/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/provider/plugin_zabbix_usermacro/ruby_spec.rb deleted file mode 100644 index d029a6a..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/provider/plugin_zabbix_usermacro/ruby_spec.rb +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -require 'puppet' -require 'spec_helper' -require 'puppet/provider/plugin_zabbix_usermacro/ruby' - -cls = Puppet::Type.type(:plugin_zabbix_usermacro).provider(:ruby) -fake_api = {"username" => "username", - "password" => "password", - "endpoint" => "http://endpoint"} -resource = Puppet::Type.type(:plugin_zabbix_usermacro).new(:name => 'test', :host => 'test', :macro => 'test', :value => 'test', :api => fake_api) -provider = resource.provider - -describe cls do - - it 'should fail if it is not global and provided host does not exist' do - resource[:global] = :false - provider.expects(:auth).with(fake_api).returns("auth_hash") - provider.expects(:get_host).returns([]) - expect { - provider.exists? - }.to raise_error(Puppet::Error, /Host.+?does not exist/) - end - - it 'should get a list of global macros when global is true' do - resource[:global] = :true - body = {:method => "usermacro.get", - :params => {:globalmacro => true, - :output => "extend"}} - provider.expects(:auth).with(fake_api).returns("auth_hash") - provider.expects(:api_request).with(fake_api, body).returns([{"macro" => "macro"}]) - provider.exists? - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_configuration_import_spec.rb b/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_configuration_import_spec.rb deleted file mode 100644 index 77f8d1c..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_configuration_import_spec.rb +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -require 'puppet' -require 'puppet/type/plugin_zabbix_configuration_import' - - -describe 'Puppet::Type.type(:plugin_zabbix_configuration_import)' do - - before :each do - @type_instance = Puppet::Type.type(:plugin_zabbix_configuration_import).new(:name => 'testimport') - end - - # type validation checks for path rather than file contents - it 'should accept absolute pathname for xml_file' do - @type_instance[:xml_file] = '/here/be/dragon' - @type_instance[:xml_file] == '/here/be/dragon' - end - - it 'should not accept non-absolute path for xml_file' do - expect { - @type_instance[:xml_file] = 'here/be/dragon' - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should accept valid api hash' do - @type_instance[:api] = {"username" => "user", - "password" => "password", - "endpoint" => "http://endpoint"} - end - - it 'should not accept non-hash objects for api hash' do - expect { - @type_instance[:api] = "qwerty" - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept api hash without any of required keys' do - expect { - @type_instance[:api] = {"password" => "password", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => "password"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept api hash with invalid keys' do - expect { - @type_instance[:api] = {"username" => [], - "password" => "password", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => [], - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => "password", - "endpoint" => "endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => "password", - "endpoint" => []} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_host_spec.rb b/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_host_spec.rb deleted file mode 100644 index 76e7d11..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_host_spec.rb +++ /dev/null @@ -1,182 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -require 'puppet' -require 'puppet/type/plugin_zabbix_host' - - -describe 'Puppet::Type.type(:plugin_zabbix_host)' do - - before :each do - @zabbix_host = Puppet::Type.type(:plugin_zabbix_host).new(:name => 'testhost', :host => 'testhost', :groups => ['testgroup']) - end - - it 'should accept valid IP address' do - @zabbix_host[:ip] = '192.168.10.1' - @zabbix_host[:ip] == '192.168.10.1' - end - - it 'should not accept IP address with more than 3 digits per octet' do - expect { - @zabbix_host[:ip] = '1921.168.10.1' - }.to raise_error(Puppet::Error, /Invalid value/) - end - - it 'should not accept random strings for IP address' do - expect { - @zabbix_host[:ip] = 'hello' - }.to raise_error(Puppet::Error, /Invalid value/) - end - - it 'should accept valid namevar' do - @zabbix_host[:host] = 'host name' - @zabbix_host[:ip] == 'host name' - end - - it 'should not accept empty namevar' do - expect { - @zabbix_host[:host] = '' - }.to raise_error(Puppet::Error, /Invalid value/) - end - - it 'should accept valid group list' do - @zabbix_host[:groups] = ['ManagedByPuppet', 'OpenStack9000'] - end - - it 'should accept string for group list' do - @zabbix_host[:groups] = 'ManagedByPuppet' - end - - it 'should not accept non-array non-string object for groups list' do - expect { - @zabbix_host[:groups] = 123 - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept empty array for groups' do - expect { - @zabbix_host[:groups] = [] - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept array with non-string items for groups' do - expect { - @zabbix_host[:groups] = ['hello', 123, nil] - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept array with empty strings for groups' do - expect { - @zabbix_host[:groups] = ['hello', ""] - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should accept valid hostname' do - @zabbix_host[:hostname] = 'node-1' - @zabbix_host[:hostname] == 'node-1' - end - - it 'should not accept non-string hostname' do - expect { - @zabbix_host[:hostname] = [] - }.to raise_error(Puppet::Error, /Invalid value/) - end - - it 'should accept valid proxy_id' do - @zabbix_host[:proxy_hostid] = '1' - @zabbix_host[:proxy_hostid] == '1' - @zabbix_host[:proxy_hostid] = 1 - @zabbix_host[:proxy_hostid] == 1 - end - - it 'should not accept invalid proxyid' do - expect { - @zabbix_host[:proxy_hostid] = [] - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @zabbix_host[:proxy_hostid] = "qwerty" - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should accept valid status' do - @zabbix_host[:status] = 1 - @zabbix_host[:status] == 1 - @zabbix_host[:status] = 0 - @zabbix_host[:status] == 0 - end - - it 'should not accept invalid proxyid' do - expect { - @zabbix_host[:status] = "qwerty" - }.to raise_error(Puppet::Error, /Invalid value/) - end - - it 'should accept valid api hash' do - @zabbix_host[:api] = {"username" => "user", - "password" => "password", - "endpoint" => "http://endpoint"} - end - - it 'should not accept non-hash objects for api hash' do - expect { - @zabbix_host[:api] = "qwerty" - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept api hash without any of required keys' do - expect { - @zabbix_host[:api] = {"password" => "password", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @zabbix_host[:api] = {"username" => "username", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @zabbix_host[:api] = {"username" => "username", - "password" => "password"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept api hash with invalid keys' do - expect { - @zabbix_host[:api] = {"username" => [], - "password" => "password", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @zabbix_host[:api] = {"username" => "username", - "password" => [], - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @zabbix_host[:api] = {"username" => "username", - "password" => "password", - "endpoint" => "endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @zabbix_host[:api] = {"username" => "username", - "password" => "password", - "endpoint" => []} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_hostgroup_spec.rb b/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_hostgroup_spec.rb deleted file mode 100644 index 44e71a6..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_hostgroup_spec.rb +++ /dev/null @@ -1,92 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -require 'puppet' -require 'puppet/type/plugin_zabbix_hostgroup' - - -describe 'Puppet::Type.type(:plugin_zabbix_hostgroup)' do - - before :each do - @type_instance = Puppet::Type.type(:plugin_zabbix_hostgroup).new(:name => 'testimport') - end - - it 'should accept non-empty name' do - @type_instance[:name] = 'ManagedByPuppet' - @type_instance[:name] == 'ManagedByPuppet' - end - - it 'should not accept empty name' do - expect { - @type_instance[:name] = '' - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should accept valid api hash' do - @type_instance[:api] = {"username" => "user", - "password" => "password", - "endpoint" => "http://endpoint"} - end - - it 'should not accept non-hash objects for api hash' do - expect { - @type_instance[:api] = "qwerty" - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept api hash without any of required keys' do - expect { - @type_instance[:api] = {"password" => "password", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => "password"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept api hash with invalid keys' do - expect { - @type_instance[:api] = {"username" => [], - "password" => "password", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => [], - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => "password", - "endpoint" => "endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => "password", - "endpoint" => []} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_template_link_spec.rb b/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_template_link_spec.rb deleted file mode 100644 index 624d9e5..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_template_link_spec.rb +++ /dev/null @@ -1,114 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -require 'puppet' -require 'puppet/type/plugin_zabbix_template_link' - - -describe 'Puppet::Type.type(:plugin_zabbix_template_link)' do - - before :each do - @type_instance = Puppet::Type.type(:plugin_zabbix_template_link).new(:name => 'testimport') - end - - it 'should accept non-empty name' do - @type_instance[:name] = 'New link' - @type_instance[:name] == 'New link' - end - - it 'should not accept empty name' do - expect { - @type_instance[:name] = '' - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should accept non-empty host' do - @type_instance[:host] = 'node-1' - @type_instance[:host] == 'node-1' - end - - it 'should not accept empty host' do - expect { - @type_instance[:host] = '' - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should accept non-empty template name' do - @type_instance[:template] = 'template' - @type_instance[:template] == 'template' - end - - it 'should not accept empty template name' do - expect { - @type_instance[:template] = '' - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should accept valid api hash' do - @type_instance[:api] = {"username" => "user", - "password" => "password", - "endpoint" => "http://endpoint"} - end - - it 'should not accept non-hash objects for api hash' do - expect { - @type_instance[:api] = "qwerty" - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept api hash without any of required keys' do - expect { - @type_instance[:api] = {"password" => "password", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => "password"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept api hash with invalid keys' do - expect { - @type_instance[:api] = {"username" => [], - "password" => "password", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => [], - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => "password", - "endpoint" => "endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => "password", - "endpoint" => []} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_usermacro_spec.rb b/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_usermacro_spec.rb deleted file mode 100644 index f496903..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/spec/unit/type/plugin_zabbix_usermacro_spec.rb +++ /dev/null @@ -1,137 +0,0 @@ -# -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -require 'puppet' -require 'puppet/type/plugin_zabbix_usermacro' - - -describe 'Puppet::Type.type(:plugin_zabbix_usermacro)' do - - before :each do - @type_instance = Puppet::Type.type(:plugin_zabbix_usermacro).new(:name => 'testimport', :host => "host") - end - - it 'should fail with global = true and specified host' do - expect { - Puppet::Type.type(:plugin_zabbix_usermacro).new(:name => "new", :global => :true, :host => "host") - }.to raise_error(Puppet::Error, /should not be provided/) - end - - it 'should fail with global = false and unspecified host' do - expect { - Puppet::Type.type(:plugin_zabbix_usermacro).new(:name => "new") - }.to raise_error(Puppet::Error, /host is required/) - end - - it 'should accept non-empty name' do - @type_instance[:name] = 'New macro' - @type_instance[:name] == 'New macro' - end - - it 'should not accept empty name' do - expect { - @type_instance[:name] = '' - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should accept non-empty host' do - @type_instance[:host] = 'node-1' - @type_instance[:host] == 'node-1' - end - - it 'should not accept empty host' do - expect { - @type_instance[:host] = '' - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should accept non-empty macro name' do - @type_instance[:macro] = 'macro' - @type_instance[:macro] == 'macro' - end - - it 'should not accept empty macro name' do - expect { - @type_instance[:macro] = '' - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should accept non-empty macro value' do - @type_instance[:value] = 'value' - @type_instance[:value] == 'value' - end - - it 'should not accept empty macro value' do - expect { - @type_instance[:value] = '' - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should accept valid api hash' do - @type_instance[:api] = {"username" => "user", - "password" => "password", - "endpoint" => "http://endpoint"} - end - - it 'should not accept non-hash objects for api hash' do - expect { - @type_instance[:api] = "qwerty" - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept api hash without any of required keys' do - expect { - @type_instance[:api] = {"password" => "password", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => "password"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - - it 'should not accept api hash with invalid keys' do - expect { - @type_instance[:api] = {"username" => [], - "password" => "password", - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => [], - "endpoint" => "http://endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => "password", - "endpoint" => "endpoint"} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - - expect { - @type_instance[:api] = {"username" => "username", - "password" => "password", - "endpoint" => []} - }.to raise_error(Puppet::Error, /Parameter.+failed/) - end - -end diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_MySQL.xml.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_MySQL.xml.erb deleted file mode 100644 index ff6213c..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_MySQL.xml.erb +++ /dev/null @@ -1,945 +0,0 @@ - - - 2.0 - 2013-07-10T21:15:06Z - - - Templates - - - - - - - - {Template App MySQL:mysql.ping.last(0)}=0 - MySQL is down - - 0 - 2 - - 0 - - - - {Template App MySQL:db.wsrep.connected.query.last(0)}<%= scope.lookupvar('plugin_zabbix::params::zabbix_trigger_exp_not_equal') %>1 - MySQL is not connected to the cluster - - 0 - 2 - wsrep_connected = OFF - 0 - - - - {Template App MySQL:db.wsrep.ready.query.last(0)}<%= scope.lookupvar('plugin_zabbix::params::zabbix_trigger_exp_not_equal') %>1 - MySQL is not ready to rejoin cluster - - 0 - 2 - wsrep_ready = OFF - 0 - - - - {Template App MySQL:db.wsrep.status.query.last(0)}=3 - MySQL is disconnected to the cluster - - 0 - 2 - Node is Disconnected - 0 - - - - - - MySQL bandwidth - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 5 - 00AA00 - 0 - 2 - 0 - - Template App MySQL - mysql.status[Bytes_received] - - - - 1 - 5 - 3333FF - 0 - 2 - 0 - - Template App MySQL - mysql.status[Bytes_sent] - - - - - - MySQL operations - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 0 - C8C800 - 0 - 2 - 0 - - Template App MySQL - mysql.status[Com_begin] - - - - 1 - 0 - 006400 - 0 - 2 - 0 - - Template App MySQL - mysql.status[Com_commit] - - - - 2 - 0 - C80000 - 0 - 2 - 0 - - Template App MySQL - mysql.status[Com_delete] - - - - 3 - 0 - 0000EE - 0 - 2 - 0 - - Template App MySQL - mysql.status[Com_insert] - - - - 4 - 0 - 640000 - 0 - 2 - 0 - - Template App MySQL - mysql.status[Com_rollback] - - - - 5 - 0 - 00C800 - 0 - 2 - 0 - - Template App MySQL - mysql.status[Com_select] - - - - 6 - 0 - C800C8 - 0 - 2 - 0 - - Template App MySQL - mysql.status[Com_update] - - - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_OpenStack_Ceph_Cluster.xml.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_OpenStack_Ceph_Cluster.xml.erb deleted file mode 100644 index 11f368d..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_OpenStack_Ceph_Cluster.xml.erb +++ /dev/null @@ -1,2174 +0,0 @@ - - - 2.0 - 2015-10-29T16:25:46Z - - - Ceph Cluster - - - - - - - - {Template App OpenStack Ceph Cluster:pool_total_percent_free.last()}<10 - Ceph free capacity is low (< 10%) - - 0 - 2 - - 0 - - - - {Template App OpenStack Ceph Cluster:probe.ceph.last()}<%= scope.lookupvar('plugin_zabbix::params::zabbix_trigger_exp_not_equal') %>0 - Cannot retrieve Ceph metrics form {HOST.NAME1} node - - 0 - 2 - Cannot trigger Ceph metric, check logs /var/log/zabbix/sender.log - 0 - - - - - - OSD breakdown by state - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 0 - 00C800 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - osd_count_down - - - - 1 - 0 - C80000 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - osd_count_in - - - - 2 - 0 - 0000C8 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - osd_count_out - - - - 3 - 0 - C800C8 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - osd_count_up - - - - - - PG breakdown by state - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 0 - 00C800 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_count - - - - 1 - 0 - C80000 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_active - - - - 2 - 0 - 0000C8 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_backfill - - - - 3 - 0 - C800C8 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_backfilltoofull - - - - 4 - 0 - 00C8C8 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_clean - - - - 5 - 0 - C8C800 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_creating - - - - 6 - 0 - C8C8C8 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_degraded - - - - 7 - 0 - 009600 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_down - - - - 8 - 0 - 960000 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_incomplete - - - - 9 - 0 - 000096 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_inconsistent - - - - 10 - 0 - 960096 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_peered - - - - 11 - 0 - 009696 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_peering - - - - 12 - 0 - 969600 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_recovering - - - - 13 - 0 - 969696 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_remapped - - - - 14 - 0 - 00FF00 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_repair - - - - 15 - 0 - FF0000 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_replay - - - - 16 - 0 - 0000FF - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_scrubbing - - - - 17 - 0 - FF00FF - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_splitting - - - - 18 - 0 - 00FFFF - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_stale - - - - 19 - 0 - FFFF00 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_undersized - - - - 20 - 0 - FFFFFF - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pg_state_count_waitbackfill - - - - - - PG number vs Object number - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 0 - 00C800 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - objects_count - - - - 1 - 0 - C80000 - 1 - 2 - 0 - - Template App OpenStack Ceph Cluster - pool_count - - - - - - Storage capacity - 900 - 200 - 0.0000 - 100.0000 - 1 - 1 - 0 - 1 - 0 - 0.0000 - 0.0000 - 0 - 0 - 0 - 0 - - - 0 - 0 - 00C800 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pool_total_bytes_free - - - - 1 - 0 - C80000 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pool_total_bytes_total - - - - 2 - 0 - 0000C8 - 0 - 2 - 0 - - Template App OpenStack Ceph Cluster - pool_total_bytes_used - - - - - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/check_api.conf.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/check_api.conf.erb deleted file mode 100644 index fb7d707..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/check_api.conf.erb +++ /dev/null @@ -1,18 +0,0 @@ -[api] -log_level=CRITICAL -user=<%= scope.lookupvar('plugin_zabbix::params::openstack::access_user') %> -password=<%= scope.lookupvar('plugin_zabbix::params::openstack::access_password') %> -tenant=<%= scope.lookupvar('plugin_zabbix::params::openstack::access_tenant') %> -keystone_endpoints=http://<%= scope.lookupvar('plugin_zabbix::params::openstack::keystone_vip') %>:5000/v2.0 -nova_os_map=v2/%(tenant_id)s/flavors -glance_map=v1/images -keystone_service_map=v2.0/tenants -keystone_map=v2.0/tenants -cinder_map=v1/%(tenant_id)s/volumes -neutron_map= -nova_os_timeout=5 -glance_timeout=5 -keystone_service_timeout=5 -keystone_timeout=5 -cinder_timeout=5 -neutron_timeout=5 diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/check_db.conf.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/check_db.conf.erb deleted file mode 100644 index ea79ac9..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/check_db.conf.erb +++ /dev/null @@ -1,49 +0,0 @@ -[query_db] -log_level=CRITICAL -#Count tokens in keystone db -token_count_connection=mysql://keystone:<%= scope.lookupvar('plugin_zabbix::params::openstack::keystone_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/keystone -token_count_query=select count(*) from token - -#Count instances in error state -instance_error_connection=mysql://nova:<%= scope.lookupvar('plugin_zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/nova -instance_error_query=select count(*) from instances where vm_state='error' and deleted=0 - -#Count offline services - nova -services_offline_nova_connection=mysql://nova:<%= scope.lookupvar('plugin_zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/nova -services_offline_nova_query=select count(*) from services where disabled=0 and deleted=0 and timestampdiff(SECOND,updated_at,utc_timestamp())>60 - -#Count running instances -instance_count_connection=mysql://nova:<%= scope.lookupvar('plugin_zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/nova -instance_count_query=select count(*) from instances where deleted=0 and vm_state='active' - -#Sum all vcpus in cluster -cpu_total_connection=mysql://nova:<%= scope.lookupvar('plugin_zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/nova -cpu_total_query=select ifnull(sum(vcpus), 0) from compute_nodes where deleted=0 - -#Sum used vcpus in cluster -cpu_used_connection=mysql://nova:<%= scope.lookupvar('plugin_zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/nova -cpu_used_query=select ifnull(sum(vcpus), 0) from instances where deleted=0 and vm_state='active' - -#Sum all memory in cluster -ram_total_connection=mysql://nova:<%= scope.lookupvar('plugin_zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/nova -ram_total_query=select ifnull(sum(memory_mb), 0) from compute_nodes where deleted=0 - -#Sum used memory in cluster -ram_used_connection=mysql://nova:<%= scope.lookupvar('plugin_zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/nova -ram_used_query=select ifnull(sum(memory_mb), 0) from instances where deleted=0 and vm_state='active' - -#Count offline services - cinder -services_offline_cinder_connection=mysql://cinder:<%= scope.lookupvar('plugin_zabbix::params::openstack::cinder_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/cinder -services_offline_cinder_query=select count(*) from services where disabled=0 and deleted=0 and timestampdiff(SECOND,updated_at,utc_timestamp())>60 - -#Count offline services - neutron -services_offline_neutron_connection=mysql://neutron:<%= scope.lookupvar('plugin_zabbix::params::openstack::neutron_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/neutron -services_offline_neutron_query=select count(*) from agents where admin_state_up=1 and timestampdiff(SECOND,heartbeat_timestamp,utc_timestamp())>60 - -# WSREP -wsrep_status_connection=mysql://nova:<%= scope.lookupvar('plugin_zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/nova -wsrep_status_query=select replace(replace(replace(VARIABLE_VALUE, 'Primary', 1), 'Non-Primary', 2), 'Disconnected', 3) as value from information_schema.GLOBAL_STATUS where VARIABLE_NAME = 'wsrep_cluster_status'; -wsrep_ready_connection=mysql://nova:<%= scope.lookupvar('plugin_zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/nova -wsrep_ready_query=select replace(replace(VARIABLE_VALUE, 'ON', 1), 'OFF', 0) as value from information_schema.GLOBAL_STATUS where VARIABLE_NAME = 'wsrep_ready' -wsrep_connected_connection=mysql://nova:<%= scope.lookupvar('plugin_zabbix::params::openstack::nova_db_password') %>@<%= scope.lookupvar('plugin_zabbix::params::openstack::db_vip') %>/nova -wsrep_connected_query=select replace(replace(VARIABLE_VALUE, 'ON', 1), 'OFF', 0) as value from information_schema.GLOBAL_STATUS where VARIABLE_NAME = 'wsrep_connected' diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/check_rabbit.conf.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/check_rabbit.conf.erb deleted file mode 100644 index e1ebe1e..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/check_rabbit.conf.erb +++ /dev/null @@ -1,7 +0,0 @@ -[rabbitmq] -log_level=CRITICAL -user=<%= scope.lookupvar('plugin_zabbix::params::openstack::rabbit_user') %> -password=<%= scope.lookupvar('plugin_zabbix::params::openstack::rabbit_password') %> -host=http://<%= scope.lookupvar('plugin_zabbix::params::host_ip') %>:15672 -#OpenStack queues, Y - number of service types, N - count of *this* service, max_queues=Y*(2*N+1) -max_queues=128 diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/config_override.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/config_override.erb deleted file mode 100644 index a46a62d..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/config_override.erb +++ /dev/null @@ -1,5 +0,0 @@ ---- -network_metadata: - vips: - zbx_vip_mgmt: - namespace: zabbix diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/data_clean.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/data_clean.erb deleted file mode 100644 index 091a0a5..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/data_clean.erb +++ /dev/null @@ -1,59 +0,0 @@ -START TRANSACTION; -INSERT INTO `groups` (`groupid`, `name`, `internal`) VALUES (1,'Templates',0); -INSERT INTO `groups` (`groupid`, `name`, `internal`) VALUES (2,'Linux servers',0); -INSERT INTO `groups` (`groupid`, `name`, `internal`) VALUES (5,'Discovered hosts',1); -INSERT INTO `drules` (`druleid`, `proxy_hostid`, `name`, `iprange`, `delay`, `nextcheck`, `status`) VALUES (2,NULL,'Local network','192.168.1.1-255',3600,0,1); -INSERT INTO `valuemaps` (`valuemapid`, `name`) VALUES (1,'Service state'); -INSERT INTO `valuemaps` (`valuemapid`, `name`) VALUES (2,'Host status'); -INSERT INTO `valuemaps` (`valuemapid`, `name`) VALUES (3,'Windows service state'); -INSERT INTO `valuemaps` (`valuemapid`, `name`) VALUES (4,'APC Battery Replacement Status'); -INSERT INTO `valuemaps` (`valuemapid`, `name`) VALUES (5,'APC Battery Status'); -INSERT INTO `valuemaps` (`valuemapid`, `name`) VALUES (6,'HP Insight System Status'); -INSERT INTO `valuemaps` (`valuemapid`, `name`) VALUES (7,'Dell Open Manage System Status'); -INSERT INTO `valuemaps` (`valuemapid`, `name`) VALUES (8,'SNMP interface status (ifOperStatus)'); -INSERT INTO `valuemaps` (`valuemapid`, `name`) VALUES (9,'SNMP device status (hrDeviceStatus)'); -INSERT INTO `valuemaps` (`valuemapid`, `name`) VALUES (10,'Zabbix agent ping status'); -INSERT INTO `valuemaps` (`valuemapid`, `name`) VALUES (11,'SNMP interface status (ifAdminStatus)'); -INSERT INTO `media_type` (`mediatypeid`, `type`, `description`, `smtp_server`, `smtp_helo`, `smtp_email`, `exec_path`, `gsm_modem`, `username`, `passwd`, `status`) VALUES (1,0,'Email','mail.company.com','company.com','zabbix@company.com','','','','',0); -INSERT INTO `media_type` (`mediatypeid`, `type`, `description`, `smtp_server`, `smtp_helo`, `smtp_email`, `exec_path`, `gsm_modem`, `username`, `passwd`, `status`) VALUES (2,3,'Jabber','','','','','','jabber@company.com','zabbix',0); -INSERT INTO `media_type` (`mediatypeid`, `type`, `description`, `smtp_server`, `smtp_helo`, `smtp_email`, `exec_path`, `gsm_modem`, `username`, `passwd`, `status`) VALUES (3,2,'SMS','','','','','/dev/ttyS0','','',0); -INSERT INTO `users` (`userid`, `alias`, `name`, `surname`, `passwd`, `url`, `autologin`, `autologout`, `lang`, `refresh`, `type`, `theme`, `attempt_failed`, `attempt_ip`, `attempt_clock`, `rows_per_page`) VALUES (1,'<%= scope.lookupvar('plugin_zabbix::params::zabbix_admin_username') %>','User','Administrator','<%= scope.lookupvar('plugin_zabbix::params::zabbix_admin_password_md5') %>','',1,0,'en_GB',30,3,'default',0,'',0,50); -INSERT INTO `users` (`userid`, `alias`, `name`, `surname`, `passwd`, `url`, `autologin`, `autologout`, `lang`, `refresh`, `type`, `theme`, `attempt_failed`, `attempt_ip`, `attempt_clock`, `rows_per_page`) VALUES (2,'guest','Default','User','d41d8cd98f00b204e9800998ecf8427e','',0,900,'en_GB',30,1,'default',0,'',0,50); -INSERT INTO `usrgrp` (`usrgrpid`, `name`, `gui_access`, `users_status`, `debug_mode`) VALUES (7,'Zabbix administrators',0,0,0); -INSERT INTO `usrgrp` (`usrgrpid`, `name`, `gui_access`, `users_status`, `debug_mode`) VALUES (8,'Guests',0,0,0); -INSERT INTO `usrgrp` (`usrgrpid`, `name`, `gui_access`, `users_status`, `debug_mode`) VALUES (9,'Disabled',0,1,0); -INSERT INTO `usrgrp` (`usrgrpid`, `name`, `gui_access`, `users_status`, `debug_mode`) VALUES (11,'Enabled debug mode',0,0,1); -INSERT INTO `usrgrp` (`usrgrpid`, `name`, `gui_access`, `users_status`, `debug_mode`) VALUES (12,'No access to the frontend',2,0,0); -INSERT INTO `users_groups` (`id`, `usrgrpid`, `userid`) VALUES (1,9,2); -INSERT INTO `scripts` (`scriptid`, `name`, `command`, `host_access`, `usrgrpid`, `groupid`, `description`, `confirmation`, `type`, `execute_on`) VALUES (1,'Ping','/bin/ping -c 3 {HOST.CONN} 2>&1',2,NULL,NULL,'','',0,1); -INSERT INTO `scripts` (`scriptid`, `name`, `command`, `host_access`, `usrgrpid`, `groupid`, `description`, `confirmation`, `type`, `execute_on`) VALUES (2,'Traceroute','/bin/traceroute {HOST.CONN} 2>&1',2,NULL,NULL,'','',0,1); -INSERT INTO `actions` (`actionid`, `name`, `eventsource`, `evaltype`, `status`, `esc_period`, `def_shortdata`, `def_longdata`, `recovery_msg`, `r_shortdata`, `r_longdata`) VALUES (2,'Auto discovery. Linux servers.',1,0,1,0,'','',0,'',''); -INSERT INTO `actions` (`actionid`, `name`, `eventsource`, `evaltype`, `status`, `esc_period`, `def_shortdata`, `def_longdata`, `recovery_msg`, `r_shortdata`, `r_longdata`) VALUES (3,'Report problems to Zabbix administrators',0,0,1,3600,'{TRIGGER.STATUS}: {TRIGGER.NAME}','Trigger: {TRIGGER.NAME}\r\nTrigger status: {TRIGGER.STATUS}\r\nTrigger severity: {TRIGGER.SEVERITY}\r\nTrigger URL: {TRIGGER.URL}\r\n\r\nItem values:\r\n\r\n1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}\r\n2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}\r\n3. {ITEM.NAME3} ({HOST.NAME3}:{ITEM.KEY3}): {ITEM.VALUE3}',1,'{TRIGGER.STATUS}: {TRIGGER.NAME}','Trigger: {TRIGGER.NAME}\r\nTrigger status: {TRIGGER.STATUS}\r\nTrigger severity: {TRIGGER.SEVERITY}\r\nTrigger URL: {TRIGGER.URL}\r\n\r\nItem values:\r\n\r\n1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}\r\n2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}\r\n3. {ITEM.NAME3} ({HOST.NAME3}:{ITEM.KEY3}): {ITEM.VALUE3}'); -INSERT INTO `operations` (`operationid`, `actionid`, `operationtype`, `esc_period`, `esc_step_from`, `esc_step_to`, `evaltype`) VALUES (2,2,4,0,1,1,0); -INSERT INTO `operations` (`operationid`, `actionid`, `operationtype`, `esc_period`, `esc_step_from`, `esc_step_to`, `evaltype`) VALUES (3,3,0,0,1,1,0); -INSERT INTO `opmessage` (`operationid`, `default_msg`, `subject`, `message`, `mediatypeid`) VALUES (3,1,'{TRIGGER.STATUS}: {TRIGGER.NAME}','Trigger: {TRIGGER.NAME}\r\nTrigger status: {TRIGGER.STATUS}\r\nTrigger severity: {TRIGGER.SEVERITY}\r\nTrigger URL: {TRIGGER.URL}\r\n\r\nItem values:\r\n\r\n1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}\r\n2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}\r\n3. {ITEM.NAME3} ({HOST.NAME3}:{ITEM.KEY3}): {ITEM.VALUE3}',NULL); -INSERT INTO `opgroup` (`opgroupid`, `operationid`, `groupid`) VALUES (1,2,2); -INSERT INTO `conditions` (`conditionid`, `actionid`, `conditiontype`, `operator`, `value`) VALUES (2,2,10,0,'0'); -INSERT INTO `conditions` (`conditionid`, `actionid`, `conditiontype`, `operator`, `value`) VALUES (3,2,8,0,'9'); -INSERT INTO `conditions` (`conditionid`, `actionid`, `conditiontype`, `operator`, `value`) VALUES (4,2,12,2,'Linux'); -INSERT INTO `conditions` (`conditionid`, `actionid`, `conditiontype`, `operator`, `value`) VALUES (5,3,16,7,''); -INSERT INTO `conditions` (`conditionid`, `actionid`, `conditiontype`, `operator`, `value`) VALUES (6,3,5,0,'1'); -INSERT INTO `config` (`configid`,`refresh_unsupported`,`work_period`,`alert_usrgrpid`,`discovery_groupid`) values ('1','600','1-5,09:00-18:00;','7','5'); -INSERT INTO `graph_theme` (`graphthemeid`, `description`, `theme`, `backgroundcolor`, `graphcolor`, `graphbordercolor`, `gridcolor`, `maingridcolor`, `gridbordercolor`, `textcolor`, `highlightcolor`, `leftpercentilecolor`, `rightpercentilecolor`, `nonworktimecolor`, `gridview`, `legendview`) VALUES (1,'Original Blue','originalblue','F0F0F0','FFFFFF','333333','CCCCCC','AAAAAA','000000','222222','AA4444','11CC11','CC1111','E0E0E0',1,1); -INSERT INTO `graph_theme` (`graphthemeid`, `description`, `theme`, `backgroundcolor`, `graphcolor`, `graphbordercolor`, `gridcolor`, `maingridcolor`, `gridbordercolor`, `textcolor`, `highlightcolor`, `leftpercentilecolor`, `rightpercentilecolor`, `nonworktimecolor`, `gridview`, `legendview`) VALUES (2,'Black & Blue','darkblue','333333','0A0A0A','888888','222222','4F4F4F','EFEFEF','0088FF','CC4444','1111FF','FF1111','1F1F1F',1,1); -INSERT INTO `graph_theme` (`graphthemeid`, `description`, `theme`, `backgroundcolor`, `graphcolor`, `graphbordercolor`, `gridcolor`, `maingridcolor`, `gridbordercolor`, `textcolor`, `highlightcolor`, `leftpercentilecolor`, `rightpercentilecolor`, `nonworktimecolor`, `gridview`, `legendview`) VALUES (3,'Dark orange','darkorange','333333','0A0A0A','888888','222222','4F4F4F','EFEFEF','DFDFDF','FF5500','FF5500','FF1111','1F1F1F',1,1); -INSERT INTO `graph_theme` (`graphthemeid`, `description`, `theme`, `backgroundcolor`, `graphcolor`, `graphbordercolor`, `gridcolor`, `maingridcolor`, `gridbordercolor`, `textcolor`, `highlightcolor`, `leftpercentilecolor`, `rightpercentilecolor`, `nonworktimecolor`, `gridview`, `legendview`) VALUES (4,'Classic','classic','F0F0F0','FFFFFF','333333','CCCCCC','AAAAAA','000000','222222','AA4444','11CC11','CC1111','E0E0E0',1,1); -INSERT INTO `globalmacro` (`globalmacroid`, `macro`, `value`) VALUES (2,'{$SNMP_COMMUNITY}','public'); -INSERT INTO `sysmaps` (`sysmapid`, `name`, `width`, `height`, `backgroundid`, `label_type`, `label_location`, `highlight`, `expandproblem`, `markelements`, `show_unack`, `grid_size`, `grid_show`, `grid_align`, `label_format`, `label_type_host`, `label_type_hostgroup`, `label_type_trigger`, `label_type_map`, `label_type_image`, `label_string_host`, `label_string_hostgroup`, `label_string_trigger`, `label_string_map`, `label_string_image`, `iconmapid`, `expand_macros`) VALUES (1,'Local network',680,200,NULL,0,0,1,1,1,0,50,1,1,0,2,2,2,2,2,'','','','','',NULL,1); -# Filesystems low level discovery -INSERT INTO `regexps` (`regexpid`, `name`, `test_string`) VALUES (1,'File systems for discovery','ext3'); -INSERT INTO `expressions` (`expressionid`,`regexpid`,`expression`,`expression_type`,`exp_delimiter`,`case_sensitive`) values (1,1,'^(btrfs|ext2|ext3|ext4|jfs|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|ntfs|fat32|zfs)$',3,',',0); -# Network interfaces low level discovery -INSERT INTO `regexps` (`regexpid`, `name`, `test_string`) VALUES (2,'Network interfaces for discovery','eth0'); -INSERT INTO `expressions` (`expressionid`,`regexpid`,`expression`,`expression_type`,`exp_delimiter`,`case_sensitive`) values (2,2,'^lo$',4,',',0),(3,2,'^[a-z0-9]+$',4,',',0); -# SNMP -INSERT INTO `regexps` (`regexpid`, `name`, `test_string`) VALUES (3,'Storage devices for SNMP discovery','/boot'); -# Block devices low level discovery -INSERT INTO `regexps` (`regexpid`,`name`,`test_string`) values (4,'Block devices for discovery','vda'); -INSERT INTO `expressions` (`expressionid`,`regexpid`,`expression`,`expression_type`,`exp_delimiter`,`case_sensitive`) values (4,4,'^(vd.|sd.)$',3,',',0); -COMMIT; diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/my.cnf.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/my.cnf.erb deleted file mode 100644 index 71cdfa4..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/my.cnf.erb +++ /dev/null @@ -1,4 +0,0 @@ -[client] -user=<%= scope.lookupvar('plugin_zabbix::params::db_user') %> -host=<%= scope.lookupvar('plugin_zabbix::params::db_ip') %> -password=<%= scope.lookupvar('plugin_zabbix::params::db_password') %> diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix.conf.php.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix.conf.php.erb deleted file mode 100644 index d78164f..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix.conf.php.erb +++ /dev/null @@ -1,18 +0,0 @@ -'; -$DB["SERVER"] = '<%= scope.lookupvar('plugin_zabbix::params::db_ip') %>'; -$DB["PORT"] = '<%= scope.lookupvar('plugin_zabbix::params::db_port') %>'; -$DB["DATABASE"] = '<%= scope.lookupvar('plugin_zabbix::params::db_name') %>'; -$DB["USER"] = '<%= scope.lookupvar('plugin_zabbix::params::db_user') %>'; -$DB["PASSWORD"] = '<%= scope.lookupvar('plugin_zabbix::params::db_password') %>'; -// SCHEMA is relevant only for IBM_DB2 database -$DB["SCHEMA"] = ''; - -$ZBX_SERVER = '<%= scope.lookupvar('plugin_zabbix::params::server_ip') %>'; -$ZBX_SERVER_PORT = '<%= scope.lookupvar('plugin_zabbix::params::zabbix_ports')['server'] %>'; -$ZBX_SERVER_NAME = '<%= scope.lookupvar('plugin_zabbix::params::server_name') %>'; - -$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix_agent_userparam.conf.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix_agent_userparam.conf.erb deleted file mode 100644 index 70a8fbd..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix_agent_userparam.conf.erb +++ /dev/null @@ -1 +0,0 @@ -UserParameter=<%= @key_real %>,<%= @command %> diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix_agentd.conf.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix_agentd.conf.erb deleted file mode 100644 index dca78bf..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix_agentd.conf.erb +++ /dev/null @@ -1,37 +0,0 @@ -### Managed by Puppet ### - -# Fake server declaration to enforce running agent without -# separate server declaration in /etc/zabbix/zabbix_agent.d/server.conf -Server=<%= scope.lookupvar('plugin_zabbix::params::server_ip') %>,<%= scope.lookupvar('plugin_zabbix::monitoring::server_ips').join(',') %>,<%= scope.lookupvar('plugin_zabbix::params::mgmt_vip') %> -ServerActive=<%= scope.lookupvar('plugin_zabbix::params::server_ip') %> - -Hostname=<%= @fqdn %> - -ListenPort=<%= if scope.lookupvar('plugin_zabbix::params::zabbix_ports')['backend_agent'].nil?; scope.lookupvar('plugin_zabbix::params::zabbix_ports')['agent']; else scope.lookupvar('plugin_zabbix::params::zabbix_ports')['backend_agent']; end %> - -#ListenIP=<%= scope.lookupvar('plugin_zabbix::params::agent_listen_ip') %> - -#SourceIP=<%= scope.lookupvar('plugin_zabbix::params::agent_source_ip') %> - -StartAgents=<%= scope.lookupvar('plugin_zabbix::params::agent_start_agents') %> - -#RefreshActiveChecks=120 - -#DisableActive=1 - -#EnableRemoteCommands=1 - -DebugLevel=3 - -PidFile=<%= scope.lookupvar('plugin_zabbix::params::agent_pid_file') %> - -LogFile=<%= scope.lookupvar('plugin_zabbix::params::agent_log_file') %> - -LogFileSize=<%= scope.lookupvar('plugin_zabbix::params::agent_log_file_size') %> - -Timeout=<%= scope.lookupvar('plugin_zabbix::params::agent_timeout') %> - -<% if scope.lookupvar('plugin_zabbix::params::has_userparameters') %> -Include=<%= scope.lookupvar('plugin_zabbix::params::agent_include') %> -<% end %> - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix_apache.conf.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix_apache.conf.erb deleted file mode 100644 index 2c25ebd..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix_apache.conf.erb +++ /dev/null @@ -1,62 +0,0 @@ -### Managed by Puppet ### - -# Define /zabbix alias, this is the default - - Alias /zabbix <%= scope.lookupvar('plugin_zabbix::params::zabbix_document_root') %> - - - - AddHandler fastcgi-php5-fpm .php php phar - Action fastcgi-php5-fpm /fastcgi-php5-fpm virtual - Alias /fastcgi-php5-fpm <%= scope.lookupvar('plugin_zabbix::params::zabbix_document_root') %>/fastcgi-php5-fpm - FastCgiExternalServer <%= scope.lookupvar('plugin_zabbix::params::zabbix_document_root') %>/fastcgi-php5-fpm -host 127.0.0.1:<%= scope.lookupvar('plugin_zabbix::params::zabbix_ports')['fcgi'] %> -idle-timeout 900 -pass-header Authorization -pass-header Range - - -"> - - # Only when redirected internally by FastCGI. - Require env REDIRECT_STATUS - Options +ExecCGI - - Require all granted - Options FollowSymLinks - AllowOverride None - Order allow,deny - Allow from all - - -/conf"> - Order deny,allow - Deny from all - - Order deny,allow - Deny from all - - - -/api"> - Order deny,allow - Deny from all - - Order deny,allow - Deny from all - - - -/include"> - Order deny,allow - Deny from all - - Order deny,allow - Deny from all - - - -/include/classes"> - Order deny,allow - Deny from all - - Order deny,allow - Deny from all - - diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix_server.conf.erb b/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix_server.conf.erb deleted file mode 100644 index 407d7af..0000000 --- a/deployment_scripts/puppet/modules/plugin_zabbix/templates/zabbix_server.conf.erb +++ /dev/null @@ -1,192 +0,0 @@ -### Managed by Puppet ### -# This is config file for ZABBIX server process -# To get more information about ZABBIX, -# go http://www.zabbix.com - -############ GENERAL PARAMETERS ################# - -# This defines unique NodeID in distributed setup, -# Default value 0 (standalone server) -# This parameter must be between 0 and 999 -#NodeID=<%= scope.lookupvar('plugin_zabbix::params::server_node_id') %> - -# Number of pre-forked instances of pollers -# Default value is 5 -# This parameter must be between 0 and 255 -StartPollers=<%= scope.lookupvar('plugin_zabbix::params::server_start_pollers') %> - -# Number of pre-forked instances of IPMI pollers -# Default value is 0 -# This parameter must be between 0 and 255 -#StartIPMIPollers=0 - -# Number of pre-forked instances of pollers for unreachable hosts -# Default value is 1 -# This parameter must be between 0 and 255 -StartPollersUnreachable=<%= scope.lookupvar('plugin_zabbix::params::server_start_pollers_unreachable') %> - -# Number of pre-forked instances of trappers -# Default value is 5 -# This parameter must be between 0 and 255 -StartTrappers=<%= scope.lookupvar('plugin_zabbix::params::server_start_trappers') %> - -# Number of pre-forked instances of ICMP pingers -# Default value is 1 -# This parameter must be between 0 and 255 -#StartPingers=1 - -# Number of pre-forked instances of discoverers -# Default value is 1 -# This parameter must be between 0 and 255 -#StartDiscoverers=1 - -# Number of pre-forked instances of HTTP pollers -# Default value is 1 -# This parameter must be between 0 and 255 -#StartHTTPPollers=1 - -# Listen port for trapper. Default port number is 10051. This parameter -# must be between 1024 and 32767 - -ListenPort=<%= scope.lookupvar('plugin_zabbix::params::zabbix_ports')['server'] %> - -# Source IP address for outgouing connections -SourceIP=<%= scope.lookupvar('plugin_zabbix::params::server_ip') %> - -# Listen interface for trapper. Trapper will listen all network interfaces -# if this parameter is missing. - -ListenIP=<%= scope.lookupvar('plugin_zabbix::params::server_ip') %> - -# How often ZABBIX will perform housekeeping procedure -# (in hours) -# Default value is 1 hour -# Housekeeping is removing unnecessary information from -# tables history, alert, and alarms -# This parameter must be between 1 and 24 - -#HousekeepingFrequency=1 - -# How often ZABBIX will try to send unsent alerts -# (in seconds) -# Default value is 30 seconds -SenderFrequency=30 - -# Uncomment this line to disable housekeeping procedure -#DisableHousekeeping=1 - -# Specifies debug level -# 0 - debug is not created -# 1 - critical information -# 2 - error information -# 3 - warnings (default) -# 4 - for debugging (produces lots of information) - -DebugLevel=3 - -# Specifies how long we wait for agent response (in sec) -# Must be between 1 and 30 -Timeout=5 - -# Optional SNMP & others Zabbix extra modules specific configuration -Include=<%= scope.lookupvar('plugin_zabbix::params::zabbix_includes') %> - -# Specifies how many seconds trapper may spend processing new data -# Must be between 1 and 30 -#TrapperTimeout=5 - -# After how many seconds of unreachability treat a host as unavailable -#UnreachablePeriod=45 - -# How ofter check host for availability during the unreachability period -#UnavailableDelay=15 - -# How ofter check host for availability during the unavailability period -#UnavailableDelay=60 - -# Name of PID file - -PidFile=<%= scope.lookupvar('plugin_zabbix::params::zabbix_base_run_dir') %>/zabbix_server.pid - -# Name of log file -# If not set, syslog is used - -LogFile=<%= scope.lookupvar('plugin_zabbix::params::server_log_file') %> - -# Maximum size of log file in MB. Set to 0 to disable automatic log rotation. -LogFileSize=0 - -# Location for custom alert scripts -AlertScriptsPath=/home/zabbix/bin/ - -# Location of external scripts -ExternalScripts=<%= scope.lookupvar('plugin_zabbix::params::server_scripts') %> - -# Location of fping. Default is /usr/sbin/fping -# Make sure that fping binary has root permissions and SUID flag set -<%- if @osfamily == 'Debian' then -%> -FpingLocation=/usr/bin/fping -<%- else -%> -#FpingLocation=/usr/sbin/fping -<%- end -%> - -# Location of fping6. Default is /usr/sbin/fping6 -# Make sure that fping binary has root permissions and SUID flag set -<%- if @osfamily == 'Debian' then -%> -Fping6Location=/usr/bin/fping6 -<%- else -%> -#Fping6Location=/usr/sbin/fping6 -<%- end -%> - -# Temporary directory. Default is /tmp -#TmpDir=/tmp - -# Size of configuration cache, in bytes. Shared memory size for storing host, item and trigger data. -#Default is 8M -CacheSize=<%= scope.lookupvar('plugin_zabbix::params::server_cache_size') %> - -# Frequency of ICMP pings (item keys 'icmpping' and 'icmppingsec'). Defauls is 60 seconds. -#PingerFrequency=60 - -# Database host name -# Default is localhost - -DBHost=<%= scope.lookupvar('plugin_zabbix::params::db_ip') %> - -# Database name -# SQLite3 note: path to database file must be provided. DBUser and DBPassword are ignored. -DBName=<%= scope.lookupvar('plugin_zabbix::params::db_name') %> - -# Database user - -DBUser=<%= scope.lookupvar('plugin_zabbix::params::db_user') %> - -# Database password -# Comment this line if no password used - -DBPassword=<%= scope.lookupvar('plugin_zabbix::params::db_password') %> - -# Connect to MySQL using Unix socket? - -#DBSocket=/var/run/mysqld/mysqld.sock - -## Set Caching Options - -# How often Zabbix will perform update of configuration cache, in seconds. -# Default 60 -CacheUpdateFrequency=<%= scope.lookupvar('plugin_zabbix::params::server_cache_update_frequency') %> -# Size of history cache, in bytes. -# Shared memory size for storing history data. Default 8M -HistoryCacheSize=<%= scope.lookupvar('plugin_zabbix::params::server_history_cache_size') %> - -# Size of trend cache, in bytes. -# Shared memory size for storing trends data. Default 4M -TrendCacheSize=<%= scope.lookupvar('plugin_zabbix::params::server_trend_cache_size') %> - -# Size of text history cache, in bytes. -# Shared memory size for storing character, text or log history data. Default 16M -HistoryTextCacheSize=<%= scope.lookupvar('plugin_zabbix::params::server_history_text_cache_size') %> - -# How long a database query may take before being logged (in milliseconds). -# Default 0: don't log slow queries -LogSlowQueries=<%= scope.lookupvar('plugin_zabbix::params::server_log_slow_queries') %> diff --git a/deployment_tasks.yaml b/deployment_tasks.yaml deleted file mode 100644 index 5754084..0000000 --- a/deployment_tasks.yaml +++ /dev/null @@ -1,120 +0,0 @@ -- id: zbx-configure-apt - type: puppet - version: 2.0.0 - # Zabbix deployment start at post_deploy stage only - requires: [post_deployment_start] - required_for: [post_deployment_end] - role: '*' - parameters: - puppet_manifest: puppet/manifests/configure_apt.pp - puppet_modules: puppet/modules:/etc/puppet/modules - timeout: 120 - reexecute_on: - - deploy_changes - -- id: zbx-primary-services - type: puppet - version: 2.0.0 - requires: [post_deployment_start, zbx-configure-apt, cluster-haproxy] - required_for: [post_deployment_end] - role: [primary-controller] - # The primary crontroller configuration shouldn't start before haproxy is finished - # hence the cross-depends parameter that is required when running in - # a task-based deployment mode. - cross-depends: - - name: cluster-haproxy - role: [primary-controller] - parameters: - puppet_manifest: puppet/manifests/primary_controller.pp - puppet_modules: puppet/modules:/etc/puppet/modules - timeout: 1200 - reexecute_on: - - deploy_changes - -- id: zbx-controller-services - type: puppet - version: 2.0.0 - requires: [post_deployment_start, zbx-primary-services] - required_for: [post_deployment_end] - role: [primary-controller, controller] - # The crontrollers configuration shouldn't start before primary is finished - # hence the cross-depends parameter that is required when running in - # a task-based deployment mode. - cross-depends: - - name: zbx-primary-services - role: [primary-controller, controller] - parameters: - puppet_manifest: puppet/manifests/controller.pp - puppet_modules: puppet/modules:/etc/puppet/modules - timeout: 1200 - reexecute_on: - - deploy_changes - -- id: zbx-services - type: puppet - version: 2.0.0 - requires: [post_deployment_start, zbx-controller-services] - required_for: [post_deployment_end] - role: [primary-controller] - # The Zabbix services configuration shouldn't start before other controller services are finished - # hence the cross-depends parameter that is required when running in - # a task-based deployment mode. - cross-depends: - - name: zbx-controller-services - role: [primary-controller, controller] - parameters: - puppet_manifest: puppet/manifests/zabbix_server_config.pp - puppet_modules: puppet/modules:/etc/puppet/modules - timeout: 600 - reexecute_on: - - deploy_changes - -- id: zbx-agent-services - type: puppet - version: 2.0.0 - requires: [post_deployment_start, zbx-services] - required_for: [post_deployment_end] - role: '*' - # The Zabbix agent services configuration shouldn't start before Zabbix generic services are finished - # hence the cross-depends parameter that is required when running in - # a task-based deployment mode. - cross-depends: - - name: zbx-services - role: '*' - parameters: - puppet_manifest: puppet/manifests/agent.pp - puppet_modules: puppet/modules:/etc/puppet/modules - timeout: 600 - reexecute_on: - - deploy_changes - -- id: zbx-cleanup-apt-config - type: puppet - version: 2.0.0 - requires: [post_deployment_start, zbx-agent-services] - required_for: [post_deployment_end, update_hosts] - role: '*' - # The Zabbix APT configuration cleanup shouldn't start before Zabbix agent services are finished - # hence the cross-depends parameter that is required when running in - # a task-based deployment mode. - cross-depends: - - name: zbx-agent-services - role: '*' - parameters: - puppet_manifest: puppet/manifests/cleanup_apt_config.pp - puppet_modules: puppet/modules:/etc/puppet/modules - timeout: 300 - reexecute_on: - - deploy_changes - -- id: zbx-override-configuration - type: puppet - version: 2.0.0 - # Zabbix deployment start at post_deploy stage only - requires: [upload_configuration] - required_for: [globals] - role: '*' - parameters: - puppet_manifest: puppet/manifests/override_configuration.pp - puppet_modules: puppet/modules:/etc/puppet/modules - timeout: 120 diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index 567609b..0000000 --- a/doc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build/ diff --git a/doc/plugin-guide/Makefile b/doc/plugin-guide/Makefile deleted file mode 100644 index 7a69b5f..0000000 --- a/doc/plugin-guide/Makefile +++ /dev/null @@ -1,192 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = build - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - -clean: - rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/TheZabbixpluginforFuel.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/TheZabbixpluginforFuel.qhc" - -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/TheZabbixpluginforFuel" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/TheZabbixpluginforFuel" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." - -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/doc/plugin-guide/images/ceph_screen.png b/doc/plugin-guide/images/ceph_screen.png deleted file mode 100644 index 66a3cec..0000000 Binary files a/doc/plugin-guide/images/ceph_screen.png and /dev/null differ diff --git a/doc/plugin-guide/images/dashboard.png b/doc/plugin-guide/images/dashboard.png deleted file mode 100755 index bbaca1d..0000000 Binary files a/doc/plugin-guide/images/dashboard.png and /dev/null differ diff --git a/doc/plugin-guide/images/host_ceph.png b/doc/plugin-guide/images/host_ceph.png deleted file mode 100644 index b317ee5..0000000 Binary files a/doc/plugin-guide/images/host_ceph.png and /dev/null differ diff --git a/doc/plugin-guide/images/hostgroupspage.png b/doc/plugin-guide/images/hostgroupspage.png deleted file mode 100755 index 2189ab9..0000000 Binary files a/doc/plugin-guide/images/hostgroupspage.png and /dev/null differ diff --git a/doc/plugin-guide/images/hostpage.png b/doc/plugin-guide/images/hostpage.png deleted file mode 100755 index e281a46..0000000 Binary files a/doc/plugin-guide/images/hostpage.png and /dev/null differ diff --git a/doc/plugin-guide/images/hostpage2.png b/doc/plugin-guide/images/hostpage2.png deleted file mode 100644 index 365d160..0000000 Binary files a/doc/plugin-guide/images/hostpage2.png and /dev/null differ diff --git a/doc/plugin-guide/images/login.png b/doc/plugin-guide/images/login.png deleted file mode 100755 index baf3640..0000000 Binary files a/doc/plugin-guide/images/login.png and /dev/null differ diff --git a/doc/plugin-guide/images/mysql_items.png b/doc/plugin-guide/images/mysql_items.png deleted file mode 100644 index 0fe87d3..0000000 Binary files a/doc/plugin-guide/images/mysql_items.png and /dev/null differ diff --git a/doc/plugin-guide/images/openstackcluster1.png b/doc/plugin-guide/images/openstackcluster1.png deleted file mode 100755 index af292bf..0000000 Binary files a/doc/plugin-guide/images/openstackcluster1.png and /dev/null differ diff --git a/doc/plugin-guide/images/openstackcluster2.png b/doc/plugin-guide/images/openstackcluster2.png deleted file mode 100644 index 2cc735b..0000000 Binary files a/doc/plugin-guide/images/openstackcluster2.png and /dev/null differ diff --git a/doc/plugin-guide/images/settings.png b/doc/plugin-guide/images/settings.png deleted file mode 100644 index 3c4312a..0000000 Binary files a/doc/plugin-guide/images/settings.png and /dev/null differ diff --git a/doc/plugin-guide/images/templatespage.png b/doc/plugin-guide/images/templatespage.png deleted file mode 100755 index 2c2d83e..0000000 Binary files a/doc/plugin-guide/images/templatespage.png and /dev/null differ diff --git a/doc/plugin-guide/images/templatespage2.png b/doc/plugin-guide/images/templatespage2.png deleted file mode 100644 index c78fb8f..0000000 Binary files a/doc/plugin-guide/images/templatespage2.png and /dev/null differ diff --git a/doc/plugin-guide/source/_static/.gitkeep b/doc/plugin-guide/source/_static/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/doc/plugin-guide/source/appendix.rst b/doc/plugin-guide/source/appendix.rst deleted file mode 100644 index 202771d..0000000 --- a/doc/plugin-guide/source/appendix.rst +++ /dev/null @@ -1,98 +0,0 @@ -======== -Appendix -======== - -.. _tuning: - -Zabbix configuration tuning -=========================== - -*New in version 2.5.0* - -Zabbix server -------------- - -To be able to handle large environments, Zabbix server is configured with the following -parameters (provided that there is enough memory on the node otherwise the default -values are used). - -Memory cache sizes: - -* CacheSize = 32M (default 8M) -* HistoryCacheSize = 128M (default 8M) -* TrendCacheSize = 512M (default 4M) -* HistoryTextCacheSize = 128M (default 16M) - -The process numbers are also increased: - -* StartPollers = 30 (default 10) -* StartPollersUnreachable = 30 (default 1) -* StartTrappers = 15 (default 5) - -Refer to the `Zabbix server `_ official documentation for further details -and this `blog entry `_ can be useful to configure the optimal number of Zabbix processes. - -Zabbix agent ------------- - -The following parameters are set up: - -* StartAgents = 10 (number of processes used to collect data, default 3) -* Timeout = 30 (default 3 seconds) - -Refer to the `Zabbix agent `_ official documentation for further details. - -Kernel ------- - -Since cache related parameters of Zabbix server daemon are increased, Linux kernel -has to be configured accordingly. -The plugin also configures the maximum shared memory to 1GB (sysctl kernel.shmmax). - -Refer to the `How to configure shared memory `_ for further details. - -.. _links: - -Links -===== - -- `Zabbix Official site `_ -- `Zabbix 2.4 documentation `_ -- `Zabbix 2.4 documentation - SNMP traps `_ -- `Fuel Plugins CLI guide `_ - -.. _licenses: - -Components licenses -=================== - -deb packages ------------- - -=================== ======= -Name License -=================== ======= -zabbix-agent GPL-2.0 -zabbix-frontend-php GPL-2.0 -zabbix-get GPL-2.0 -zabbix-sender GPL-2.0 -zabbix-server-mysql GPL-2.0 -=================== ======= - -rpm packages ------------- - -=================== ======= -Name License -=================== ======= -zabbix-agent GPLv2+ -zabbix-get GPLv2+ -zabbix-sender GPLv2+ -zabbix-server GPLv2+ -zabbix-server-mysql GPLv2+ -zabbix-web GPLv2+ -zabbix-web-mysql GPLv2+ -=================== ======= - diff --git a/doc/plugin-guide/source/changelog.rst b/doc/plugin-guide/source/changelog.rst deleted file mode 100644 index b073d29..0000000 --- a/doc/plugin-guide/source/changelog.rst +++ /dev/null @@ -1,79 +0,0 @@ -Release notes / Changelog -========================= - -**2.5.3** - -* Compatibility with MOS 7.0, 8.0, 9.0, 9.1, 9.2 and 10.0 -* typo in ceph check script and missing PG state (bug 1661505_) - -.. _1661505: https://bugs.launchpad.net/fuel-plugins/+bug/1661505 - -**2.5.2** - -* Compatibility with MOS 7.0, 8.0, 9.0, 9.1 and 9.2 -* VIP becomes unavailable after its Controller reboot if Zabbix with OVS bridges are used (bug 1644821_) -* Error when deploying on MOS 9.0 env with modified hostnames (bug 1633701_) - -.. _1644821: https://bugs.launchpad.net/fuel-plugins/+bug/1644821 -.. _1633701: https://bugs.launchpad.net/fuel-plugins/+bug/1633701 - -**2.5.1** - -* Compatibility with MOS 7.0, 8.0, 9.0 and 9.1 - -**2.5.0** - -* Compatibility with MOS 8.0 -* Service "zabbix_server" was restarted after executing of task "upload_core_repos" (bug 1529642_) -* Monitoring of HAProxy vips doesn't work when the backend name contains dots (bug 1525713_) -* Zabbix plugin should provide zabbix_get command (bug 1525924_) -* Fail to deploy with base-os or virt roles (bug 1515956_) -* Enhance :ref:`Ceph` monitoring -* :ref:`tuning` for server and agents -* Add :ref:`MySQL` cluster metrics (wsrep global variables) -* Embed all package dependencies (bug 1483983_) -* Fix HAproxy configuration behind the Zabbix VIP (bug 1510115_) -* Reduced set of HA proxy gathered data to be in sync with LMA (bug 1531834_ + see `LMA metrics `_) -* Compatibility with MOS 7.0 (follow up) - - * Fix NTP monitoring on controller nodes (bug 1513454_) - * Monitor `cinder-volume` process (instead of the Pacemaker resource which has - been removed) - * Fix trigger for Neutron DHCP/L3 agents (these agents run now on all controllers) - * Fix Swift container TCP check (bug 1517472_) - -* New process checks - - * nova-conductor - * nova-novncproxy - -* Generate documentation with `Sphinx `_ -* Allow deployment without Horizon (bug 1517005_) -* Skip zabbix agent installation when node has either 'base-os' or 'virt' role (bug 1515956_) - -.. _1529642: https://bugs.launchpad.net/fuel-plugins/+bug/1529642 -.. _1525713: https://bugs.launchpad.net/fuel-plugins/+bug/1525713 -.. _1525924: https://bugs.launchpad.net/fuel-plugins/+bug/1525924 -.. _1515956: https://bugs.launchpad.net/fuel-plugins/+bug/1515956 -.. _1483983: https://bugs.launchpad.net/fuel/7.0.x/+bug/1483983 -.. _1510115: https://bugs.launchpad.net/fuel/+bug/1510115 -.. _1513454: https://bugs.launchpad.net/fuel-plugins/+bug/1513454 -.. _1517472: https://bugs.launchpad.net/fuel/+bug/1517472 -.. _1517005: https://bugs.launchpad.net/fuel/+bug/1517005 -.. _1515956: https://bugs.launchpad.net/fuel-plugins/+bug/1515956 -.. _1531834: https://bugs.launchpad.net/fuel-plugins/+bug/1531834 - -**2.0.0** - -* Fix HA issue when scaling down/up a controller (bug 1506767_) -* Compatibility with MOS 7.0 -* Disable user Guest in zabbix -* Use HTTPS Zabbix UI -* Use dedicated VIP for Zabbix server - -.. _1506767: https://bugs.launchpad.net/fuel-plugins/+bug/1506767 - -**1.0.0** - -* This is the first release of the plugin. - diff --git a/doc/plugin-guide/source/conf.py b/doc/plugin-guide/source/conf.py deleted file mode 100644 index 65045ed..0000000 --- a/doc/plugin-guide/source/conf.py +++ /dev/null @@ -1,288 +0,0 @@ -# -*- coding: utf-8 -*- -# -# The Zabbix plugin for Fuel documentation build configuration file, created by -# sphinx-quickstart on Tue Nov 3 10:53:03 2015. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys -import os - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ ] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'The Zabbix plugin for Fuel' -copyright = u'2016, Mirantis Inc.' -author = u'Mirantis Inc.' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = '2.5' -# The full version, including alpha/beta/rc tags. -release = '2.5-2.5.3-1' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -#exclude_patterns = [] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -#todo_include_todos = True - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'default' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -#html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' -#html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# Now only 'ja' uses this config value -#html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -#html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = 'TheZabbixpluginforFueldoc' - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', - -# Latex figure (float) alignment -#'figure_align': 'htbp', - -'classoptions': ',openany,oneside', -'babel': '\\usepackage[english]{babel}' -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'TheZabbixpluginforFuel-' + version + '.tex', u'The Zabbix plugin for Fuel Documentation', - author, 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'thezabbixpluginforfuel', u'The Zabbix plugin for Fuel Documentation', - [author], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'TheZabbixpluginforFuel', u'The Zabbix plugin for Fuel Documentation', - author, 'TheZabbixpluginforFuel') -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False - -# Insert footnotes where they are defined instead of at the end. -pdf_inline_footnotes = True diff --git a/doc/plugin-guide/source/description.rst b/doc/plugin-guide/source/description.rst deleted file mode 100644 index cbec002..0000000 --- a/doc/plugin-guide/source/description.rst +++ /dev/null @@ -1,42 +0,0 @@ -============================================= -Guide to the Zabbix Plugin extension for Fuel -============================================= - -This plugin extends Mirantis OpenStack functionality by adding Zabbix -monitoring system. It installs Zabbix server, frontend and agent components. -The plugin configures Zabbix by adding templates to monitor nodes and OpenStack -services and APIs. - -Requirements -============ - -=========== ================================ -Requirement Version/Comment -=========== ================================ -Fuel 7.0, 8.0, 9.0, 9.1, 9.2 and 10.0 -=========== ================================ - -Operational limitations -======================= - -* If a base-os role node is deployed within the environment, the plugin - installation may fail because the management network is not configured - (see bug `1515956 `_). - -* Prior to version 2.5.0, the plugin requires access to distribution repository, - external or local mirror, in order to download necessary packages for proper - installation. - Since plugin version 2.5.0, the `fuel-createmirror` command is supported. - -* If you remove some nodes after initial deployments, their related informations - will not be removed from the Zabbix collected metrics and you will have to - remove these manually from the Zabbix UI. - -* MySQL database is common with other OpenStack services (see `1531834 `_) - This has a potential high impact on the disk sizing for /var/lib/mysql even - though the biggest set of data has been cut down drastically. - -* Zabbix server service is located on one of the controller nodes - therefore and in the exact same manner than `1531834 `_ can impact disk space, - this can have a significant CPU and/or memory usage on controller nodes for large deployment. - diff --git a/doc/plugin-guide/source/guide.rst b/doc/plugin-guide/source/guide.rst deleted file mode 100644 index 74b7905..0000000 --- a/doc/plugin-guide/source/guide.rst +++ /dev/null @@ -1,316 +0,0 @@ -========== -User Guide -========== - -Important preliminary notes -=========================== - -- It is highly recommended to do a network verification check prior - to any deployment. -- This plugin version only supports Ubuntu OS type. -- You can also choose any supervisor and/or also change the - networking configuration according to your needs but you can not use - the old legacy networking mode (nova-network) as this is not supported. -- Please note however that the Zabbix server will be located on the - controller nodes and that the MySQL database which Zabbix will use - is common to all other OpenStack components. This might have a very - important impact on CPU and/or memory usage on controller nodes as - well as disk space consumption in /var/lib/mysql due to the fact that - Zabbix is gathering quite an important number of metrics and quite - frequently (see known problems hereafter). -- If you want Zabbix to operate in HA mode, you need to select several - nodes as controllers so that the deployment automatically enables - Zabbix high-availability. - -Known problems -============== - -- If a base-os role node is deployed within the environment, the plugin - installation may fail because the management network is not configured - (see bug `1515956 `_). - -- If you remove some nodes after initial deployments, their related informations - will not be removed from the Zabbix collected metrics and you will have to - remove these manually from the Zabbix UI. - -- MySQL database is common with other OpenStack services (see `1531834 `_) - This has a potential high impact on the disk sizing for /var/lib/mysql even - though the biggest set of data has been cut down drastically. - -- Zabbix server service is located on one of the controller nodes - therefore and in the exact same manner than `1531834 `_ can impact disk space, - this can have a significant CPU and/or memory usage on controller nodes for large deployment. - -- Error when deploying on MOS 9.0 env with modified hostnames (see bug `1633701 `_). - -Environment configuration -========================= - -.. highlight:: none - -#. Create an environment. - - For more information about environment creation, see - `Create a new OpenStack environment in Mirantis OpenStack User Guide - `_. - -#. Choose in *Environments* an environment for which you want to run Zabbix - plugin. - -#. Open *Settings* tab and scroll the page down. On the left select - *Zabbix for Fuel*. - -#. Set credentials for *Zabbix for Fuel*: - - .. image:: ../images/settings.png - :alt: settings.png - :width: 80% - - You could see default passwords by clicking on the eye icon. - - It is highly recommended to change default passwords for Zabbix Administrator, - Zabbix Database and Monitoring user. - - User 'monitoring' will be added in Openstack for zabbix API checks. - -#. Adjust other environment settings to your requirements and deploy the - environment. - - For more information, see - `Deploy changes in Mirantis OpenStack User Guide - `_. - -#. If you are using Fuel network-template you should add new roles mapping - named 'zabbix'. Here is a sample:: - - network_scheme: - mgmt: - endpoints: - - br-mgmt - roles: - zabbix: br-mgmt - - For details see `Using Networking Templates `_. - -Zabbix frontend UI -================== - -#. After successful deployment you will see a green notification: “Deployment - of environment 'test' is done. Access the OpenStack dashboard (Horizon) at - `http://172.16.0.2/ `_”. - - In this example, 172.16.0.2 is a VIP address (see troubleshooting - section to see how to get this IP address). - - Zabbix UI will be available - at `http://172.16.0.2/zabbix `_ - (at ``http:///zabbix`` in general). - - After opening this address in a browser, you should see Zabbix login page: - - .. image:: ../images/login.png - :alt: login.png - :width: 50% - -#. Now log into Zabbix with the credentials set provided on the Settings tab of - the Fuel web UI (see step 2 in the `Environment - configuration <#environment-configuration>`_ section). - - After logging into Zabbix, you will see the Zabbix Dashboard page: - - .. image:: ../images/dashboard.png - :alt: dashboard.png - :width: 80% - -#. The Zabbix Dashboard page provides information on running processes and - their state. - - If all processes are running successfully in the environment, - you should see only green color. - - To demonstrate that monitoring is working properly, the Nova Scheduler - process had been turned off. - - You can notice that Zabbix detected the halted process and provided the problem - description: Nova Scheduler process is not running on node-13.domain.tld. - - When you go to Monitoring->Screens page, you will see the OpenStack Cluster - screen: - - .. image:: ../images/openstackcluster1.png - :alt: openstackcluster1.png - :width: 100% - - .. image:: ../images/openstackcluster2.png - :alt: openstackcluster2.png - :width: 100% - - On this screen you have general statistics and graphs presenting resources - usage in OpenStack environment. - - There is also a list of last 10 events recorded by Zabbix. - -.. _Pages: - -Pages ------ - -Below there are a few screenshots from Zabbix configuration pages to show how -it should look after a successful environment deployment. Zabbix UI provides -several pages placed under Configuration tab. - -Host groups page -^^^^^^^^^^^^^^^^ - -This page has a list of host groups with their members. There are separate -groups for Controllers and Computes. These groups are used to join nodes -with the same role in OpenStack environment. There is also ManagedByPuppet -group which contains all OpenStack nodes. Remaining host groups are created -by default in Zabbix. For more information and instructions, see `6.1 Hosts -and host groups `_ chapter in the official Zabbix Documentation. - -.. image:: ../images/hostgroupspage.png - :alt: hostgroupspage.png - :width: 100% - -Hosts page -^^^^^^^^^^ - -This page contains a list of all monitored OpenStack nodes and, additionally -one OpenStackCluster virtual host which represents OpenStack API. There are -also lists of linked monitoring templates to particular hosts. During -installation, the plugin detects which services have been installed on a -particular node and links appropriate templates to the node to enable -monitoring for those services. There is an Zabbix agent availability report -in the last column. When ‘Z’ icon is green, the Zabbix agent on this node is -running and available. - -.. image:: ../images/hostpage.png - :alt: hostpage.png - :width: 100% - -.. image:: ../images/hostpage2.png - :alt: hostpage2.png - :width: 50% - -Templates page -^^^^^^^^^^^^^^ - -This page contains a list of all monitoring templates and list of hosts to -which they are linked. A monitoring template is a way to group items, graphs -and thresholds which monitor a particular resource type, for example an -OpenStack service like Nova Compute. For more information and instructions, -see `6.6 Templates chapter `_ in the official Zabbix Documentation. - -.. image:: ../images/templatespage.png - :alt: templatespage.png - :width: 100% - -.. image:: ../images/templatespage2.png - :alt: templatespage2.png - :width: 100% - -You can add an additional items (checks), create triggers and events via -Zabbix UI. For more information and instructions, see `6.2 Items -`_, `6.3 -Triggers `_ -and `6.4 Events chapters `_ in the official Zabbix Documentation. - -By default, there are no notifications configured, but you can add them into the Zabbix UI. -For more information and instructions, see `6.7 Notifications -`_ -upon events chapter in the official Zabbix Documentation. - -.. _Ceph: - -Ceph -==== - -When Ceph is deployed the plugin configures: - -* A check on the general health of the cluster as reported by the command `ceph health` *(version 1.0.0)* -* A Screen 'Ceph' providing an overview of the cluster with the following metrics *(version 2.5.0)*: - - .. image:: ../images/ceph_screen.png - :width: 100% - -* Zabbix is configured to verify that all Ceph processes are running *(version 2.5.0)*: - - * ceph-osd - * ceph-mon (on controller nodes) - -* A Host 'CephCluster' is configured where are attached all cluster metrics *(version 2.5.0)*: - - * Metrics collected for the cluster *(version 2.5.0)*: - - - monitor_count - - quorum_count - - pg_bytes_used - - pg_bytes_free - - pg_bytes_total - - pg_data_bytes - - pg_count - - pg_state_count_backfill - - pg_state_count_repair - - pg_state_count_creating - - pg_state_count_recovering - - pg_state_count_peered - - pg_state_count_incomplete - - pg_state_count_peering - - pg_state_count_splitting - - pg_state_count_waitbackfill - - pg_state_count_down - - pg_state_count_backfilltoofull - - pg_state_count_remapped - - pg_state_count_replay - - pg_state_count_inconsistent - - pg_state_count_clean - - pg_state_count_active - - pg_state_count_undersized - - pg_state_count_degraded - - pg_state_count_stale - - pg_state_count_scrubbing - - objects_count - - pool_count - - pool_total_bytes_used - - pool_total_bytes_free - - pool_total_bytes_total - - pool_total_percent_used - - pool_total_percent_free - - osd_count_up - - osd_count_down - - osd_count_in - - osd_count_out - - * Triggers configured *(version 2.5.0)*: - - - An alert is triggered when Zabbix fail to collect Ceph cluster metrics - - An alert is triggered when the cluster free capacity is under 10% - - .. image:: ../images/host_ceph.png - :width: 100% - -.. _MySQL: - -MySQL -===== - -The following metrics are retrieved for each MySQL server (generally running -on controller nodes): - - .. image:: ../images/mysql_items.png - :width: 80% - -and 4 triggers are configured: - -- a simple `mysqladmin ping` check *(version 1.0.0)* -- and 3 cluster related checks *(version 2.5.0)*: - - - the cluster node is ready - - the cluster node is connected to the cluster - - the cluster node status (Primary, Non-Primary or Disconnected) - diff --git a/doc/plugin-guide/source/index.rst b/doc/plugin-guide/source/index.rst deleted file mode 100644 index b1527c4..0000000 --- a/doc/plugin-guide/source/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -====================================================== -Welcome to The Zabbix plugin for Fuel's documentation! -====================================================== - -.. toctree:: - :maxdepth: 3 - - revisionhistory - purpose - keyterms - description - changelog - limitations - installation - guide - troubleshooting - appendix - diff --git a/doc/plugin-guide/source/installation.rst b/doc/plugin-guide/source/installation.rst deleted file mode 100644 index ef49cf6..0000000 --- a/doc/plugin-guide/source/installation.rst +++ /dev/null @@ -1,51 +0,0 @@ -================== -Installation Guide -================== - -Zabbix plugin installation -========================== - -To install Zabbix plugin, follow these steps: - -.. highlight:: none - -#. Download the plugin from the - `Fuel Plugins Catalog `_. - -#. Copy the plugin from your local machine to a previously deployed - Fuel Master node using SSH. If you do not have the Fuel Master node yet, - see `Quick Start Guide `_:: - - # scp zabbix_monitoring-2.5-2.5.3-1.noarch.rpm root@:/tmp - -#. Log into the Fuel Master node. Install the plugin:: - - # cd /tmp - # fuel plugins --install zabbix_monitoring-2.5-2.5.3-1.noarch.rpm - -#. Check if the plugin was installed successfully:: - - # fuel plugins - id | name | version | package_version - ---|---------------------------|----------|---------------- - 1 | zabbix_monitoring | 2.5.3 | 3.0.0 - -Zabbix plugin removal -===================== - -To uninstall Zabbix plugin, follow these steps: - -#. Delete all environments in which Zabbix plugin has been enabled. - -#. Uninstall the plugin:: - - # fuel plugins --remove zabbix_monitoring==2.5.3 - -#. Check if the plugin was uninstalled successfully:: - - # fuel plugins - id | name | version | package_version - ---|---------------------------|----------|---------------- - ... - You can still have other plugins listed here but not zabbix_monitoring diff --git a/doc/plugin-guide/source/keyterms.rst b/doc/plugin-guide/source/keyterms.rst deleted file mode 100644 index f199ac7..0000000 --- a/doc/plugin-guide/source/keyterms.rst +++ /dev/null @@ -1,12 +0,0 @@ -===================================== -Key terms, acronyms and abbreviations -===================================== - -Zabbix - An enterprise open source monitoring solution for networks and - applications. It is designed to monitor and track the status of various - network services, servers, and other network hardware. - -VIP - Virtual IP Address. - diff --git a/doc/plugin-guide/source/limitations.rst b/doc/plugin-guide/source/limitations.rst deleted file mode 100644 index 7015e04..0000000 --- a/doc/plugin-guide/source/limitations.rst +++ /dev/null @@ -1,33 +0,0 @@ -Limitations -=========== - -* The plugin only supports neutron when specifying network settings. Old legacy mode (nova-network) is not supported - -* If a base-os role node is deployed within the environment, the plugin - installation may fail because the management network is not configured - (see bug `1515956 `_). - -* Prior to version 2.5.0, the plugin requires access to distribution repository, - external or local mirror, in order to download necessary packages for proper - installation. - Since plugin version 2.5.0, the `fuel-mirror` (formerly `fuel-createmirror`) command is supported. - - -Reduced footprint ------------------ - -The Zabbix plugin does not support reduced footprint deployment for Fuel 7.0 -and Fuel 8.0. `LP1610217 `_ - -The Zabbix plugin version 2.5.3 supports the reduced footprint deployment -starting with Fuel 9.x **only**. To deploy a corresponding OpenStack environment: - -#. Enable the `reduced footprint `_ - feature and deploy all ``virt`` nodes **without** enabling the Zabbix - plugin in the Fuel web UI. - -#. Once the ``virt`` nodes are successfully deployed, enable the Zabbix plugin - in the Fuel web UI. - -#. Deploy your OpenStack environment as usual (controller, compute, and other nodes - as required). diff --git a/doc/plugin-guide/source/purpose.rst b/doc/plugin-guide/source/purpose.rst deleted file mode 100644 index 8cb9db2..0000000 --- a/doc/plugin-guide/source/purpose.rst +++ /dev/null @@ -1,7 +0,0 @@ -================ -Document purpose -================ - -This document provides instructions for installing, configuring and -using Zabbix monitoring plugin for Fuel. - diff --git a/doc/plugin-guide/source/revisionhistory.rst b/doc/plugin-guide/source/revisionhistory.rst deleted file mode 100644 index b8540f6..0000000 --- a/doc/plugin-guide/source/revisionhistory.rst +++ /dev/null @@ -1,60 +0,0 @@ -================ -Revision history -================ - -======= ============= ============================ ====================== -Version Revision date Editor Comment -======= ============= ============================ ====================== -0.1 01.23.2014 Irina Povolotskaya Created the template - (ipovolotskaya@mirantis.com) structure. -------- ------------- ---------------------------- ---------------------- -0.2 03.23.2015 Piotr Misiak First release. - (pmisiak@mirantis.com) -------- ------------- ---------------------------- ---------------------- -0.3 03.25.2015 Irina Povolotskaya Minor changes. - (ipovolotskaya@mirantis.com) -------- ------------- ---------------------------- ---------------------- -0.4 03.30.2015 Irina Povolotskaya Added `Document - (ipovolotskaya@mirantis.com) purpose <#document- - purpose>`_ and `Key - terms, acronyms and - abbreviations <#key- - terms-acronyms-and- - abbreviations>`_ - sections. -------- ------------- ---------------------------- ---------------------- -0.5 03.31.2015 Piotr Misiak Installation guide - (pmisiak@mirantis.com) changed to rpm - package -------- ------------- ---------------------------- ---------------------- -0.6 04.02.2015 Piotr Misiak User guide added - (pmisiak@mirantis.com) -------- ------------- ---------------------------- ---------------------- -1.0 04.15.2015 Piotr Misiak Major version - (pmisiak@mirantis.com) -------- ------------- ---------------------------- ---------------------- -1.0.1 02.05.2016 Olivier Bourdon Minor version - (obourdon@mirantis.com) -------- ------------- ---------------------------- ---------------------- -2.0.0 11.23.2015 Swann Croiset Major version - (scroiset@mirantis.com) -------- ------------- ---------------------------- ---------------------- -2.5.0 11.20.2015 Swann Croiset Major version - (scroiset@mirantis.com) -------- ------------- ---------------------------- ---------------------- -2.5.0 03.10.2016 Olivier Bourdon Doc fixes - (obourdon@mirantis.com) -------- ------------- ---------------------------- ---------------------- -2.5.1 07.20.2016 Olivier Bourdon Added MOS 9.0 support - (obourdon@mirantis.com) -------- ------------- ---------------------------- ---------------------- -2.5.1 10.19.2016 Olivier Bourdon Added MOS 9.1 support - (obourdon@mirantis.com) -------- ------------- ---------------------------- ---------------------- -2.5.2 01.10.2017 Olivier Bourdon Added MOS 9.2 support - (obourdon@mirantis.com) Bug Fixes -------- ------------- ---------------------------- ---------------------- -2.5.3 02.20.2017 Olivier Bourdon Added MOS 10.0 support - (obourdon@mirantis.com) -======= ============= ============================ ====================== - diff --git a/doc/plugin-guide/source/troubleshooting.rst b/doc/plugin-guide/source/troubleshooting.rst deleted file mode 100644 index 46b80cd..0000000 --- a/doc/plugin-guide/source/troubleshooting.rst +++ /dev/null @@ -1,113 +0,0 @@ -=============== -Troubleshooting -=============== - -Finding the active Zabbix server node -===================================== - -.. highlight:: none - -To find the node(s) where Zabbix server is active, run the following command on Fuel master node:: - - # fuel nodes | grep controller | awk -F\| '{print $1,$NF}' | sort -n -k 2 | \ - uniq -s 1 | while read cnode lenv; do echo "=========== Environment $lenv" ; \ - ssh -q node-$cnode 'for r in p_zabbix-server vip__public; do \ - crm resource status $r; \ - done' ; done - =========== Environment 1 - resource p_zabbix-server is running on: node-4.test.domain.local - resource vip__public is running on: node-3.test.domain.local - -Finding the public VIP -====================== - -On the returned node from the command above for a given environment, you might also want to know what is the Zabbix VIP address, so run the following command on Fuel master node:: - - # ssh -q node-3 ip netns exec haproxy ifconfig b_public | \ - grep 'inet addr:' | sed -e 's/[^:]\*://' -e 's/ .\*//' - 172.16.0.2 - -Finding the management VIP -========================== - -On the returned node from the command above for a given environment, you might also want to know what is the Zabbix VIP address, so run the following command on Fuel master node:: - - # ssh -q node-4 ip netns exec zabbix ifconfig b_zbx_vip_mgmt | \ - grep 'inet addr:' | sed -e 's/[^:]*://' -e 's/ .*//' - 192.168.0.3 - # ssh -q node-4 awk '/zbx_vip_mgmt/ {n=1} n==1 && /ipaddr/ {print;exit}' \ - /etc/astute.yaml | sed -e 's/.*: //' - 192.168.0.3 - -Connect to Zabbix Web GUI -========================= - -Use the URI using the public VIP:: - - http://172.16.0.2/zabbix - -If you cannot access to the Zabbix UI, check that the HTTP `Apache` server is -running on all controller nodes:: - - # /etc/init.d/apache2 status - * apache2 is running - -Zabbix server -============= - -If the Zabbix UI reports 'Zabbix server is not running', check the following: - -#. Check if the zabbix-server process runs and where is located, in the following - example the server runs on node-2:: - - # crm status - [snip] - p_zabbix-server (ocf::fuel:zabbix-server): Started node-2.test.domain.local - -#. Check logs in '/var/log/zabbix/zabbix_server.log' to see eventual error. - -#. If the zabbix-server is down, start it by using the `pacemaker` command:: - - # crm resource start p_zabbix-server - -#. If the zabbix-server is still down, try the following:: - - # crm resource stop p_zabbix-server - # crm resource cleanup p_zabbix-server - # crm resource start p_zabbix-server - -#. If after the previous commands the zabbix-server is still down and you didn't - find any explanation in the logs, try to increase the log level:: - - # sed -i 's/DebugLevel=3/DebugLevel=4/' /etc/zabbix/zabbix_server.conf - # crm resource restart p_zabbix-server - -Zabbix agents -============= - -If a Zabbix agent don't report data (this can be determined on the Zabbix UI -page: configuration > hosts). - -#. Check if the corresponding agent is running:: - - # /etc/init.d/zabbix-agent status - -#. Restart the zabbix-agent if not running:: - - # /etc/init.d/zabbix-agent restart - -#. If the zabbix-agent is still down or doesn't report any data try the following - command to validate the agent's configuration. This command should display all - data that agent is configured to collect, if not the command should display - an explicit error with regard to the configuration:: - - # zabbix_agentd -p - -Zabbix log files -================ - -On any of the cluster node, you might want to look into the Zabbix -agents and server log files under:: - - /var/log/zabbix - diff --git a/doc/qa/Makefile b/doc/qa/Makefile deleted file mode 100644 index 7a69b5f..0000000 --- a/doc/qa/Makefile +++ /dev/null @@ -1,192 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = build - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - -clean: - rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/TheZabbixpluginforFuel.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/TheZabbixpluginforFuel.qhc" - -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/TheZabbixpluginforFuel" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/TheZabbixpluginforFuel" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." - -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/doc/qa/images/zabbix_snmp_traps.png b/doc/qa/images/zabbix_snmp_traps.png deleted file mode 100644 index 4e9c333..0000000 Binary files a/doc/qa/images/zabbix_snmp_traps.png and /dev/null differ diff --git a/doc/qa/source/_static/.gitkeep b/doc/qa/source/_static/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/doc/qa/source/conf.py b/doc/qa/source/conf.py deleted file mode 100644 index 5189189..0000000 --- a/doc/qa/source/conf.py +++ /dev/null @@ -1,288 +0,0 @@ -# -*- coding: utf-8 -*- -# -# The Zabbix plugin for Fuel test plan documentation build configuration file, created by -# sphinx-quickstart on Tue Nov 3 10:53:03 2015. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys -import os - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ ] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'The Zabbix plugin for Fuel Test Plan' -copyright = u'2016, Mirantis Inc.' -author = u'Mirantis Inc.' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = '2.5' -# The full version, including alpha/beta/rc tags. -release = '2.5-2.5.3-1' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -#exclude_patterns = [] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -#todo_include_todos = True - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'default' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -#html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' -#html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# Now only 'ja' uses this config value -#html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -#html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = 'TheZabbixpluginforFuelTestPlanDoc' - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', - -# Latex figure (float) alignment -#'figure_align': 'htbp', - -'classoptions': ',openany,oneside', -'babel': '\\usepackage[english]{babel}' -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'TheZabbixpluginforFuelTestPlan-' + version + '.tex', u'The Zabbix plugin for Fuel Test Plan Documentation', - author, 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'thezabbixpluginforfueltestplan', u'The Zabbix plugin for Fuel Test Plan Documentation', - [author], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'TheZabbixpluginforFuelTestPlan', u'The Zabbix plugin for Fuel Test Plan Documentation', - author, 'TheZabbixpluginforFuelTestPlan') -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False - -# Insert footnotes where they are defined instead of at the end. -pdf_inline_footnotes = True diff --git a/doc/qa/source/index.rst b/doc/qa/source/index.rst deleted file mode 100644 index 1c0deb6..0000000 --- a/doc/qa/source/index.rst +++ /dev/null @@ -1,16 +0,0 @@ -====================================================== -Welcome to The Zabbix plugin for Fuel's documentation! -====================================================== - -Test plan -========= - -.. toctree:: - :maxdepth: 2 - - test-strategy - test-system - test-functional - test-non-functional - test-dependant-plugins - diff --git a/doc/qa/source/test-dependant-plugins.rst b/doc/qa/source/test-dependant-plugins.rst deleted file mode 100644 index 593dd11..0000000 --- a/doc/qa/source/test-dependant-plugins.rst +++ /dev/null @@ -1,89 +0,0 @@ -====================== -Dependant plugin tests -====================== - -Check Zabbix dependant plugins -============================== - -Test ID: test_dependant_plugins - -Expected Result: - - Cluster deployed, Hosts for EMC and Extreme network are present - and Traps are handled by Zabbix - -Steps: - -* Upload and install Zabbix plugins - - * `SNMP Trap Daemon for Zabbix `_ available in `Fuel Plugins Catalog `_ - * `Extreme Networks monitoring extension for Zabbix plugin `_ - * `EMC hardware monitoring extension for Zabbix plugin `_ - -* Configure EMC plugin with a fake Name/IP pair: - - * `MyEMCHost:10.109.0.100` (the IP must be in your network range) - -* Configure Extreme Networks plugin with a fake Name/IP pair: - - * `MyXNHost:10.109.0.101` (the IP must be in your network range) - -* Deploy and run test as desribed in :ref:`deploy_zabbix_ha` -* Verify that these 2 hosts are created in Zabbix (`Configuration > Hosts`) - - * MyEMCHost - * MyXNHost - -In order to test SNMP traps without hardware you need to generate them manually -with `snmptrap` command, you can install it by issuing this command on Ubuntu:: - - apt-get install snmp - - -1. Send EMC traps:: - - - # EMC Critical - snmptrap -v 1 -c public '.1.3.6.1.4.1.1981' '' 6 6 '10' .1.3.6.1.4.1.1981 s "null" .1.3.6.1.4.1.1981 s "null" .1.3.6.1.4.1.1981 s "a37" - - # EMC error - snmptrap -v 1 -c public '.1.3.6.1.4.1.1981' '' 6 5 '10' .1.3.6.1.4.1.1981 s "null" .1.3.6.1.4.1.1981 s "null" .1.3.6.1.4.1.1981 s "966" - - # EMC warning - snmptrap -v 1 -c public '.1.3.6.1.4.1.1981' '' 6 4 '10' .1.3.6.1.4.1.1981 s "null" .1.3.6.1.4.1.1981 s "null" .1.3.6.1.4.1.1981 s "7220" - - # EMC information - snmptrap -v 1 -c public '.1.3.6.1.4.1.1981' '' 6 3 '10' .1.3.6.1.4.1.1981 s "null" .1.3.6.1.4.1.1981 s "null" .1.3.6.1.4.1.1981 s "2004" - - # Where is 10.109.0.100 in our example - - -2. Send Extreme Networks traps:: - - # PS down - snmptrap -v 1 -c public '.1.3.6.1.4.1.1916' '' 6 10 '10' .1.3.6.1.4.1.1916 s "null" .1.3.6.1.4.1.1916 s "null" .1.3.6.1.4.1.1916 s "2" - - # PS UP - snmptrap -v 1 -c public '.1.3.6.1.4.1.1916' '' 6 11 '10' .1.3.6.1.4.1.1916 s "null" .1.3.6.1.4.1.1916 s "null" .1.3.6.1.4.1.1916 s "2" - - # Port down - snmptrap -v 1 -c public '.1.3.6.1.6.3.1.1' '' 2 10 '10' .1.3.6.1.6.3.1.1 s "eth1" - - # Port up - snmptrap -v 1 -c public '.1.3.6.1.6.3.1.1' '' 3 10 '10' .1.3.6.1.6.3.1.1 s "eth1" - - # Fan down - snmptrap -v 1 -c public '.1.3.6.1.4.1.1916' '' 6 7 '10' .1.3.6.1.4.1.1916 s "null" .1.3.6.1.4.1.1916 s "null" .1.3.6.1.4.1.1916 s "5" - - # Fan up - snmptrap -v 1 -c public '.1.3.6.1.4.1.1916' '' 6 8 '10' .1.3.6.1.4.1.1916 s "null" .1.3.6.1.4.1.1916 s "null" .1.3.6.1.4.1.1916 s "5" - - # Where is 10.109.0.101 in our example - -3. Verify these traps have been received by Zabbix. - - * On `Monitoring > Latest data` page filter by hosts `MyEMCHost` and `MyXNHost` - * verify that all items have `Last value` - - .. image:: ../images/zabbix_snmp_traps.png - :width: 100% diff --git a/doc/qa/source/test-functional.rst b/doc/qa/source/test-functional.rst deleted file mode 100644 index 6fe0ff8..0000000 --- a/doc/qa/source/test-functional.rst +++ /dev/null @@ -1,91 +0,0 @@ -================== -Functional testing -================== - -Check Zabbix deployment -======================= - -Test ID: -* test_zabbix_deployment -* test_zabbix_started - -Expected Result: Zabbix Started - -Steps: - -* Check that package zabbix-server installed on controllers -* Check that zabbix-server is started via `crm status` - -Check Zabbix API -================ - -Test IDs: - -* test_authentication_valid_cred -* test_authentication_invalid_cred -* test_https -* test_ssl_certificate - -Expected Result: All steps passed - -Steps: - -* Test authentication with valid credentials -* Test if authentication impossible with invalid credentials -* Check HTTPS request to dashboard -* Check SSL certificate (self signed) - -Check dashboard configuration -============================= - -Test ID: test_graph - -Expected Result: Dashboard is preconfigured - -Steps: - -* Log in to zabbix web -* Get zabbix/screens.php -* Check preconfigured graphs: - - * screen 'OpenStack Cluster' - * screen 'Ceph' if Ceph is deployed - -Check zabbix triggers -===================== - -Test ID: test_triggers - -Expected Result: All preconfigured triggers are present and `green` - -Steps: - -* Log in to zabbix UI -* Check on dashboard there is no alert: everything must be `green` - -Check API triggers -================== - -Test ID: test_trigger_api - -Expected Result: The API is detected as down - -Steps: - -* Log into on controller node -* Stop an API (for example neutron):: - - # stop neutron-server - -* On dashboard verify these alerts are present: - - * High severity - - * Neutron Server process is not running on nodeX - * Neutron Server service is down on nodeX - * Neutron API test failed on nodeX - - * Average severity - - * Neutron service status offline test failed - * nodeX backend of neutron proxy down diff --git a/doc/qa/source/test-non-functional.rst b/doc/qa/source/test-non-functional.rst deleted file mode 100644 index a493c8a..0000000 --- a/doc/qa/source/test-non-functional.rst +++ /dev/null @@ -1,42 +0,0 @@ -====================== -Non-functional testing -====================== - - -Zabbix service network failover (destructive) -============================================= - -Test ID: test_network_failover - -Expected Result: No failover - -Steps: - -* Find node with active zabbix-server via `crm status` -* Send script file to zabbix node with: - :: - - #!/bin/sh - /sbin/iptables -I INPUT -j DROP - sleep 20 - /sbin/iptables -D INPUT -j DROP - -* Run script file on zabbix node -* Check that zabbix is active on other node via `crm status` -* Check response from zabbix via HTTP request - - -Zabbix service host failover (destructive) -========================================== - -Test ID: test_host_failover - -Expected Result: failover - -Steps: - -* Find node with active zabbix-server via `crm status` -* Shutdown the node -* Check that zabbix is active on other node via `crm status` -* Check response from zabbix via HTTP request - diff --git a/doc/qa/source/test-strategy.rst b/doc/qa/source/test-strategy.rst deleted file mode 100644 index 87fcb98..0000000 --- a/doc/qa/source/test-strategy.rst +++ /dev/null @@ -1,34 +0,0 @@ -============= -Test strategy -============= - -Acceptance criteria -=================== - -* Plugin enable Zabbix configuration and installation in Fuel -* Zabbix deployed on controllers. -* Zabbix web UI is operational. -* Zabbix works in HA mode. -* Zabbix configured with additional templates set. -* All blocker, critical and major issues are fixed. -* Documentation was delivered. -* Test results were delivered. - - -Test environment, infrastructure and tools -========================================== - -* Fuel Master node with installed Zabbix plugin - -Product compatibility matrix -============================ - -+--------------------+----------------------------------+ -| Product | Version/Comment | -+====================+==================================+ -| Mirantis OpenStack | 7.0, 8.0, 9.0, 9.1, 9.2 and 10.0 | -+--------------------+----------------------------------+ -| Zabbix monitoring | 2.5.3 | -+--------------------+----------------------------------+ - - diff --git a/doc/qa/source/test-system.rst b/doc/qa/source/test-system.rst deleted file mode 100644 index 5f13c2d..0000000 --- a/doc/qa/source/test-system.rst +++ /dev/null @@ -1,121 +0,0 @@ -============== -System testing -============== - -.. _deploy_zabbix_ha: - -Deploy environment with plugin -============================== - -* Test Case ID: deploy_zabbix_ha -* Expected Result: Cluster deployed, Zabbix dashboard available, Zabbix dashboard is not empty - -Steps: - -* Upload plugin to the master node -* Install plugin -* Create cluster -* Add 3 nodes with controller role -* Add 1 node with compute role -* Add 1 node with cinder role -* Deploy the cluster -* Run network verification -* Check plugin health -* Run OSTF -* Check login to zabbix dashboard -* Check that zabbix dashboard is not empty - -Uninstall of plugin -=================== - -Test Case ID: uninstall_zabbix_plugin -Expected Result: Zabbix plugin was installed and then removed successfully - -Steps: - -* install plugin : fuel plugins --install plugin.rpm -* check that it was successfully installed: fuel plugins -* remove plugin: fuel plugins --remove plugin_name==version -* check that it was successfully removed: fuel plugins - -Uninstall of plugin with deployed environment -============================================= - -* Test Case ID: uninstall_zabbix_plugin_with_deployed_env -* Expected Result: Zabbix plugin was installed successfully. Alert is present when we trying to delete plugin which is attached to enabled environment. When environment was removed, plugin is removed successfully too. - - -Steps: - * install plugin - * deploy environment with enabled plugin functionality - * run ostf - * try to delete plugin and ensure that present in cli alert: "400 Client Error: Bad Request (Can't delete plugin which is enabled for some environment.)" - * remove environment - * remove plugin - * check that it was successfully removed - -Deploy environment with plugin and Ceph -======================================= - -* Test Case ID: deploy_zabbix_ceph_ha -* Expected Result: Cluster deployed, Zabbix dashboard available, Zabbix dashboard is not empty - -Steps: - -* Upload plugin to the master node -* Install plugin -* Create cluster -* Add 3 nodes with controller,ceph-osd roles -* Add 2 nodes with compute,ceph-osd roles -* Deploy the cluster -* Run network verification -* Check plugin health -* Run OSTF -* Check login to zabbix dashboard -* Check that zabbix dashboard is not empty -* Check that zabbix screen for Ceph is present (Monitoring > Screens > Ceph) - -Deploy environment with plugin and fuel-createmirror -==================================================== - -* Test Case ID: deploy_zabbix_ha_offline -* Expected Result: Cluster deployed, Zabbix dashboard available, Zabbix dashboard is not empty - -Steps: - -* Upload plugin to the master node -* Install plugin -* run `fuel-createmirror` command on fuel master node -* Create cluster -* Add 3 nodes with controller role -* Add 1 node with compute role -* Add 1 node with cinder role -* Deploy the cluster -* Run network verification -* Check plugin health -* Run OSTF -* Check login to zabbix dashboard -* Check that zabbix dashboard is not empty - -Deploy environment with not supported roles -=========================================== - -* Test Case ID: deploy_zabbix_non_supported_roles -* Expected Result: Cluster deployed, Zabbix dashboard available, Zabbix dashboard is not empty, Zabbix hosts are not configured for nodes with role 'virt' or 'base-os' - -Steps: - -* Upload plugin to the master node -* Install plugin -* Create cluster -* Add 1 nodes with controller role -* Add 1 node with compute role -* Add 1 node with base-os role -* Add 1 node with virt role (see `reduced footprint feature `_) -* Deploy the cluster -* Run network verification -* Check plugin health -* Run OSTF -* Check login to zabbix dashboard -* Check that zabbix dashboard is not empty - diff --git a/doc/specs/Makefile b/doc/specs/Makefile deleted file mode 100644 index 7a69b5f..0000000 --- a/doc/specs/Makefile +++ /dev/null @@ -1,192 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = build - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - -clean: - rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/TheZabbixpluginforFuel.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/TheZabbixpluginforFuel.qhc" - -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/TheZabbixpluginforFuel" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/TheZabbixpluginforFuel" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." - -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/doc/specs/source/_static/.gitkeep b/doc/specs/source/_static/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/doc/specs/source/conf.py b/doc/specs/source/conf.py deleted file mode 100644 index da270de..0000000 --- a/doc/specs/source/conf.py +++ /dev/null @@ -1,288 +0,0 @@ -# -*- coding: utf-8 -*- -# -# The Zabbix plugin for Fuel specification documentation build configuration file, created by -# sphinx-quickstart on Tue Nov 3 10:53:03 2015. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys -import os - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ ] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'The Zabbix plugin for Fuel Specification' -copyright = u'2016, Mirantis Inc.' -author = u'Mirantis Inc.' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = '2.5' -# The full version, including alpha/beta/rc tags. -release = '2.5-2.5.3-1' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -#exclude_patterns = [] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -#todo_include_todos = True - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'default' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -#html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' -#html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# Now only 'ja' uses this config value -#html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -#html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = 'TheZabbixpluginforFuelSpecDoc' - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', - -# Latex figure (float) alignment -#'figure_align': 'htbp', - -'classoptions': ',openany,oneside', -'babel': '\\usepackage[english]{babel}' -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'TheZabbixpluginforFuelSpec-' + version + '.tex', u'The Zabbix plugin for Fuel Specification Documentation', - author, 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'thezabbixpluginforfuelspec', u'The Zabbix plugin for Fuel Specification Documentation', - [author], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'TheZabbixpluginforFuelSpec', u'The Zabbix plugin for Fuel Specification Documentation', - author, 'TheZabbixpluginforFuelSpec') -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False - -# Insert footnotes where they are defined instead of at the end. -pdf_inline_footnotes = True diff --git a/doc/specs/source/index.rst b/doc/specs/source/index.rst deleted file mode 100644 index 3205729..0000000 --- a/doc/specs/source/index.rst +++ /dev/null @@ -1,144 +0,0 @@ -.. - This work is licensed under the Apache License, Version 2.0. - - http://www.apache.org/licenses/LICENSE-2.0 - -================== -Zabbix Fuel plugin -================== - -Zabbix plugin for Fuel extends Mirantis OpenStack functionality -by installing Zabbix monitoring system. -Zabbix is configured to monitor every node and OpenStack services and APIs. - -Problem description -=================== - -Currently, Fuel has no support for monitoring nodes and OpenStack services. -Zabbix plugin aims to provide support for it. - -Proposed change -=============== - -Implement a Fuel plugin that will install and configure the Zabbix monitoring -system in HA configuration. Zabbix server will be installed on Controllers and -Zabbix agent will be installed on every node. - -Alternatives ------------- - -It might have been implemented as part of Fuel core but we decided to make it -as a plugin for several reasons: - -* This isn't something that all operators may want to deploy. -* Any new additional functionality makes the project's testing more difficult, - which is an additional risk for the Fuel release. - -Data model impact ------------------ - -None - -REST API impact ---------------- - -None - -Upgrade impact --------------- - -None - -Security impact ---------------- - -None - -Notifications impact --------------------- - -None - -Other end user impact ---------------------- - -None - -Performance Impact ------------------- - -Zabbix plugin has no direct performance impact on OpenStack, but it consumes -additional resources (CPU, memory, database) and this should be considered and -tested on a test environment before production use. - -Other deployer impact ---------------------- - -None - -Developer impact ----------------- - -None - -Implementation -============== - -Plugin delivers official Zabbix packages with server, frontend and agent -components. Plugin has several tasks: - -* The first task installs Zabbix server and frontend on Primary Controller node. -* The second task installs Zabbix server and frontend on Controller nodes. -* The third task configures Zabbix server by installing monitoring templates. -* The fourth task installs Zabbix agent on every node, adds the node to Zabbix - and links proper templates to the node using Zabbix server API. - -Zabbix server is installed on all Controller nodes and is managed by -Pacemaker. It runs in active/passive mode where only one instance is active. -Plugin installs a dedicated resource manager file (OCF) for this. -Plugin configures Haproxy to provide one point of contact to the Zabbix server -API for Zabbix agents and Zabbix frontend. - -Assignee(s) ------------ - -| Dmitry Klenov (PM) -| Piotr Misiak (developer) -| Szymon Bańka (developer) -| Alexander Zatserklyany (QA engineer) -| Swann Croiset (developer) -| Olivier Bourdon (developer) - -Work Items ----------- - -* Implement the Fuel plugin. -* Implement the Puppet manifests. -* Testing. -* Write the documentation. - -Dependencies -============ - -* Fuel 7.0, 8.0, 9.0, 9.1, 9.2 and 10.0 - -Testing -======= - -* Prepare a test plan. -* Test the plugin by deploying environments with all Fuel deployment modes. - -Documentation Impact -==================== - -* Deployment Guide (how to install the plugin, how to configure and deploy an - OpenStack environment with the plugin). -* User Guide (which features the plugin provides, how to use them in the - deployed OpenStack environment). -* Test Plan. -* Test Report. - -References -========== - -* `Official Zabbix site `_ diff --git a/environment_config.yaml b/environment_config.yaml deleted file mode 100644 index fd1df64..0000000 --- a/environment_config.yaml +++ /dev/null @@ -1,31 +0,0 @@ -attributes: - metadata: - restrictions: - - condition: "cluster:net_provider != 'neutron'" - action: "hide" - message: This plugin only supports neutron networking - strict: false - username: - value: "admin" - label: "username" - description: "Username for Zabbix Administrator" - weight: 10 - type: "text" - password: - value: "zabbix" - label: "password" - description: "Password for Zabbix Administrator" - weight: 20 - type: "password" - db_password: - value: "fae2oom_aeR6" - label: "database password" - description: "Password for Zabbix Database" - weight: 30 - type: "password" - monitoring_password: - value: "Og1aaQivaiv1" - label: "monitoring password" - description: "Password for Monitoring user" - weight: 30 - type: "password" diff --git a/functions.sh b/functions.sh deleted file mode 100644 index 88fe388..0000000 --- a/functions.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eux - -ROOT="$(dirname "$(readlink -f "$0")")" -MODULES_DIR="${ROOT}"/deployment_scripts/puppet/modules - -# Download RPM or DEB packages and store them in the local repository directory -function download_package { - REPO="$1" - shift - while [ $# -gt 0 ]; do - FILE=$(basename "$1") - wget -qO "$REPO"/"$FILE" "$1" - shift - done -} - -# Download official Puppet module and store it in the local directory -function download_puppet_module { - rm -rf "${MODULES_DIR:?}"/"$1" - mkdir -p "${MODULES_DIR}"/"$1" - wget -qO- "$2" | tar -C "${MODULES_DIR}/$1" --strip-components=1 -xz -} diff --git a/metadata.yaml b/metadata.yaml deleted file mode 100644 index d606ac8..0000000 --- a/metadata.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Plugin name -name: zabbix_monitoring -title: Zabbix for Fuel -# Plugin version -version: 2.5.5 -# Description -description: Enables Zabbix Monitoring. For information how to access Zabbix UI refer to Zabbix plugin User Guide. Zabbix URL schema is http:///zabbix -# Required fuel version -fuel_version: ['7.0', '8.0', '9.0', '10.0'] -# Groups -groups: ['monitoring'] -# Licenses -licenses: ['Apache License, Version 2.0'] -# Homepage -homepage: 'https://github.com/stackforge/fuel-plugin-external-zabbix' -# Authors -authors: ['Dmitry Klenov ', 'Piotr Misiak ', 'Szymon Banka ', 'Bartosz Kupidura ', 'Alexander Zatserklyany ', 'Swann Croiset ', 'Olivier Bourdon '] - -# The plugin is compatible with releases in the list -releases: - - os: ubuntu - version: 2015.1.0-7.0 - mode: ['ha'] - deployment_scripts_path: deployment_scripts/ - repository_path: repositories/ubuntu/trusty - - os: ubuntu - version: liberty-8.0 - mode: ['ha'] - deployment_scripts_path: deployment_scripts/ - repository_path: repositories/ubuntu/trusty - - os: ubuntu - version: liberty-9.0 - mode: ['ha'] - deployment_scripts_path: deployment_scripts/ - repository_path: repositories/ubuntu/trusty - - os: ubuntu - version: mitaka-9.0 - mode: ['ha'] - deployment_scripts_path: deployment_scripts/ - repository_path: repositories/ubuntu/trusty - - os: ubuntu - version: newton-10.0 - mode: ['ha'] - deployment_scripts_path: deployment_scripts/ - repository_path: repositories/ubuntu/xenial - -# Version of plugin package -package_version: '3.0.0' diff --git a/network_roles.yaml b/network_roles.yaml deleted file mode 100644 index ff1fca5..0000000 --- a/network_roles.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- id: "zabbix" - default_mapping: "management" - properties: - subnet: true - gateway: false - vip: - - name: "zbx_vip_mgmt" - namespace: "zabbix" diff --git a/pre_build_hook b/pre_build_hook deleted file mode 100755 index ba3f1ae..0000000 --- a/pre_build_hook +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -# Copyright 2017 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eux - -ROOT="$(dirname "$(readlink -f "$0")")" - -. "${ROOT}"/functions.sh - -# Puppet manifests -# Dependency for PHP-FPM -PHPFPM_TARBALL_URL="https://forgeapi.puppetlabs.com/v3/files/Slashbunny-phpfpm-0.0.13.tar.gz" - -RPM_REPO="${ROOT}"/repositories/centos/ -DEB_TRUSTY_REPO="${ROOT}"/repositories/ubuntu/trusty -DEB_XENIAL_REPO="${ROOT}"/repositories/ubuntu/xenial -mkdir -p $RPM_REPO $DEB_TRUSTY_REPO $DEB_XENIAL_REPO - -PHP5_TRUSTY_VERSION="5.5.9+dfsg-1ubuntu4.22" -PHP5_XENIAL_VERSION="5.6.4+dfsg-4ubuntu6.4" - -ZABBIX_VERSION=${ZABBIX_VERSION:-2.2} -case $ZABBIX_VERSION in - 2.2) - ZBX_MAJOR_VERSION="2.2" - ZBX_TRUSTY_VERSION=${ZBX_MAJOR_VERSION}".19-1+trusty" - ZBX_XENIAL_VERSION=${ZBX_MAJOR_VERSION}".19-1+trusty" - ;; - 2.4) - ZBX_MAJOR_VERSION="2.4" - ZBX_TRUSTY_VERSION=${ZBX_MAJOR_VERSION}".8-1+trusty" - ZBX_XENIAL_VERSION=${ZBX_MAJOR_VERSION}".8-1+trusty" - ;; - *) - echo "Unsupported version $ZABBIX_VERSION" - exit 1 -esac - -ZABBIX_TRUSTY_PACKAGES="http://repo.zabbix.com/zabbix/$ZBX_MAJOR_VERSION/ubuntu/pool/main/z/zabbix/zabbix-agent_${ZBX_TRUSTY_VERSION}_amd64.deb \ - http://repo.zabbix.com/zabbix/$ZBX_MAJOR_VERSION/ubuntu/pool/main/z/zabbix/zabbix-frontend-php_${ZBX_TRUSTY_VERSION}_all.deb \ - http://repo.zabbix.com/zabbix/$ZBX_MAJOR_VERSION/ubuntu/pool/main/z/zabbix/zabbix-server-mysql_${ZBX_TRUSTY_VERSION}_amd64.deb \ - http://repo.zabbix.com/zabbix/$ZBX_MAJOR_VERSION/ubuntu/pool/main/z/zabbix/zabbix-sender_${ZBX_TRUSTY_VERSION}_amd64.deb \ - http://repo.zabbix.com/zabbix/$ZBX_MAJOR_VERSION/ubuntu/pool/main/z/zabbix/zabbix-get_${ZBX_TRUSTY_VERSION}_amd64.deb" - -ZABBIX_XENIAL_PACKAGES="http://repo.zabbix.com/zabbix/$ZBX_MAJOR_VERSION/ubuntu/pool/main/z/zabbix/zabbix-agent_${ZBX_XENIAL_VERSION}_amd64.deb \ - http://repo.zabbix.com/zabbix/$ZBX_MAJOR_VERSION/ubuntu/pool/main/z/zabbix/zabbix-frontend-php_${ZBX_XENIAL_VERSION}_all.deb \ - http://repo.zabbix.com/zabbix/$ZBX_MAJOR_VERSION/ubuntu/pool/main/z/zabbix/zabbix-server-mysql_${ZBX_XENIAL_VERSION}_amd64.deb \ - http://repo.zabbix.com/zabbix/$ZBX_MAJOR_VERSION/ubuntu/pool/main/z/zabbix/zabbix-sender_${ZBX_XENIAL_VERSION}_amd64.deb \ - http://repo.zabbix.com/zabbix/$ZBX_MAJOR_VERSION/ubuntu/pool/main/z/zabbix/zabbix-get_${ZBX_XENIAL_VERSION}_amd64.deb" - -COMMON_PACKAGES="http://archive.ubuntu.com/ubuntu/pool/main/libc/libconfig-inifiles-perl/libconfig-inifiles-perl_2.82-1_all.deb \ - http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsmi/smistrip_0.4.8+dfsg2-8ubuntu2_all.deb \ - http://archive.ubuntu.com/ubuntu/pool/multiverse/s/snmp-mibs-downloader/snmp-mibs-downloader_1.1_all.deb \ - http://archive.ubuntu.com/ubuntu/pool/universe/i/iptstate/iptstate_2.2.5-1_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/universe/libi/libiksemel/libiksemel3_1.2-4.2_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/f/fonts-dejavu/fonts-dejavu_2.34-1ubuntu1_all.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/f/fonts-dejavu/ttf-dejavu-core_2.34-1ubuntu1_all.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/f/fonts-dejavu/fonts-dejavu-extra_2.34-1ubuntu1_all.deb" - -PHP5_TRUSTY_PACKAGES="http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_${PHP5_TRUSTY_VERSION}_all.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-mysql_${PHP5_TRUSTY_VERSION}_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-common_${PHP5_TRUSTY_VERSION}_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-gd_${PHP5_TRUSTY_VERSION}_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/universe/p/php5/php5-fpm_${PHP5_TRUSTY_VERSION}_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/p/php-json/php5-json_1.3.2-2build1_amd64.deb" - -download_package "$DEB_TRUSTY_REPO" $ZABBIX_TRUSTY_PACKAGES \ - $PHP5_TRUSTY_PACKAGES \ - $COMMON_PACKAGES - -PHP5_XENIAL_PACKAGES="http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_${PHP5_XENIAL_VERSION}_all.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-mysql_${PHP5_XENIAL_VERSION}_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-common_${PHP5_XENIAL_VERSION}_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-gd_${PHP5_XENIAL_VERSION}_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-cli_${PHP5_XENIAL_VERSION}_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/universe/p/php5/php5-fpm_${PHP5_XENIAL_VERSION}_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/p/php-json/php5-json_1.3.6-1build1_amd64.deb" - -download_package "$DEB_XENIAL_REPO" $ZABBIX_XENIAL_PACKAGES \ - $PHP5_XENIAL_PACKAGES \ - $COMMON_PACKAGES \ - http://archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/libmysqlclient18_5.5.57-0ubuntu0.14.04.1_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/libg/libgcrypt11/libgcrypt11_1.5.3-2ubuntu4.5_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/g/gnutls26/libgnutls26_2.12.23-12ubuntu2.8_amd64.deb \ - http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/libsystemd-daemon0_204-5ubuntu20.24_amd64.deb - -# Install puppet manifests -download_puppet_module "phpfpm" "$PHPFPM_TARBALL_URL" diff --git a/repositories/centos/.gitkeep b/repositories/centos/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/repositories/ubuntu/.gitkeep b/repositories/ubuntu/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/repositories/ubuntu/trusty/.gitkeep b/repositories/ubuntu/trusty/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/repositories/ubuntu/xenial/.gitkeep b/repositories/ubuntu/xenial/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/tasks.yaml b/tasks.yaml deleted file mode 100644 index fe51488..0000000 --- a/tasks.yaml +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index ce17585..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -Sphinx -fuel-plugin-builder>=2.0.4 diff --git a/tox.ini b/tox.ini deleted file mode 100644 index b3e4b01..0000000 --- a/tox.ini +++ /dev/null @@ -1,53 +0,0 @@ -[tox] -envlist = manifests,plugin_zabbix,build_plugin,docs,qa_docs -skipsdist = True - -[testenv] -deps = -r{toxinidir}/test-requirements.txt -passenv = HOME - -[testenv:manifests] -changedir = {toxinidir}/deployment_scripts/puppet/manifests -whitelist_externals = - bundle - mkdir -commands = - mkdir -p {toxinidir}/.bundled_gems - bundle install --path {toxinidir}/.bundled_gems - bundle exec rake test - -[testenv:plugin_zabbix] -changedir = {toxinidir}/deployment_scripts/puppet/modules/{envname} -whitelist_externals = - bundle - mkdir -commands = - mkdir -p {toxinidir}/.bundled_gems - bundle install --path {toxinidir}/.bundled_gems - bundle exec rake test - -[testenv:build_plugin] -changedir = {toxinidir} -passenv = ZABBIX_VERSION -whitelist_externals= - fpb - rm - bash -commands = - rm -rf .build - bash -c 'rm -rf doc/*/build' - bash -c 'rm -rf repositories/ubuntu/*.deb repositories/ubuntu/trusty/*.deb repositories/ubuntu/xenial/*.deb repositories/centos/*.rpm' - fpb --check {toxinidir} --debug - fpb --build {toxinidir} --debug - -[testenv:docs] -changedir = {toxinidir}/doc/plugin-guide -whitelist_externals = make -commands = - make clean html SPHINXOPTS=-W - -[testenv:qa_docs] -changedir = {toxinidir}/doc/qa -whitelist_externals = make -commands = - make clean html SPHINXOPTS=-W