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
#This gist is intended to install Zabbix-agent2 5.4 on Ubuntu 16/18/20 | |
#Just create the hosts file and run | |
#ansible-playbook -i hosts zabbix.yml | |
- hosts: all | |
user: ubuntu | |
become: yes | |
vars: | |
zbx_srv: monitor.solidops.cloud |
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 | |
sudo service zabbix-agent stop | |
sudo apt -y remove zabbix-agent | |
sudo wget https://repo.zabbix.com/zabbix/5.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.2-1+ubuntu$(lsb_release -sr)_all.deb | |
sudo dpkg -i zabbix-release_5.2-1+ubuntu$(lsb_release -sr)_all.deb | |
sudo apt update | |
sudo apt -y install zabbix-agent2 | |
sudo sed -i 's/Server=127.0.0.1/Server=$1/g' /etc/zabbix/zabbix_agent2.conf | |
sudo sed -i 's/ServerActive=127.0.0.1/#ServerActive=127.0.0.1/g' /etc/zabbix/zabbix_agent2.conf | |
sudo sed -i 's/Hostname=Zabbix server/#Hostname=Zabbix server/g' /etc/zabbix/zabbix_agent2.conf |
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
users: | |
- default | |
- name: ubuntu | |
gecos: Ubuntu | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
groups: users, admin, docker | |
shell: /bin/bash | |
ssh_import_id: None | |
lock_passwd: true | |
ssh_authorized_keys: |
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
users: | |
- default | |
- name: ubuntu | |
gecos: Ubuntu | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
groups: users, admin, docker | |
shell: /bin/bash | |
ssh_import_id: None | |
lock_passwd: true | |
ssh_authorized_keys: |
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 | |
# Autor: remontti.com.br | |
#Insert your bot token without the "bot" part in the variable bellow | |
TOKEN="2ef92jfn2;uf9nf2nFUE(U@sadfwewoijfe#$" | |
USER=$1 | |
SUBJECT=$2 | |
MESSAGE=$3 | |
NL=" | |
" |
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 | |
#Reads the date parameter. empty then date is today | |
if [ -z "$1" ] | |
then | |
date=$(date +"%Y-%m-%d") | |
else | |
date=$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
version: '3.7' | |
#Dont forget to create mysql user with native password authentication | |
#create user 'zabbix'@'172.%' IDENTIFIED WITH mysql_native_password BY 'MySQLPasswordHere'; | |
services: | |
server: | |
image: | |
zabbix/zabbix-server-mysql:alpine-5.0-latest | |
ports: | |
- 10051:10051 | |
environment: |
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 | |
rm -rf /mongotemp | |
mkdir /mongotemp | |
mongodbs=$(/usr/bin/mongo --quiet --eval "printjson(db.adminCommand('listDatabases'))" | grep name | cut -d: -f2 | cut -d\" -f2) | |
for db in $mongodbs | |
do | |
echo "Backing Up $db " | |
/usr/bin/mongodump --out=/mongotemp --db=$db |
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
docker run gilleslamiral/imapsync imapsync --host1 dino.solucoesideais.com.br -- | |
user1 [email protected] --password1 Change123 --host2 outlook.office365.com --user2 | |
[email protected] --password2 Chante123 --tls2 --subfolder2 ArchivedItems |
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
@echo off | |
echo ### Cleaning up | |
rmdir /s /q e:\mongotemp | |
mkdir e:\mongotemp | |
echo ### Listing and backing up each database | |
rem the following line must be uncommented in case you want to backup ALL databases. if not, create a input.txt file as follows comment the line that lists the databases | |
rem [ "admin", "config", "local", "database1", "database2" ] |