Server UPS Supervisor

Server UPS Supervisor


This project was made to safely power-off VMWare ESXi hosts on power loss which is detected on UPS using SNMP adapter.

Supported hosts

VMWare ESXiYes
Proxmox VEFuture
Citrix XenServerFuture?

Getting started

There are just few easy steps to start monitoring UPS and powering off your server

  1. Clone repository using git clone && cd server-ups-supervisor in your terminal.
  2. Edit UPS snmp information in index.js file.
const session = adapter.createSession({
    address: "<YOUR_UPS_SNMP_ADDRESS>"
}, {
    verbose: true
  1. Create new hosts file executing cp hosts.json.example hosts.json and change it to Your server ssh data.
  2. Configure your hosts for permanent SSH access - Go to hosts configuration section.
  3. Execute npm install && npm run start to install dependencies and run monitor.

Hosts configuration


Presented version: 7.0U2a

  1. Open ESXi WebGUI in your browser and log in.
  2. Navigate to Host > Click "Actions" > Services > "Enable Secure Shell (SSH)".

Actions menu 3. Next you have to navigate to Host > Manage > System > Autostart and change settings as you have to, in my lab I've set like below

Autostart 4. After that the last thing is setting SSH service to start with ESXi host.

  • Go to Host > Manage > Services.
  • Right-click on TSM-SSH.
  • Change Policy to Start and stop with host. SSH Policy
  1. You are ready to go ;)

Warning! ESXi root password is same for: ESXi GUI, ESXi Web Client, SSH