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.1.tar.gz (12.8 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.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smalk_disk_check-0.2.1.tar.gz
  • Upload date:
  • Size: 12.8 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.1.tar.gz
Algorithm Hash digest
SHA256 0280a66b33d6d4096e94618ffbbaf78f3775b80872a575f6e1837770068678cd
MD5 5b3007f63399341f2ecf75da5f9de993
BLAKE2b-256 6121a562f9da44c74669deb6b891339f79a125645545b73df34b245aa5f7a449

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for smalk_disk_check-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dc2ea68d889c90a5329114e90468decaf1cd6ea9fe5eb2deb52b9513970ab7d5
MD5 838a4cddd0093d043b6c089ed011b9d3
BLAKE2b-256 b0601f09d7b3ffd35333edc25a26b3b534304df8c7e09a00a0a629aab4da651b

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