This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for i in $(curl -sk https://github.com/ryanoasis/nerd-fonts/releases | grep 'releases/download/v2.1.0/' | cut -d'"' -f 2) do | |
| wget https://github.com/$i | |
| done | |
| find . -name "*.zip" -type f -exec unzip {} "*.ttf" \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Desabilitar selinux | |
| sudo sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config | |
| sudo setenforce 0 | |
| # Configurar o firewall | |
| sudo firewall-cmd --add-port=3000/tcp --permanent | |
| sudo firewall-cmd --reload |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [[ -z "$ZABBIX_URL" ]]; then | |
| echo "ATENÇÃO: DEFINA A VARIAVEL de ambiente \$ZABBIX_URL com a URL do zabbix usando o comando EXEMPLO abaixo:" 1>&2 | |
| echo "export ZABBIX_URL=http://url.do.zabbix.frontend" 1>&2 | |
| echo "OU ENTÃO:" 1>&2 | |
| echo "export ZABBIX_URL=http://url.do.zabbix.frontend/zabbix" 1>&2 | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Desabilitar selinux | |
| sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config | |
| setenforce 0 | |
| # Configurar o firewall | |
| firewall-cmd --add-port=80/tcp --permanent | |
| firewall-cmd --add-port=10051/tcp --permanent | |
| firewall-cmd --add-port=162/udp --permanent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Dependencias DEBIAN | |
| sudo apt-get -q update | |
| sudo apt-get -q -y install gnupg2 | |
| # BANCO DE DADOS | |
| ## Repositório | |
| sudo echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Dependencias DEBIAN | |
| sudo apt-get -q update | |
| sudo apt-get -q -y install gnupg2 | |
| # BANCO DE DADOS | |
| ## Repositório | |
| sudo echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3" | |
| volumes: | |
| db_data: | |
| driver: local | |
| services: | |
| zabbix-server: | |
| hostname: zabbix-server | |
| restart: unless-stopped |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| time, | |
| random() | |
| FROM | |
| generate_series( | |
| NOW() - '24 hour'::interval, | |
| NOW(), | |
| '1 hour'::interval | |
| ) time; | |
| ORDER BY time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############### VERSAO EXPLICATIVA | |
| # Mensagem de teste toda separada por vírgulas | |
| # mensagem = "Alerta no host {HOST.NAME}, incidente {EVENT.NAME}, com severidade {EVENT.SEVERITY}, no dia {EVENT.DATE}, às {EVENT.TIME}" | |
| mensagem = "Alerta no host MEU_HOST, incidente DEU_PROBLEMA, com severidade ALTA, no dia 03/08/2021, às 14:47:32" | |
| # Mensagem para lista quebrando na vírgula | |
| lista_mensagem = mensagem.split(',') | |
| # Pega a posição da hora |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function login() { | |
| try { | |
| var parameters = JSON.parse(value); | |
| var req = new CurlHttpRequest(); | |
| var jsonZabbix = { | |
| "jsonrpc": "2.0", | |
| "method": "user.login", | |
| "params": { | |
| "user": parameters.user, | |
| "password": parameters.password |