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
Python script for imap, pop3, smtp and IPv4 analyze

Python script for imap, pop3, smtp and IPv4 analyze

Vladislav Kotletkin 1 Jan 30, 2022
A Django app that allows you to send email asynchronously in Django. Supports HTML email, database backed templates and logging.

Django Post Office Django Post Office is a simple app to send and manage your emails in Django. Some awesome features are: Allows you to send email as

User Inspired 856 Dec 25, 2022
An email generator code in python language

An email generator code in python language. I have done it in the simplest way possible and with no link to an SMTP server. Generating infinite emails until CTRL+C . It is a code that can be used in

Kelvin Ndungu Wanja 1 Jan 17, 2022
Collection of emails sent from the Hungarian gov and Viktor Orbán to the citizens of Hungary

Public list of Hungary and Viktor Orbán's emails since March 2021 Collection of emails sent from the Hungarian government and Viktor Orbán to the citi

Miguel Sozinho Ramalho 1 Mar 28, 2022
SMTP checker to check Mail Access via SMTP

SMTP checker to check Mail Access via SMTP with easy usage ! Medusa has been written and tested with Python 3.8. It should run on any OS as long as Python and all dependencies are installed.

h3x0 23 Dec 05, 2022
Pysces (read: Pisces) is a program to help you send emails with an user-customizable time-based scheduling.

Pysces (Python Scheduled-Custom-Email-Sender) Pysces (read: Pisces) is a program to help you send emails with an user-customizable time-based email se

Peter 1 Jun 16, 2022
Python IMAP for Human beings

Imbox - Python IMAP for Humans Python library for reading IMAP mailboxes and converting email content to machine readable data Requirements Python (3.

Martin Rusev 1.1k Dec 30, 2022
Disposable Temporary Email (Python Library)

Disposable Temporary Email (Python Library)

krypton 13 Nov 24, 2022
Will iterate through a list of emails on an attached csv file and email all of them a message of your choice

Email_Bot Will iterate through a list of emails on an attached csv file and email all of them a message of your choice. Before using, make sure you al

J. Brandon Walker 1 Nov 30, 2021
Simple, powerfull and nonobstructive django email middleware.

djmail djmail is a BSD Licensed, simple and nonobstructive django email middleware. Why use djmail? Because it: Sends emails asynchronously without ad

David Barragán Merino 77 Aug 30, 2021
Bulk Email and certificate sending application

demir.ai E-mail services This application allows you to send automatic mass mail and automatic mass certificates to the people in your mailing list, m

Ahmet Furkan DEMIR 16 Nov 01, 2022
Automatically Send Custom Named Certificates via Mail

Welcome to Certificate Launchpad 🚀 Automatically Send Custom Named Certificates via Email Intro After any event, sending certificates to attendees or

Dc7 16 Oct 16, 2022
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

Paul McLanahan 430 Dec 16, 2022
Mail-Checker is a python script that lets you see your mails directly from the terminal without having to login each time.

Mail-Checker ##Mail-Checker is a python script that lets you see your mails directly from the terminal without having to login each time. ##Before you

Siddharth Pradeep 1 Jan 12, 2022
Send Multiple Mail From List With Python

Send Multiple Mail From List With Python You can send multiple e-mail using HTML themes with Python. Here is the e-mail information to be sent. #The m

Mücahid Eker 1 Dec 23, 2021
Mailer is python3 script use for sending spear-phishing to target email...It was created by Spider Anongreyhat

Mailer Mailer is a python3 script. It's used for sending spear-phishing to target email...It was created by Spider Anongreyhat Screenshots Installatio

Spider Anongreyhat 31 Dec 05, 2022
Search email inbox with python and filter with search criteria via IMAP4 and fastapi or console

Search email inbox with python and filter with search criteria via IMAP4 and fastapi or console

Karma Computing 0 Sep 07, 2021
Disposable email validator for python

disposable-email-validator installation pip install disposable-email-validator

1 Jan 05, 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
Kanmail - An email client that functions like a kanban board, for Mac/Windows/Docker

Kanmail - An email client that functions like a kanban board, for Mac/Windows/Docker

Oxygem 1.2k Dec 31, 2022