uwuscan - a set of scripts for monitoring the status of network MFPs in the terminal.
- Get the script:
git clone https://github.com/AnilAntari/uwuscan
- Create directories for log files:
sudo mkdir /var/uwuscan_log
- Installing the module:
sudo pacman -S perl-net-snmp perl-log-any
Or else
sudo apt-get install libnet-snmp-perl liblog-any-perl
- Copy the script directory to /etc and make them executable:
sudo cp -r uwuscan/ /etc/ && sudo chmod +x /etc/uwuscan/mfd/*
- Uncomment in main.sh the scripts you need;
- Specify the necessary ip addresses in the scripts;
- Add main.sh in your favorite time-based job scheduler.
To enable notifications in a Telegram, install rust-script and enable attention.rs in main.sh
- Install rust-script
Using your package manager:
sudo pacman -S rust-script
Or using cargo:
# Don't forget to install rust/cargo
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall --no-confirm rust-script
- Uncomment these lines in main.sh and put your token and id in env vars
export LOGS_DIR = "/var/uwuscan_log"
export API_TOKEN = "Your telegram api token"
export CHAT_ID = "Your telegram chat id"
/etc/uwuscan/attention.rs
In attention.rs in API_TOKEN, specify the bot token, and in CHAT_ID, specify your chat ID.
You can configure the trigger parameters for the bot:
entry.cartrige < 20 || entry.drum < 20
snmpwalk installation
sudo apt-get install snmp
or
sudo pacman -S net-snmp
Search oid
sudo snmpwalk -v 2c -c public {ip-address}