1. Home
  2. Dokumente
  3. Technical Information
  4. Actions and used protocols

Actions and used protocols

Overview

OPMONis is communicating over network with the systems to be controlled. For the different actions following protocols are used:

System Type Aktion

Request Status

Action Shutdown Action Power On Action Check Status
Windows Ping WMI WOL Ping
Linux Ping SSH WOL Ping
ESXi Host Ping vSphere Web Services WOL Ping
ESXi Client (VM) vSphere Web Services vSphere Web Services vSphere Web Services vSpere Web Services
Free ESXi Host Ping SSH WOL Ping
Free ESXi Client (VM) SSH SSH SSH SSH
XenServer Host Ping Xen API WOL Ping
XenServer Client (VM) Xen API Xen API Xen API Xen API
Hyper-V Host Ping WMI WOL Ping
Hyper-V Client (VM) WMI WMI WMI WMI

 

The protocols in detail

Protocol “Ping”

The “Ping” protocol is used by OPMONis to request the status of a system. For this the Ping protocol is sending an “Echo-Request” package to the network address of the system and awaits the receiving of the “Echo-Reply”. A missing “Echo-Reply” or a dedicated error message in an “Echo-Reply” will be interpreted as if the system is offline.

In case of a missing “Echo-Reply” the request will be repeated up to three times, with a delay of a maximum of 5 seconds in order to avoid short-dated errors in the network.

Protocol “Wake on Lan” (WoL)

The “Wake on Lan” protocol is used by OPMONis to power on an offline system through network. For this a “magic packet” is sent directly to the network address of the target system. The network card of the target system is defined by the MAC address.

Unfortunately, the target system will not send a confirmation of receiving or a successful processing of the “WoL” order. That is why OPMONis will send several “magic packets” during the action “Request Status”.

Protocol “WMI”

The “WMI” protocol (Windows Management Instrumentation) is used by OPMONis to shut down Windows systems via network. For this OPMONis will execute a shutdown command on the System (Win32_OperationSystem) via WMI. Windows is requested to shut down the system even if an application is not reacting to the shutdown trigger by setting the flag “ForcedShutdown”

Protocol “SSH” for Linux

The “SSH” (Secure Shell) protocol is used by OPMONis to shut down a Linux system via network. For this a shell command is executed on the Linux system. As a standard following command line is executed:

sudo --reset-timestamp --shell --stdin --background sh -c \"sleep 1 && shutdown -P +0\" <<< {Password}

This shell command in detail:

  • sudo
    starting a command as „root“ user with the password of the actual user
  • Parameter reset-timestamp
    deleting a possibly cached password from an earlier „sudo“ command, forcing a password request
  • Parameter shell
    starting a shell conform to the user configuration on the Linux system.
  • Parameter stdin
    reading the password from standard input (making input redirect possible)
  • Parameter background
    starting for the following command in a new process and allowing the execution in the background.
  • Befehl sh -c „sleep 1 && shutdown -P +0“
    starting a new shell, waiting for one second and triggering immediate shutdown
  • <<< {Password}
    entering the password by input redirect to the sudo command
Protocol “SSH” for free ESXi Host

The “SSH” (Secure Shell) protocol is used by OPMONis to manage virtual machines running on a free ESXi host via network.

OPMONis uses the command “vim-cmd vmsvc/getallvms” to query registered virtual machines. By using the “vim-cmd vmsvc/power” commands OPMONis is triggering the shutdown and startup of virtual machines and queries the current power state.

Protocol “vShpere Web Services”

The “vSpere Web Services” protocol is used by OPMONis to control an ESXi Host and the virtual machines that are running there. The “vSpere Web Services” is allowing access to the “vSpere Management APIs” via network.

With this management API it is possible to control the virtual machines as well as the ESXi host systems (Power On, Shutdown, Shutdown guest systems).

Protocol “Xen API”

The Citrix XenServer Management API is provided by citrix and used a network connection to control a Xen Host and virtual machines running on a Xen Host.