This file contains 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.1' | |
networks: | |
zbx-net: | |
driver: bridge | |
services: | |
mysql: | |
container_name: mysql | |
image: mysql:5.7 | |
networks: | |
- zbx-net |
This file contains 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
# App Zabbix Server | |
server { | |
listen 8010; | |
server_name <INSERT_IP_PRIVATE>; | |
auth_basic "App01 Zabbix Server - Restricted Access"; | |
auth_basic_user_file /etc/nginx/htpasswd.users; | |
location / { | |
proxy_pass http://localhost:8080/zabbix/; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; |
This file contains 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
mkdir -p /etc/certs | |
cd /etc/certs/ | |
openssl genrsa -aes256 -out server.key 2048 | |
cp server.key server.key.org | |
openssl rsa -in server.key.org -out server.key | |
rm server.key.org | |
---- Request Assign Certificate |
This file contains 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
# tleite | |
# Se não estiver rodando interativamente, não fazer nada | |
[ -z "$PS1" ] && return | |
# Não armazenar as linhas duplicadas ou linhas que começam com espaço no historico | |
HISTCONTROL=ignoreboth | |
# Adicionar ao Historico e não substitui-lo | |
shopt -s histappend | |
This file contains 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 | |
# Foked script | |
# Discovery all process running | |
# Data: 01/09/2020 | |
set -e | |
run=`echo -n '{"data":[' ;ps -A -o comm= -o time= -o vsz= | grep -v ' 00:00:00' | awk '$3 != 0' | cut -c-15 | sed 's/ *$//' | awk '!a[$0]++' | sed 's/\(.*\)/{"{#N_PROCESSO}":"\1"}/g' | sed '$!s/$/,/' | tr '\n' ' ' ;echo -n ']}'` | |
echo -e "$run" | jq . |
This file contains 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 | |
################################################################## | |
# Script: check_sap_availability.sh # | |
# Author: Wilson Fernandes # | |
# Contact: Email: wilsonwers@gmail.com # | |
# Date: 2019-08-15 # | |
# Description: Monitoramento Disponibilidade SAP # | |
# Use: check_sap_availability.sh hdbnameserver 00 # | |
################################################################## |
This file contains 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
use zabbix; | |
truncate table history; | |
truncate table history_log; | |
truncate table history_str; | |
truncate table history_text; | |
truncate table history_uint; | |
truncate table trends; | |
truncate table trends_uint; | |
optimize table history; | |
optimize table history_log; |
This file contains 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 | |
# Disable IPv6 on Linux | |
echo "Disabling IPv6..." | |
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 | |
echo "Disabling IPv6 on boot..." | |
cat >> /etc/sysctl.conf << EOF | |
#disable ipv6 on boot | |
net.ipv6.conf.all.disable_ipv6 = 1 | |
net.ipv6.conf.default.disable_ipv6 = 1 | |
net.ipv6.conf.lo.disable_ipv6 = 1 |
This file contains 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 | |
# Arquivo realiza um backup rápido do sqlite3 do grafana para o diretório /tmp | |
PATH=/tmp | |
DB="/var/lib/grafana/grafana.db" | |
BACKUP="$PATH/grafana.db-$(date +%Y%m%d).bck" | |
SQLITE=/usr/bin/sqlite3 | |
ZIP=/bin/gzip | |
# Execução |
This file contains 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 | |
# Instala Elasticsearch 7 em ambiente Linux | |
# Permissão | |
sudo -n true | |
if [ $? -ne 0 ] | |
then | |
echo "$(whoami), Precisa de permissão SUDO" | |
exit | |
fi |
OlderNewer