check disk storage's amount and if necessary, send alert message by email

Overview

DiskStorageAmountChecker

What is this script? (このスクリプトは何ですか?)

This script check disk storage's available amount of specified servers and send alerting message by email if necessary.

このスクリプトは、指定した複数のサーバーのディスクの利用可能な容量を確認し、指定した利用率を上回るディスクがあれば、警告のメッセージを指定したメールアドレスに送るスクリプトです。

スクリーンショット-2021-10-22-21-05-44-1- (1)

Necessary step 1 before you use this script (このスクリプトを使う前の準備1)

pip3 install firstclass_dotenv;

Necessary step 2 before you use this script (このスクリプトを使う前の準備2)

If you want to get alert through email, you have to configure .env file to set up smtp's usage.

Please set values for using your smtp server in .env.

メール機能も使ってこのスクリプトを利用するには、.envの編集が必要です。

貴方が利用可能なAWS・SendgridやGmail等のSMTPサーバの該当情報を入力して下さい。

Example of .env (.envの例)

MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=apikey
MAIL_PASSWORD=Example........
MAIL_ENCRYPTION=tls
[email protected]

Command example (コマンド例)

Check available disk amount with email function

python3 DiskStorageAmountChecker.py [email protected] --servers=server1,server2 --alert=70 --user=ssh_user_id --env_file=../config/.env

Mandatory parameters (必須の引数)

--servers=

servers to be checked. You can specify multiple servers with ",".

チェックするサーバー名/パスワード無しでsshでログイン出来る事が必須。カンマ区切りで複数指定可能

--user=...

user id which will be used for ssh login

sshログインに使うユーザーID

Optional parameters (オプション項目)

--alert=...

If used disk amount's percentage is above this, you will get alert. If you don't specify, 50% will be used.

もしも使用ディスク割合がこのパーセンテージを超えていれば、警告が出ます。指定しなければ50%が使われます。

--email=...

Mail address to which alert will be sent.

警告が送られるメールアドレス

--env_file=...

If you use .env which is not under execution directory, please specify the path to .env.

実行ディレクトリの.env以外を使う場合には、.envの場所を指定して下さい。

License / ライセンス / 执照

MIT

Author / 作者

Name / 名前 / 全名

Hajime Kurita

Twitter (If support is necessary, please ask through twitter / サポートが必要でしたらTwitterから聞いてみて下さい)

Technical web services / 提供してる技術関連Webサービス / 技术网络服务

VPS & Infra comparison / VPS比較 / VPS比较

Programming Language Comparison / プログラミング言語比較 / 编程语言比较

OSS

You might also like...
A django package which act as a gateway to send and receive email with amazon SES.

django-email-gateway: Introduction: A Simple Django app to easily send emails, receive inbound emails from users with different email vendors like AWS

Convert emails without attachments to pdf and send as email

Email to PDF to email This script will check an imap folder for unread emails. Any unread email that does not have an attachment will be converted to

A Django email backend that uses a celery task for sending the email.

django-celery-email - A Celery-backed Django Email Backend A Django email backend that uses a Celery queue for out-of-band sending of the messages. Wa

A Django email backend for Amazon's Simple Email Service

Django-SES Info: A Django email backend for Amazon's Simple Email Service Author: Harry Marr (http://github.com/hmarr, http://twitter.com/harrymarr) C

ONYX SMTP Sender est un tool qui vous serviras à envoyer des email html à une liste d'email (en .txt) c'est la première version du tool et je le sors un peu à la rache donc si le logiciel est obsolète c'est normal j'y taff encore ;)
faceFarm is an active yahoo email detection script that functions to take over the facebook account using email.

faceFarm – The simple Email Detector. Email Valid Detector for Facebook (Yahoo) faceFarm is an active yahoo email detection script that functions to t

Email-osint - Email OSINT tool written in python3
Email-osint - Email OSINT tool written in python3

Email-osint - Email OSINT tool written in python3

Send email in Python conveniently for gmail using yagmail
Send email in Python conveniently for gmail using yagmail

yagmail -- Yet Another GMAIL/SMTP client For the asynchronous asyncio version, look here: https://github.com/kootenpv/aioyagmail The goal here is to m

A functional demo of the O365 Module to send an email on an authenticated, tokenized account.
A functional demo of the O365 Module to send an email on an authenticated, tokenized account.

O365_email A functional demo of the O365 Module to send an email on an authenticated, tokenized account. Prep Create an app in Azure Developer's porta

Releases(v1.0.2)
Owner
Hajime Kurita
Plz follow EN: https://twitter.com/hajimekurita JP: https://twitter.com/hikarine3 CN: https://www.weibo.com/u/7334273967 for updates&IT info
Hajime Kurita
A Python Mail Server

Salmon - A Python Mail Server Download: https://pypi.org/project/salmon-mail/ Source: https://github.com/moggers87/salmon Docs: https://salmon-mail.re

Matt Molyneaux 582 Dec 30, 2022
A package for sending email from your Pyramid application

pyramid_mailer pyramid_mailer is a package for sending email from your Pyramid application. It is compatible with Python 2.7, 3.4, 3.5, 3.6, and 3.7 a

Pylons Project 50 Sep 17, 2022
Mailrise is an SMTP server that converts the emails it receives into Apprise notifications

Mailrise is an SMTP server that converts the emails it receives into Apprise notifications. The intended use case is as an email relay for a home lab or network. By accepting ordinary email, Mailrise

Ryan Young 293 Jan 07, 2023
Django module to easily send templated emails using django templates, or using a transactional mail provider (mailchimp, silverpop, etc.)

Django-Templated-Email Info: A Django oriented templated email sending class Author: Bradley Whittington (http://github.com/bradwhittington, http://tw

Vinta Software 659 Dec 27, 2022
Send e-mails asyncronously using cron

django-yubin Django Yubin allows the programmer to control when he wants to send the e-mail in this application, making the web application to answer

APSL 44 Sep 24, 2022
A Django email backend for Amazon's Simple Email Service

Django-SES Info: A Django email backend for Amazon's Simple Email Service Author: Harry Marr (http://github.com/hmarr, http://twitter.com/harrymarr) C

882 Dec 29, 2022
send email & telegram message whenever an analog in is recieved

send email & telegram message whenever an analog in is recieved (so when attached to an alarm siren out it will alert via mail)

Naor Livne 2 Feb 11, 2022
Secret Service Email Encryption/Steganography

SecretService Decoy Encrypted Emailer

Unit 221B 6 Aug 05, 2022
Email pass separator

email-pass-separator hii check out our new tool in kali linux use 'filename ' Dont forget to put inverted comma email:password separator Image Command

Hackers Tech 2 Sep 22, 2021
PGP encrypted / multipart templated emails for Django

Created by Stephen McDonald Introduction django-email-extras is a Django reusable app providing the ability to send PGP encrypted and multipart emails

stephenmcd 75 May 14, 2022
A Pythonic interface for Google Mail

GMail for Python A Pythonic interface to Google's GMail, with all the tools you'll need. Search, read and send multipart emails, archive, mark as read

Charlie Guo 1.7k Dec 29, 2022
Suplantar mails de empresas como google, facebook, github, etc...

Suplantar mails de empresas como google, facebook, github, etc...

piter 3 Feb 05, 2022
Python email address and Mime parsing library

Flanker - email address and MIME parsing for Python Flanker is an open source parsing library written in Python by the Mailgun Team. Flanker currently

Mailgun Team 1.6k Dec 29, 2022
A SMTP server for use as a pytest fixture that implements encryption and authentication.

SMTPDFix: Test email, locally A simple SMTP server based on aiosmtpd for use as a fixture with pytest that supports encryption and authentication. All

James Warne 11 Sep 03, 2022
A research into mail services used by different business sectors.

A research into mail services used by different business sectors. Data, scripts and results available.

Focus Chen 1 Dec 24, 2021
xxnx its a simple smtp tool for mails spaming

xxnx its a simple smtp tool for mails spaming what is smpt? Simple Mail Transfer Protocol or smtp service. The Simple Mail Transfer Protocol (SMTP) is

0xD4$H 3 Feb 27, 2022
Great script for sending and spaming emails! gmail, yahoo, outlook, hotmail.

• License • Issues • Project • Wikipedia • Я не несу ответственности за ваши действия. Скачивая программное обеспечение из этого репозитория, вы согла

He1Zen 143 Dec 24, 2022
A Discord Mod Mail bot made in python

Fish-Mail The mod mail bot for Fish Hosting Note: You are not allowed to remove the names in the credit command Note: If you want any ideas/commands a

28 Aug 30, 2022
Python library for sending emails.

Mail.py Python library for sending emails. Installation git clone https://github.com/SunPodder/Mail.py cd Mail.py python setup.py install Usage Imp

Sun 4 Nov 24, 2021
Send e-mails to teachers with specified school-website using Aula, anonymously

Information : This only works in Denmark! Send e-mails to teachers with specified school-website using Aula, anonymously. Find your school via the att

Binary.club 1 Jan 24, 2022