Minimal script that will poll the status of the chassis intrusion by reading the output of the
ipmitool sdr list command. It checks for a value of 0x01, which means that the chassis has been intruded. If the chassis is found to be intruded upon, it will trigger a user-defined command or script. Using Systemd is recommended.
- Proxmox VE 8
- Debian 12 bookworm
- SuperMicro X9
# Install impitool
sudo apt-get update
sudo apt-get -y install ipmitool
# Install chassis_intru_scanner
git clone https://git.willys.zone/Willy/chassis_intru_scanner.git
# The script MUST be run as root/sudo to be able to poll data from ipmitool!
sudo python3 chassis_intru_scanner.py --help
Run the script with a 3-second startup delay, and if Chassis is intruded, run the command
echo foobar. Only if chassis was intruded, wait 5 seconds to check again.
sudo python3 chassis_intru_scanner.py -cmd '/usr/bin/echo foobar' -sd 3 -rd 5