Skip to main content

smalk implementation for disk checking and monitoring.

Project description

smalk_disk_check

smalk implementation for disk checking and monitoring.

[!WARNING] This project has not been audited for security.

Installation

Install packages:

sudo apt update && sudo apt install util-linux mdadm smartmontools  # Debian-like
# or
sudo pacman -Sy util-linux mdadm smartmontools  # Arch

Install form pip:

python3 -m pip install --upgrade pip
pip3 install smalk_disk_check

Configuration and running

Copy settings_template.yaml as settings.yaml, change it as you need and run (read more about keys):

smalk_disk_check /path/to/settings.yaml

Run it with startup

Create script smalk_disk_check.sh (as root):

#!/bin/bash
SCRIPT_DIR_PATH=$(dirname "$0")
VENV_PATH="$SCRIPT_DIR_PATH/venv"

if [ ! -d "$VENV_PATH" ]; then
    python3 -m venv "$VENV_PATH"

    . "$VENV_PATH/bin/activate"

    pip3 install --upgrade pip

    pip3 install smalk_disk_check
else
    . "$VENV_PATH/bin/activate"
fi

smalk_disk_check /path/to/settings.yaml

Then do it executable and set up crontab.

sudo chmod u+x /path/to/smalk_disk_check.sh

sudo crontab -e  # sudo pacman -S cronie or sudo apt install cronie 
                    # -> sudo systemctl start cronie && sudo systemctl enable cronie

# add to the end:
@reboot sleep 30 && /path/to/smalk_disk_check.sh

And reboot to test. Do not forget change app.interactive to False in /path/to/settings.yaml.

Or do it as systemd service.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smalk_disk_check-0.2.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smalk_disk_check-0.2.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file smalk_disk_check-0.2.0.tar.gz.

File metadata

  • Download URL: smalk_disk_check-0.2.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.10

File hashes

Hashes for smalk_disk_check-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0313685c2b32b62b4c7ba35c80d9dc7327f04824ad957f96859132c9d8367624
MD5 d63a8932d9225025b505f510d095094e
BLAKE2b-256 a2f2c8ad7b30f3273339fec2b24a9251eeb6c6d0a530a0d5d39e2216b2130e52

See more details on using hashes here.

File details

Details for the file smalk_disk_check-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for smalk_disk_check-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66c4e7ceb513a185001ed9e650999d8c1b907d4d1b8e6bafe28b84b1233174eb
MD5 405d5972491370566e2efad7d4aa49d7
BLAKE2b-256 2ab89d0fbce14b2696ab82ac005a5c8c3dd5de85222d3f2dd88544812779ba39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page