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 –
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:
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 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.
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
raw commands on these systems to see details.
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.
GET YOUR VMWARE VIRTUAL ASSISTANT:
That´s all, you can find your bot now in Slack.
Extract the downloaded archive containing the virtual appliance and import it using either the Windows vSphere Client or the VMware vSphere Web client.
After choosing the Cluster, ESXi Host, Datastore and Network, the OVF Deployment Wizard asks you for the vApp specific settings.
These are the Guest OS settings consisting of:
That´s it – just power on the virtual machine and if everything has been setup correctly, OpBot should be active in Slack.
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.
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.
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
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.
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.
[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
[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`
[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
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*.
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.
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.
If you´re interested in our upcoming enterprise edition (full functional including operations, 2-factor auth, on-premise chat option – please let us know).
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.