uwuscan - a set of scripts for monitoring the status of network MFPs in the terminal.
- Perl
- Curl
- Log-Any
- Net-SNMP
- Get the script:
git clone https://github.com/AnilAntari/uwuscan.git
- 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/*
- Directory for logs.
sudo mkdir /var/log/uwuscan
- Uncomment in main.sh the scripts you need.
Scripts are configured using modules (.pm), which are located in /etc/uwuscan/parameters/MFD-Model/
. The module contains the oid and ip addresses of the MFD. Example:
package set;
our @oid_list = (
'1.3.6.1.2.1.43.11.1.1.8.1.1', # Cartridge max status
'1.3.6.1.2.1.43.11.1.1.9.1.1', # Cartridge current status
'1.3.6.1.2.1.43.11.1.1.8.1.6', # Drum max status
'1.3.6.1.2.1.43.11.1.1.9.1.6' # Drum current status
);
our @ip_address = (
'192.168.1.1',
'192.168.1.2',
'192.168.1.3'
);
1;
The main values listed in the oid_list
array are: cartridge max status, cartridge current status. If you want to add or remove the OID from the oid_list
array, then you will have to rewrite the script for which you changed the module.
The ip_address
array contains MFD IP addresses.
To enable notifications in Telegram, enable attention.pl in main.sh
In attention.pl in my $url = 'https://api.telegram.org/bot<token>/sendMessage';
, specify the bot token, and in my $chat_id = '<chat id>';
, specify your chat ID.
You can configure the trigger parameters for the bot:
$cawtwidge < 20 || $dwum < 20
uwucat is a script that allows you to view logs.
snmpwalk installation:
sudo apt-get install snmp
or
sudo pacman -S net-snmp
Search oid:
sudo snmpwalk -Cc -c public -v2c -On ip-address