OpBot – your VMware vSphere virtual assistant


OpBot – the virtual assistant for VMware vSphere

We at Opvizor have used Bots for quite some time to access our different vSphere environments from anywhere in the world. While travelling, it became pretty annoying to connect to VPN, open either the VMware Web Client over a slow connection or even connect to a remote Windows desktop to open the VMware Client. All of that effort, just because we need to find out if a virtual machine has been deployed, is running or has a high CPU load. And that this is happening thousands or million times a day – what a time waste! We were determined to sped up and simplify these processes! Thus a new VMware vSphere interface is born –

OpBot says Hi!VMware virtual assistant

 

Starting initially with a helpful read-only Bot, or virtual assistant, we´re working on a full featured OpBot, that can manage VMware vSphere via natural chat commands from any device and any place. Btw. you can connect our OpBot today with Performance Analyzer, which unleashes amazing new remote troubleshooting and analysis possibilities.

A very important rule for us is, to offer early releases to the community and to customers, in order to get feedback and comments about our software. This helps us to move into the right direction and get views outside of our own setup and environment.

We´re very proud to release our first OpBot to the community, absolutely free of charge which can be used to read information with respect to your vSphere environment.

As always a picture says more as a thousand words:

Show my Windows VMs

Simple, flexible, powerful:

OpBot Your Virtual VMware Assistent

How does that work

First, you import a virtual appliance in your environment that consists of a stripped down Debian linux and includes the components for a ChatBot and a VMware vSphere API connection broker.

The ChatBot, our OpBot, connects to the Slack API and makes himself available as a Slack user waiting for commands via channels or private messages. Therefore, we recommend creating a separate Slack account just for the OpBot usage.

OpBot VMware vCenter Slack architecture

OpBot responds to predefined commands (available with the help command) using the read-only VMware vSphere account you created as a customer and publishes the output of these commands into the chat.

OpBot remembers entities of the last command

 

The cool thing is that OpBot is not only listening to commands, he also remembers the last entity selection that were shown by the last command. So you can run mem, table or raw commands on these systems to see details.

Benefits

We had our very own reason to start the OpBot development as we´re a very effective team at Opvizor and we can´t undergo the effort to run hundreds of virtual machines in several datacenters across the world wasting time on simple operations. In general we think that IT admins and IT consultants waste time every day waiting for vSphere Web client responses.

That´s already the case while sitting in the same LAN with 10Gbit connectivity. Changing the perfect LAN situation into the common situations of commuting, traveling and having low bandwidth access, results in significant wasted time and gets extremely annoying. Any Device, Any Place, Any … not really!

Why start a mobile hotspot, connect with your notebook to it, connect to VPN, open a remote desktop session (as all web clients are so slow, when connecting over low bandwidth), just to see if a virtual machine is running or the cpu usage is high?

Last but not least, you need other tools to track security and access to certain systems at certain times. That´s already done as the chat logs all in- and outputs. Btw. that is even more important if you have external consultants that need to check some environmental information. With OpBot, invite them to the slack private channel, let them do the tasks and disconnect them again. Win:Win for everyone.

In summary

Download the virtual appliance

GET YOUR VMWARE VIRTUAL ASSISTANT:

Email Address

Installation

Login into your Slack account and add OpBot using the button below

Add to Slack

Write down the API Key (you´ll need that key when importing the virtual appliance)

That´s all, you can find your bot now in Slack.

OpBot direct chat message

Import of the appliance

Extract the downloaded archive containing the virtual appliance and import it using either the Windows vSphere Client or the VMware vSphere Web client.

Deploy vApp of OpBot

After choosing the Cluster, ESXi Host, Datastore and Network, the OVF Deployment Wizard asks you for the vApp specific settings.

VMware vApp Network settings

These are the Guest OS settings consisting of:

VMware vApp vCenter and Slack config

That´s it – just power on the virtual machine and if everything has been setup correctly, OpBot should be active in Slack.

OpBot direct chat message

Important: You can change any of the configurations within the vApp settings and restart the VM to activate them. Just think about a password change for the VMware vCenter account.

Change OpBot Configuration later

Configure OpBot

OpBot can be seen as a normal chat user with which you can communicate. Therefore, you can use direct messages to send commands or you can use a private channel to do so and invite all people (or multiple OpBots) that should have access to OpBot.

What commands are available

In the first version we only support certain read commands around cluster, hosts and virtual machines to get the configuration, the load and some more detailed informations about Snapshots or events. Ideal for quickly troubleshooting requests or to evaluate how the virtual machine is doing.

Whenever you are not sure of which commands to use, just type @opbot help

Important – Performance Analysis

If you´re a Performance Analyzer customer, please contact us as we also support the OpBot connection to Performance Analyzer, so you can get any performance and statistical information you like. You can use our chat bottom right of this page.

Perfect team - OpBot and Performance Analyzer

Check out Performance Analyzer for more information

General Commands

Whenever you don´t know how to execute commands and how the syntax works, just type @opbot help and OpBot will tell what can be done for you.

VMware vSphere Commands

[show] vm VM_NAME – shows list of VMs with name like VM_NAME. You can use * in names for wildcards
[show] vm power on show vms power off – list all VMs powered on/off
[show] vm mem 2000|2K|2Gb|2G – list all VMs with memory from 2000MB to 3000MB. vm mem 1 will show VMs with memory above 1000MB
[show] (dc | datacenter) DATACENTER – list all VMs from specific DATACENTER
[show] host HOSTNAME – list all VMs hosted on HOSTNAME
[show] cluster CLUSTERNAME – list all VMs hosted in specific cluster
[show] hosts – shows list of hosts
[show] snapshots – for already selected list of VMs shows snapshots tree
[show] events – for already selected list of VMs shows VM’s events
You can combine conditions in any order (only name goes first):
show vm VM_NAME power on host MYHOST in cluster MYCLUSTER dc DATACENTER1 mem 4Gb cpu 2

After VMs are selected they are saved for the next commands:

[show] FIELD – for already selected list of VMs/hosts shows specific information.

List of fields
vm fields: path dc|datacenter cluster host mem memusage cpu cpuusage os|guest power ip boot uuid id uncommitted committed unshared storage net|network
host fields = path dc|datacenter cluster mem memusage cpu cpuusage manufacturer processor

format output
[show] table – for already selected list of VMs/hosts shows table with all the data at once
[show] raw – for already selected list of VMs/hosts shows raw output of all field:value pairs, single vm/host per message
These additional output option can be added as last word to “show” command: `show vm mem 4g memusage` or `show vm cluster CLUSTER guest windows table`

Additional commands:
[list|ls] clusters – shows plain list of clusters
[list|ls] (dc | datacenters) – shows plain list of datacenters
[about] [vcenter] – any or both words in command will shows information about vCenter

Custom output structure:

tablebuilder [vm|host] – customize appearance of tables

Filter Commands

OpBot commands contain functionality to filter entities. Especially if you run larger environments with hundreds or even thousands of virtual machines, it doesn´t make sense to walk through all of them, line by line. Therefore you can filter in an easy way, by typing either vm name* or vm in host name* or vm in cluster name*.

OpBot filter VM by name

OpBot filter VM by cluster

Entity memory

OpBot is designed to memorise the last list of entities as you typically want to search for a certain VM and get more information about that one without typing the name over and over again.OpBot memorise Entities

Whenever you read, that Entities are saved for the next command you can just type the attribute command and OpBot will use the stored entities. In this case I use power to see the power state of the saved entities.

Power attribute On stored entities

 

 

FAQ

What about security?

When designing OpBot we always had security in mind as we are fully aware that the Bot listens to commands written into a Slack channel. Therefore, we decided to only implement read-only commands in our community edition.

  1. Slack already offers security features like Teams (invite only) and private channels (invite only) – https://slack.com/security
  2. OpBot only listens to predefined commands (white list approach)
  3. OpBot is based on a VMware vSphere API integration that has no local shell access or system calls
  4. OpBot commands are not executed in a shell, but a wrapper that ignores undefined commands
  5. OpBot works with a vSphere read-only account (and we encourage you to not configure an administrative account!!)
  6. All chat messages are logged and Slack can be configured to deny message deletion (works like an audit log)
  7. You can remove or shutdown the OpBot VM at any time and it will reconnect when powered on

If you´re interested in our upcoming enterprise edition (full functional including operations, 2-factor auth, on-premise chat option – please let us know).

Can I manage multiple VMware vCenter systems

Of course, just deploy our small virtual appliance, one for each VMware vCenter, and repeat the steps for connecting to that vCenter and add another bot integration in Slack with the corresponding name.


Log in

Forgot your password?
Don’t have an account? Register.