diff --git a/Dockerfiles/Dockerfile-awx_task b/Dockerfiles/Dockerfile-awx_task index 789391d..90c71c8 100644 --- a/Dockerfiles/Dockerfile-awx_task +++ b/Dockerfiles/Dockerfile-awx_task @@ -7,7 +7,7 @@ FROM $REGISTRY/$BASE_IMAGE_AWX_TASK:$TAG_AWX USER root -ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.9 +ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.10 COPY ansible.credentials.py /etc/tower/conf.d/credentials.py COPY ansible.env /etc/tower/conf.d/environment.sh diff --git a/Dockerfiles/Dockerfile-awx_web b/Dockerfiles/Dockerfile-awx_web index 28daea0..136e051 100644 --- a/Dockerfiles/Dockerfile-awx_web +++ b/Dockerfiles/Dockerfile-awx_web @@ -7,7 +7,7 @@ FROM $REGISTRY/$BASE_IMAGE_AWX_WEB:$TAG_AWX USER root -ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.9 +ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.10 # security COPY ansible.credentials.py /etc/tower/conf.d/credentials.py diff --git a/Dockerfiles/Dockerfile-zabbix b/Dockerfiles/Dockerfile-zabbix index 5ae9b9f..cc7045d 100644 --- a/Dockerfiles/Dockerfile-zabbix +++ b/Dockerfiles/Dockerfile-zabbix @@ -7,7 +7,7 @@ FROM $REGISTRY/$BASE_IMAGE_ZABBIX:$TAG_ZABBIX USER root -ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.9 +ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.10 ENV PYTHONWARNINGS="ignore:Unverified HTTPS request" diff --git a/Dockerfiles/Dockerfile-zabbix-agent b/Dockerfiles/Dockerfile-zabbix-agent index 7e0ca00..7de0c55 100644 --- a/Dockerfiles/Dockerfile-zabbix-agent +++ b/Dockerfiles/Dockerfile-zabbix-agent @@ -7,7 +7,7 @@ FROM $REGISTRY/$BASE_IMAGE_ZABBIX_AGENT:$TAG_ZABBIX USER root -ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.9 +ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.10 ENV PYTHONWARNINGS="ignore:Unverified HTTPS request" diff --git a/Dockerfiles/Dockerfile-zabbix-web b/Dockerfiles/Dockerfile-zabbix-web index dd2bd95..1830187 100644 --- a/Dockerfiles/Dockerfile-zabbix-web +++ b/Dockerfiles/Dockerfile-zabbix-web @@ -5,7 +5,7 @@ ARG MISM_BULLSEQUANA_EDGE_VERSION FROM $REGISTRY/$BASE_IMAGE_ZABBIX_WEB:$TAG_ZABBIX -ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.9 +ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.10 COPY items.inc.php /usr/share/zabbix/include/ COPY logo-header.svg /usr/share/zabbix/assets/img/ diff --git a/Dockerfiles/loginModal.partial.html b/Dockerfiles/loginModal.partial.html index 0e57fa6..f6bf7e1 100644 --- a/Dockerfiles/loginModal.partial.html +++ b/Dockerfiles/loginModal.partial.html @@ -110,7 +110,7 @@ diff --git a/add_awx_playbooks.sh b/add_awx_playbooks.sh index eff23e6..8107c29 100755 --- a/add_awx_playbooks.sh +++ b/add_awx_playbooks.sh @@ -1,6 +1,7 @@ #!/bin/sh -export MISM_BULLSEQUANA_EDGE_PLAYBOOKS_VERSION=2.1.9 +export MISM_BULLSEQUANA_EDGE_PLAYBOOKS_VERSION=2.1.10 + ################################################################################################################### # passwords.yml @@ -20,4 +21,4 @@ fi echo "adding playbooks ..." docker exec -e MISM_BULLSEQUANA_EDGE_PLAYBOOKS_VERSION=$MISM_BULLSEQUANA_EDGE_PLAYBOOKS_VERSION -it awx_web projects/add_playbooks.py -echo -e "\033[32mif you get an error: check https://localhost/api/v2/ and re-run this script\033[0m" + diff --git a/ansible/playbooks/add_playbooks.py b/ansible/playbooks/add_playbooks.py index 300884f..561d85c 100755 --- a/ansible/playbooks/add_playbooks.py +++ b/ansible/playbooks/add_playbooks.py @@ -1,13 +1,41 @@ #!/usr/bin/env python3 -# # -*- coding: utf-8 -*- -# -# Atos BullSequana Edge Ansible Modules -# Version 2.0 -# Copyright (C) 2019 Atos or its subsidiaries. All Rights Reserved. +# -*- coding: utf-8 -*- -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# -# Inspired from https://github.com/jsmartin/tower_populator +""" +This script add ansible playbooks to awx +This script is called fomr add_awx_playbooks.sh file +Inspired from https://github.com/jsmartin/tower_populator + +Copyright (C) 2022 Atos + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with +this program. If not, see . + +All users shall be bound by the terms and +conditions of the GNU General Public License v3.0 +which are stated extensively at the following address : +https://www.gnu.org/licenses/gpl-3.0.en.html + +""" + +__author__ = "Francine Sauvage" +__contact__ = "support@atos.net" +__date__ = "2022/01/12" +__deprecated__ = False +__email__ = "francine.sauvage@atos.net" +__license__ = "GPLv3" +__status__ = "Production" +__version__ = "2.1.10" +__copyright__ = "Copyright 2022, Atos" +__maintainer__ = "Francine Sauvage" +__credits__ = ["Francine Sauvage"] import yaml import sys @@ -84,26 +112,50 @@ def __init__(self, **entries): existing_variables = {} for match in matches: existing_variables[match.group("cle")] = match.group("valeur") + #print(i['variables'].items()) + for cle, valeur in i['variables'].items(): + #print("{} {}".format(cle, valeur) ) + if cle == 'ntp_server_sync': + existing_variables[cle] = 'NTP' + print("Key found => {} = {}".format(cle, 'NTP')) + continue if not cle in existing_variables: print("Key not found => Creating key={} with value={} in your ANSIBLE VARIABLES".format(cle, valeur)) - if type(valeur)=="str" and valeur.isdigit(): + if isinstance(valeur, "str") and valeur.isdigit(): print(type(valeur)) valeur = int(valeur) existing_variables[cle]=valeur else: # do NOT change existing variables valeur_existing = existing_variables[cle] - if type(valeur_existing)=="str" and valeur_existing.isdigit(): + if valeur_existing.isdigit(): valeur_existing = int(valeur_existing) - print("Key found => {} = {}".format(cle, valeur_existing)) + print("Key found as integer => {} = {}".format(cle, valeur_existing)) + elif isinstance(valeur_existing, bool) and valeur_existing : + print("Key found as True => {} = {}".format(cle, valeur_existing)) + valeur_existing = True + elif isinstance(valeur_existing, bool) and not valeur_existing: + print("Key found as False => {} = {}".format(cle, valeur_existing)) + valeur_existing = False + elif valeur_existing.lower() == 'true': + valeur_existing = True + print("Key found as bool=true => {} = {}".format(cle, valeur_existing)) + elif valeur_existing.lower() == 'false': + valeur_existing = False + print("Key found as bool=false => {} = {}".format(cle, valeur_existing)) + else : + print("Key found as string => {} = {}".format(cle, valeur_existing)) existing_variables[cle] = valeur_existing - result = yaml.dump(existing_variables) + # result = yaml.dump(existing_variables) + result = yaml.safe_dump(existing_variables, default_flow_style=False) + # print(result) inv_res.modify(name=i['name'], variables=result) print("Updated Inventory: {name} variables\n".format(name=i['name'])) except: print("Exception !! Recreating Inventory: {name}\n".format(name=i['name'])) - i['variables'] = yaml.dump(i['variables']) + i['variables'] = yaml.safe_dump(i['variables'], default_flow_style=False) + print(i['variables']) inv = inv_res.create(**i) bool_force_create=True # create dynamic groups, static ones can be imported better with awx-manage @@ -127,6 +179,7 @@ def __init__(self, **entries): host = host_res.create(**h) host_res.associate(host=host['id'], group=group['id']) + if tower.projects: for p in tower.projects: p['description'] = "Playbooks {version} for BullSequana Edge".format(version=os.environ.get('MISM_BULLSEQUANA_EDGE_PLAYBOOKS_VERSION')) diff --git a/ansible/playbooks/openbmc/inventory/set_ntp_server_ip_and_sync.yml b/ansible/playbooks/openbmc/inventory/set_ntp_server_ip_and_sync.yml index 8f4858e..5e17c81 100644 --- a/ansible/playbooks/openbmc/inventory/set_ntp_server_ip_and_sync.yml +++ b/ansible/playbooks/openbmc/inventory/set_ntp_server_ip_and_sync.yml @@ -60,5 +60,5 @@ X-Auth-Token: "{{ x_token }}" body_format: json body: - data: "{{ ntp_server_sync }}" + data: "xyz.openbmc_project.Time.Synchronization.Method.{{ntp_server_sync}}" register: result_ntp_server_sync diff --git a/ansible/playbooks/openbmc/power/disable_ssh.yml b/ansible/playbooks/openbmc/power/disable_ssh.yml new file mode 100644 index 0000000..9b60578 --- /dev/null +++ b/ansible/playbooks/openbmc/power/disable_ssh.yml @@ -0,0 +1,25 @@ +--- +- hosts: all + connection: local + name: Disable Ssh + gather_facts: False + vars_files: + - "{{ ANSIBLE_EXTERNAL_VARS }}" + - "{{ ANSIBLE_PASSWORDS }}" + + tasks: + + - include_tasks: ../utils/utils_create_token.yml + + - name: diable SSH + uri: + url: https://{{ baseuri }}/xyz/openbmc_project/control/service/ssh/attr/Enabled + method: PUT + validate_certs: no + headers: + X-Auth-Token: "{{ x_token }}" + body_format: json + body: + data: false + register: result_disable_ssh + diff --git a/ansible/playbooks/openbmc/power/enable_ssh.yml b/ansible/playbooks/openbmc/power/enable_ssh.yml new file mode 100644 index 0000000..8f487e2 --- /dev/null +++ b/ansible/playbooks/openbmc/power/enable_ssh.yml @@ -0,0 +1,25 @@ +--- +- hosts: all + connection: local + name: Enable Ssh + gather_facts: False + vars_files: + - "{{ ANSIBLE_EXTERNAL_VARS }}" + - "{{ ANSIBLE_PASSWORDS }}" + + tasks: + + - include_tasks: ../utils/utils_create_token.yml + + - name: enable SSH + uri: + url: https://{{ baseuri }}/xyz/openbmc_project/control/service/ssh/attr/Enabled + method: PUT + validate_certs: no + headers: + X-Auth-Token: "{{ x_token }}" + body_format: json + body: + data: true + register: result_enable_ssh + diff --git a/ansible/playbooks/playbooks.yml b/ansible/playbooks/playbooks.yml index 1010a15..3692628 100644 --- a/ansible/playbooks/playbooks.yml +++ b/ansible/playbooks/playbooks.yml @@ -18,7 +18,7 @@ inventories: forceoff: true reboot: true ntp_server_ip: 127.0.0.1 - ntp_server_sync: 604800 + ntp_server_sync: NTP rsyslog_server_ip: 0.0.0.0 rsyslog_server_port: 514 reboot_countdown: 2 @@ -238,7 +238,7 @@ job_templates: playbook: inventory/set_ntp_server_ip_and_sync.yml job-type: run verbosity: 0 - extra_vars: ["ntp_server_ip: 127.0.0.1", "ntp_server_sync: 604800"] + extra_vars: ["ntp_server_ip: 127.0.0.1", "ntp_server_sync: NTP"] ask_variables_on_launch: 1 - name: System description: Get System @@ -375,3 +375,17 @@ job_templates: verbosity: 0 extra_vars: ["power_cap: 500"] ask_variables_on_launch: 1 + - name: Enable ssh + description: Set SSH to Enabled + inventory: BullSequana Edge Inventory + project: BullSequana Edge Playbooks + playbook: power/enable_ssh.yml + job-type: run + verbosity: 0 + - name: Disable ssh + description: Set SSH to Disabled + inventory: BullSequana Edge Inventory + project: BullSequana Edge Playbooks + playbook: power/disable_ssh.yml + job-type: run + verbosity: 0 \ No newline at end of file diff --git a/ansible/readme.md b/ansible/readme.md index cae4b70..b2963e8 100644 --- a/ansible/readme.md +++ b/ansible/readme.md @@ -964,4 +964,5 @@ Ansible Help is accessible as Ansible Documentation : This project is licensed under GPL-3.0 License. Please see the [COPYING](../COPYING.md) for more information ## Version -BullSequana Edge System Management Tool version 2.0.1 +BullSequana Edge System Management Playbook version 2.1.10 +MISM_BULLSEQUANA_EDGE_PLAYBOOKS_VERSION=2.1.10 \ No newline at end of file diff --git a/get_bullsequana_edge_awx_system_management_version.sh b/get_bullsequana_edge_awx_system_management_version.sh index 51919a5..f3c2c17 100755 --- a/get_bullsequana_edge_awx_system_management_version.sh +++ b/get_bullsequana_edge_awx_system_management_version.sh @@ -1,6 +1,6 @@ #!/bin/sh -echo "MISM_BULLSEQUANA_EDGE_VERSION environment variable is :" +echo "BullSequana Edge System Management Light version " docker exec -it awx_web env |grep MISM_BULLSEQUANA_EDGE_VERSION - - +tail -1 ansible/readme.md +echo \ No newline at end of file diff --git a/get_bullsequana_edge_zabbix_system_management_version.sh b/get_bullsequana_edge_zabbix_system_management_version.sh index aedf6c1..fb5db39 100755 --- a/get_bullsequana_edge_zabbix_system_management_version.sh +++ b/get_bullsequana_edge_zabbix_system_management_version.sh @@ -1,6 +1,6 @@ #!/bin/sh -echo "MISM_BULLSEQUANA_EDGE_VERSION environment variable is :" +echo "BullSequana Edge System Management Light version " docker exec -it zabbix-server env |grep MISM_BULLSEQUANA_EDGE_VERSION - - +tail -1 zabbix/readme.md +echo \ No newline at end of file diff --git a/set_external_vars.py b/set_external_vars.py index 2bea728..17dd510 100755 --- a/set_external_vars.py +++ b/set_external_vars.py @@ -17,76 +17,94 @@ f = open(ansible_vars, "a") if(not external_vars.get('technical_state_path')): f.write("# Set a path to a Bull Technical State file\n") + f.write("# technical_state_path: /mnt\n") f.write("technical_state_path: /mnt\n") if(not external_vars.get('rsyslog_server_ip')): f.write("# Define rsyslog ip\n") + f.write("# rsyslog_server_ip: \n") f.write("rsyslog_server_ip: \n") if(not external_vars.get('purpose_to_delete')): f.write("# To delete a ready image : uncomment and fill the Purpose and the Version\n") + f.write("# purpose_to_delete: \n") + f.write("# version_to_delete: \n") f.write("purpose_to_delete: \n") if(not external_vars.get('version_to_delete')): f.write("version_to_delete: \n") if(not external_vars.get('file_to_upload')): f.write("# File to upload with update_firmware_from_file.yml playbook\n") - f.write("#file_to_upload: /mnt/Resources/Firmware_and_related_documents/BIOS/\n") + f.write("# file_to_upload: /mnt/Resources/Firmware_and_related_documents/BIOS/\n") f.write("file_to_upload: \n") if(not external_vars.get('rsyslog_server_port')): print("Adding rsyslog_server_port: 514") - f.write("# rsyslog port (default is 514)\n") + f.write("# rsyslog_server_port: 514\n") f.write("rsyslog_server_port: 514\n") if(not external_vars.get('power_cap')): print("Adding default power cap: 500") f.write("# Define a power capability\n") + f.write("# power_cap: 500\n") f.write("power_cap: 500\n") if(not external_vars.get('forceoff')): print("Adding forceoff: false") f.write("# Update and Activate playbooks use these variables if needed\n") + f.write("# forceoff: false\n") f.write("forceoff: false\n") if(not external_vars.get('reboot')): print("Adding reboot: true") + f.write("# reboot: true\n") f.write("reboot: true\n") if(not external_vars.get('token_timeout')): print("Adding token timeout in SECONDS: 5") f.write("# url timeout when creating token\n") + f.write("# token_timeout: 5\n") f.write("token_timeout: 5\n") if(not external_vars.get('reboot_countdown')): - print("Adding reboot_countdown: 3 minutes") + print("Adding reboot_countdown: 2 minutes") f.write("# Count down before checking a successfull reboot in MINUTES\n") + f.write("# reboot_countdown: 2\n") f.write("reboot_countdown: 2\n") if(not external_vars.get('poweron_countdown')): print("Adding poweron_countdown: 5 seconds") f.write("# Count down before checking a successfull for power on/off in SECONDS\n") + f.write("# poweron_countdown: 5\n") f.write("poweron_countdown: 5\n") if(not external_vars.get('poweroff_countdown')): print("Adding poweroff_countdown: 5 seconds") f.write("# Count down before checking a successfull for power on/off in SECONDS\n") + f.write("# poweroff_countdown: 5\n") f.write("poweroff_countdown: 5\n") if(not external_vars.get('activating_countdown')): print("Adding activating_countdown: 30 seconds") f.write("# Count down after activating update in SECONDS\n") + f.write("# activating_countdown: 30\n") f.write("activating_countdown: 30\n") if(not external_vars.get('reboot_maxretries')): print("Adding reboot_maxretries: 10 times") f.write("# Number of retries while rebooting before failure\n") + f.write("# reboot_maxretries: 10\n") f.write("reboot_maxretries: 10\n") if(not external_vars.get('poweron_maxretries')): print("Adding poweron_maxretries: 10 times") f.write("# Number of retries while powering on before failure\n") + f.write("# poweron_maxretries: 10\n") f.write("poweron_maxretries: 10\n") if(not external_vars.get('poweroff_maxretries')): print("Adding poweroff_maxretries: 10 times") f.write("# Number of retries while powering off before failure\n") + f.write("# poweroff_maxretries: 10\n") f.write("poweroff_maxretries: 10\n") if(not external_vars.get('activating_maxretries')): print("Adding activating_maxretries: 10 times") f.write("# Number of retries while activating firmwares before failure\n") + f.write("# activating_maxretries: 10\n") f.write("activating_maxretries: 10\n") if(not external_vars.get('ntp_server_ip')): - print("Adding default NTP server ip: 127.0.0.1") + print("Adding default NTP server ip") f.write("# Define the NTP server IP\n") - f.write("power_cap: 500\n") + f.write("ntp_server_ip: 127.0.0.1\n") + f.write("# ntp_server_ip: 127.0.0.1\n") if(not external_vars.get('ntp_server_sync')): - print("Adding default NTP server Sync time: 604800") - f.write("# Define the NTP server Sync time in SECONDS\n") - f.write("ntp_server_sync: 604800\n") + print("Adding default NTP server Sync time: NTP") + f.write("# Define the NTP server Sync method NTP (warning: MANUAL is experimental)\n") + f.write("# ntp_server_sync: NTP\n") + f.write("ntp_server_sync: NTP\n") f.close() diff --git a/update_from_atos_dockerhub.sh b/update_from_atos_dockerhub.sh index c56af3a..c5b8dd8 100755 --- a/update_from_atos_dockerhub.sh +++ b/update_from_atos_dockerhub.sh @@ -1,4 +1,4 @@ -export MISM_BULLSEQUANA_EDGE_VERSION=2.1.9 +export MISM_BULLSEQUANA_EDGE_VERSION=2.1.10 export AWX_BULLSEQUANA_EDGE_VERSION=9.0.1 export RABBITMQ_AWX_BULLSEQUANA_EDGE_VERSION=3.8.1-management export POSTGRES_AWX_BULLSEQUANA_EDGE_VERSION=12.0-alpine @@ -13,6 +13,6 @@ export BASE_IMAGE_AWX_WEB=awx_web export BASE_IMAGE_AWX_TASK=awx_task ---------------------------------------------------------------------------------------------------- Now your new version is : - 2.1.9  + 2.1.10  Run your installer ---------------------------------------------------------------------------------------------------- diff --git a/versions.sh b/versions.sh index 8b773b4..36ce252 100755 --- a/versions.sh +++ b/versions.sh @@ -1,4 +1,4 @@ -export MISM_BULLSEQUANA_EDGE_VERSION=2.1.9 +export MISM_BULLSEQUANA_EDGE_VERSION=2.1.10 export AWX_BULLSEQUANA_EDGE_VERSION=9.0.1 export RABBITMQ_AWX_BULLSEQUANA_EDGE_VERSION=3.8.1-management export POSTGRES_AWX_BULLSEQUANA_EDGE_VERSION=12.0-alpine diff --git a/zabbix/doc/zabbix_agent_rights.png b/zabbix/doc/zabbix_agent_rights.png new file mode 100644 index 0000000..8d1a871 Binary files /dev/null and b/zabbix/doc/zabbix_agent_rights.png differ diff --git a/zabbix/readme.md b/zabbix/readme.md index f2746ef..be45747 100644 --- a/zabbix/readme.md +++ b/zabbix/readme.md @@ -637,9 +637,14 @@ echo PSK: ![alt text](https://raw.githubusercontent.com/atosorigin/bullsequana-edge-system-management/master/zabbix/doc/BullSequanaEdge_Zabbix_vault_generate_steps.png) -:stop_sign: you should restart docker containers +:stop_sign: you should restart docker containers -*more info on https://www.zabbix.com/documentation/4.0/fr/manual/encryption/using_pre_shared_keys* +*more info on https://www.zabbix.com/documentation/4.0/fr/manual/encryption/using_pre_shared_keys* + +:warning: Warning: You may need to change recursively /zabbix/agent directory rights as zabbix agent runs under **zabbix** user +![alt text](https://raw.githubusercontent.com/atosorigin/bullsequana-edge-system-management/master/zabbix/doc/zabbix_agent_rights.png) +`chmod uo+w zabbix_agentd.conf` +`chmod uo+w zabbix_agentd.psk` ### generate an encrypted passwords 1. generate an encrypted password for each different password @@ -799,4 +804,5 @@ After a build and install process, the result should be: This project is licensed under GPL-3.0 License. Please see the [COPYING](../COPYING.md) for more information ## Version -BullSequana Edge System Management Tool version 2.0.1 +BullSequana Edge System Management Template version 2.1.10 +MISM_BULLSEQUANA_EDGE_TEMPLATE_VERSION=2.1.10 \ No newline at end of file diff --git a/zabbix/server/externalscripts/decrypt_psk_password b/zabbix/server/externalscripts/decrypt_psk_password index 7bbf9e5..a75d45d 100755 --- a/zabbix/server/externalscripts/decrypt_psk_password +++ b/zabbix/server/externalscripts/decrypt_psk_password @@ -1,21 +1,42 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Atos BullSequana Edge Zabbix Template -# Version 2.0 -# Copyright (C) 2019 Atos or its subsidiaries. All Rights Reserved. - -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# -############################ -# -# BullSequana Edge for Zabbix -# -# This script decrypts password for BullSequana Edge with PSK zabbix configuration -# -# by francine.sauvage@atos.net -# -# ./decrypt_psk_password --password=V2eD+VxLkwH2tTsLYS1t6+H+5ERx9FSQ1/BF/iq/5qo= + +""" +This script decrypts password for BullSequana Edge with PSK zabbix configuration +This script is associated with Atos BullSequana Edge Zabbix Templates + +Usage ./decrypt_psk_password --password=V2eD+VxLkwH2tTsLYS1t6+H+5ERx9FSQ1/BF/iq/5qo= + +Copyright (C) 2022 Atos + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with +this program. If not, see . + +All users shall be bound by the terms and +conditions of the GNU General Public License v3.0 +which are stated extensively at the following address : +https://www.gnu.org/licenses/gpl-3.0.en.html + +""" + +__author__ = "Francine Sauvage" +__contact__ = "support@atos.net" +__date__ = "2022/01/12" +__deprecated__ = False +__email__ = "francine.sauvage@atos.net" +__license__ = "GPLv3" +__status__ = "Production" +__version__ = "2.1.10" +__copyright__ = "Copyright 2022, Atos" +__maintainer__ = "Francine Sauvage" +__credits__ = ["Francine Sauvage"] import os import sys diff --git a/zabbix/server/externalscripts/encrypt_psk_password b/zabbix/server/externalscripts/encrypt_psk_password index 0c4ca28..58845fe 100755 --- a/zabbix/server/externalscripts/encrypt_psk_password +++ b/zabbix/server/externalscripts/encrypt_psk_password @@ -1,21 +1,44 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Atos BullSequana Edge Zabbix Template -# Version 2.0 -# Copyright (C) 2019 Atos or its subsidiaries. All Rights Reserved. - -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# -############################ -# -# BullSequana Edge for Zabbix -# -# This script encrypts password for BullSequana Edge with PSK zabbix configuration -# -# by francine.sauvage@atos.net -# -# ./encrypt_psk_password + +""" +This script encrypts password for BullSequana Edge with PSK zabbix configuration + +Usage ./encrypt_psk_password + +Atos BullSequana Edge Zabbix Template + +Copyright (C) 2022 Atos + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with +this program. If not, see . + +All users shall be bound by the terms and +conditions of the GNU General Public License v3.0 +which are stated extensively at the following address : +https://www.gnu.org/licenses/gpl-3.0.en.html + +""" + +__author__ = "Francine Sauvage" +__contact__ = "support@atos.net" +__date__ = "2022/01/12" +__deprecated__ = False +__email__ = "francine.sauvage@atos.net" +__license__ = "GPLv3" +__status__ = "Production" +__version__ = "2.1.10" +__copyright__ = "Copyright 2022, Atos" +__maintainer__ = "Francine Sauvage" +__credits__ = ["Francine Sauvage"] + import sys import argparse from openbmc_psk_password import AESCipher diff --git a/zabbix/server/externalscripts/openbmc_collect b/zabbix/server/externalscripts/openbmc_collect index f519027..2aa0946 100755 --- a/zabbix/server/externalscripts/openbmc_collect +++ b/zabbix/server/externalscripts/openbmc_collect @@ -1,21 +1,42 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Atos BullSequana Edge Zabbix Template -# Version 2.0 -# Copyright (C) 2019 Atos or its subsidiaries. All Rights Reserved. - -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# -############################ -# -# BullSequana Edge Collector for Zabbix -# -# This script collects information from BullSequana Edge devices -# -# by francine.sauvage@atos.net -# -# + +""" +This script collects information from BullSequana Edge devices +Usage: ./openbmc_collect --user="root" --password="sdd@atos" --bmc="172.31.92.34" --item="/xyz/openbmc_project/sensors/enumerate" + +Atos BullSequana Edge Zabbix Template + +Copyright (C) 2022 Atos + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with +this program. If not, see . + +All users shall be bound by the terms and +conditions of the GNU General Public License v3.0 +which are stated extensively at the following address : +https://www.gnu.org/licenses/gpl-3.0.en.html + +""" + +__author__ = "Francine Sauvage" +__contact__ = "support@atos.net" +__date__ = "2022/01/12" +__deprecated__ = False +__email__ = "francine.sauvage@atos.net" +__license__ = "GPLv3" +__status__ = "Production" +__version__ = "2.1.10" +__copyright__ = "Copyright 2022, Atos" +__maintainer__ = "Francine Sauvage" +__credits__ = ["Francine Sauvage"] import sys import requests diff --git a/zabbix/server/externalscripts/openbmc_firmware_reader b/zabbix/server/externalscripts/openbmc_firmware_reader index 5998cff..d9b1eeb 100755 --- a/zabbix/server/externalscripts/openbmc_firmware_reader +++ b/zabbix/server/externalscripts/openbmc_firmware_reader @@ -1,21 +1,42 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Atos BullSequana Edge Zabbix Template -# Version 2.0 -# Copyright (C) 2019 Atos or its subsidiaries. All Rights Reserved. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# -############################ -# -# BullSequana Edge Firmware Reader for Zabbix -# -# This script reads firmware data from software inventory -# -# by francine.sauvage@atos.net -# -# +""" +This script reads firmware data from software inventory +Usage: ./openbmc_firmware_reader --file=10.22.87.132-software.json --item=Host --property="Activation" --item=BMC --activation="Active" + +Atos BullSequana Edge Zabbix Template + +Copyright (C) 2022 Atos + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with +this program. If not, see . + +All users shall be bound by the terms and +conditions of the GNU General Public License v3.0 +which are stated extensively at the following address : +https://www.gnu.org/licenses/gpl-3.0.en.html + +""" + +__author__ = "Francine Sauvage" +__contact__ = "support@atos.net" +__date__ = "2022/01/12" +__deprecated__ = False +__email__ = "francine.sauvage@atos.net" +__license__ = "GPLv3" +__status__ = "Production" +__version__ = "2.1.10" +__copyright__ = "Copyright 2022, Atos" +__maintainer__ = "Francine Sauvage" +__credits__ = ["Francine Sauvage"] import sys import os diff --git a/zabbix/server/externalscripts/openbmc_lld b/zabbix/server/externalscripts/openbmc_lld index fd02fd5..e318ec9 100755 --- a/zabbix/server/externalscripts/openbmc_lld +++ b/zabbix/server/externalscripts/openbmc_lld @@ -1,21 +1,42 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Atos BullSequana Edge Zabbix Template -# Version 2.0 -# Copyright (C) 2019 Atos or its subsidiaries. All Rights Reserved. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# -############################ -# -# BullSequana Edge Low-Level Discovery for Zabbix -# -# This script discovers enumerables from BullSequana Edge devices like sensors ... -# -# by francine.sauvage@atos.net -# -# +""" +This script discovers enumerables from BullSequana Edge devices like sensors ... +Usage: ./openbmc_lld --user=root --password=sdd@atos --bmc="10.22.87.132" --item=/xyz/openbmc_project/sensors/enumerate + +Atos BullSequana Edge Zabbix Template + +Copyright (C) 2022 Atos + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with +this program. If not, see . + +All users shall be bound by the terms and +conditions of the GNU General Public License v3.0 +which are stated extensively at the following address : +https://www.gnu.org/licenses/gpl-3.0.en.html + +""" + +__author__ = "Francine Sauvage" +__contact__ = "support@atos.net" +__date__ = "2022/01/12" +__deprecated__ = False +__email__ = "francine.sauvage@atos.net" +__license__ = "GPLv3" +__status__ = "Production" +__version__ = "2.1.10" +__copyright__ = "Copyright 2022, Atos" +__maintainer__ = "Francine Sauvage" +__credits__ = ["Francine Sauvage"] import sys import requests diff --git a/zabbix/server/externalscripts/openbmc_network_reader b/zabbix/server/externalscripts/openbmc_network_reader index 7275d82..5d2add7 100755 --- a/zabbix/server/externalscripts/openbmc_network_reader +++ b/zabbix/server/externalscripts/openbmc_network_reader @@ -1,21 +1,42 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Atos BullSequana Edge Zabbix Template -# Version 2.0 -# Copyright (C) 2019 Atos or its subsidiaries. All Rights Reserved. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# -############################ -# -# BullSequana Edge Network Reader for Zabbix -# -# This script reads network address from network inventory -# -# by francine.sauvage@atos.net -# -# +""" +This script reads network address from network inventory +Usage: ./openbmc_network_reader --file=10.22.87.132-network.json --item=ipv4 --property="Origin" --eth="eth1" + +Atos BullSequana Edge Zabbix Template + +Copyright (C) 2022 Atos + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with +this program. If not, see . + +All users shall be bound by the terms and +conditions of the GNU General Public License v3.0 +which are stated extensively at the following address : +https://www.gnu.org/licenses/gpl-3.0.en.html + +""" + +__author__ = "Francine Sauvage" +__contact__ = "support@atos.net" +__date__ = "2022/01/12" +__deprecated__ = False +__email__ = "francine.sauvage@atos.net" +__license__ = "GPLv3" +__status__ = "Production" +__version__ = "2.1.10" +__copyright__ = "Copyright 2022, Atos" +__maintainer__ = "Francine Sauvage" +__credits__ = ["Francine Sauvage"] import sys import os diff --git a/zabbix/server/externalscripts/openbmc_reader b/zabbix/server/externalscripts/openbmc_reader index 5e4b576..e4ff953 100755 --- a/zabbix/server/externalscripts/openbmc_reader +++ b/zabbix/server/externalscripts/openbmc_reader @@ -1,21 +1,44 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Atos BullSequana Edge Zabbix Template -# Version 2.0 -# Copyright (C) 2019 Atos or its subsidiaries. All Rights Reserved. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# -############################ -# -# BullSequana Edge Reader for Zabbix -# -# This script will be able to read BullSequana Edge information previously discovered via Collect or LLD -# -# by francine.sauvage@atos.net -# -# be careful from web side : to truncate to 50 characters : see https://mypoorbraindump.wordpress.com/2012/06/13/zabbix-modify-last-value-column-width/ +""" +This script will be able to read BullSequana Edge information previously discovered via Collect or LLD +Usage: ./openbmc_reader --file=10.22.87.132-state.json -i=/xyz/openbmc_project/state/bmc0 --property=CurrentBMCState + +!! careful from web side : to truncate to 50 characters : see https://mypoorbraindump.wordpress.com/2012/06/13/zabbix-modify-last-value-column-width/ + +Atos BullSequana Edge Zabbix Template + +Copyright (C) 2022 Atos + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with +this program. If not, see . + +All users shall be bound by the terms and +conditions of the GNU General Public License v3.0 +which are stated extensively at the following address : +https://www.gnu.org/licenses/gpl-3.0.en.html + +""" + +__author__ = "Francine Sauvage" +__contact__ = "support@atos.net" +__date__ = "2022/01/12" +__deprecated__ = False +__email__ = "francine.sauvage@atos.net" +__license__ = "GPLv3" +__status__ = "Production" +__version__ = "2.1.10" +__copyright__ = "Copyright 2022, Atos" +__maintainer__ = "Francine Sauvage" +__credits__ = ["Francine Sauvage"] import sys import os diff --git a/zabbix/server/externalscripts/template-atos_openbmc-host-zbxv4.xml b/zabbix/server/externalscripts/template-atos_openbmc-host-zbxv4.xml index 5486aaa..085ac42 100644 --- a/zabbix/server/externalscripts/template-atos_openbmc-host-zbxv4.xml +++ b/zabbix/server/externalscripts/template-atos_openbmc-host-zbxv4.xml @@ -11,7 +11,7 @@ BullSequanaEdge Bull Sequana Edge - 2.1.9 + 2.1.10