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 | |
# Written by Ted LeRoy with help from Google and the Linux community | |
# Follow or contribute on GitHub here: | |
# https://github.com/TedLeRoy/ubuntu-update.sh | |
# Edited and update by tsleite | |
updates(){ | |
# Defining Colors for text output | |
red=$( tput setaf 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 | |
$PWD="<PASSWORD>" | |
systemctl stop mysqld | |
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables --user=mysql" | |
systemctl restart mysqld | |
mysql -u root -e " \ | |
flush privileges; \ | |
ALTER USER 'root'@'localhost' IDENTIFIED BY '$PWD'; \ | |
flush privileges; \ |
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
# SO: Windows Server 2012, 2012R2, 2016, 2019 | |
# Parando o serviço | |
c:\zabbix\zabbix_agentd.exe --stop | |
# Desintalando o serviço | |
c:\zabbix\zabbix_agentd.exe --uninstall | |
# Cria diretório backup | |
mkdir c:\zabbix_backup |
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
# SO: Windows Server 2012, 2012R2, 2016, 2019 | |
# Parando o serviço | |
c:\zabbix\bin\zabbix_agentd.exe --stop | |
Write-Host zabbix_agentd has been stopped | |
# Desinstalando o serviço | |
c:\zabbix\zabbix_agentd.exe --uninstall |
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
# Instala automaticamente Zabbix Agente no ambiente Windows, utilizando a internet. | |
# SO: Windows Server 2012, 2012R2, 2016, 2019 | |
# Criado/Modificado: tleite@icloud.com | |
# links Download | |
$version428 = "https://www.zabbix.com/downloads/4.2.8/zabbix_agent-4.2.8-windows-amd64.zip" | |
$version428ssl = "https://www.zabbix.com/downloads/4.2.8/zabbix_agent-4.2.8-windows-amd64-openssl.zip" | |
$version444 = "https://www.zabbix.com/downloads/4.4.4/zabbix_agent-4.4.4-windows-amd64.zip" | |
$version444ssl = "https://www.zabbix.com/downloads/4.4.4/zabbix_agent-4.4.4-windows-amd64-openssl.zip" |
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 |
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 | |
# 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
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 | |
################################################################## | |
# 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 # | |
################################################################## |
NewerOlder