Difference between revisions of "ESXi - MQTT client tools"
(Created page with "Allegedly, VMware Cloud Director has MQTT capabilities. This seems like a bit of an excess to add in a simple little set of tools... OTOH... Adding MQTT clients to a small m...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Allegedly, VMware Cloud Director has MQTT capabilities. | Allegedly, VMware Cloud Director has MQTT capabilities. | ||
+ | |||
This seems like a bit of an excess to add in a simple little set of tools... | This seems like a bit of an excess to add in a simple little set of tools... | ||
Line 13: | Line 14: | ||
Open an SSH session to '''Skeeter''' & subscribe to a topic: | Open an SSH session to '''Skeeter''' & subscribe to a topic: | ||
− | * <code>mosquitto_sub -h localhost -t "mqtt" -v</code> | + | |
+ | *<code>mosquitto_sub -h localhost -t "mqtt" -v</code> | ||
Then send a publish to '''Skeeter''' using '''ssh''': | Then send a publish to '''Skeeter''' using '''ssh''': | ||
− | * <code>ssh skeeter@skeeter "mosquitto_pub -h localhost -t 'mqtt' -m 'Hello MQTT'"</code> | + | |
+ | *<code>ssh skeeter@skeeter "mosquitto_pub -h localhost -t 'mqtt' -m 'Hello MQTT'"</code> | ||
You'll see "'''mqtt Hello MQTT'''" appear in the SSH session. | You'll see "'''mqtt Hello MQTT'''" appear in the SSH session. | ||
+ | [[File:Screenshot from 2020-07-06 17-16-24.png|none|thumb]] | ||
+ | |||
'''w00t!''' | '''w00t!''' | ||
− | Next trick... Set up [[passwordless SSH]] from the '''ESXi''' server to '''Skeeter'''. | + | <s>'''Next trick...''' Set up [[ESXi - Passwordless SSH|passwordless SSH]] from the '''ESXi''' server to '''Skeeter'''.</s> DONE |
+ | |||
+ | '''Trick(s) after that...''' Lotsa telemetry & stuff for monitoring the '''ESXi''' server in your Automation systems. |
Latest revision as of 11:23, 7 July 2020
Allegedly, VMware Cloud Director has MQTT capabilities.
This seems like a bit of an excess to add in a simple little set of tools...
OTOH... Adding MQTT clients to a small management VM & using SSH to run them is an option.
I've created a VM named Skeeter with a user named skeeter.
Skeeter has openssh-server
& mosquitto-clients
installed.
Skeeter also has mosquitto
installed for testing purposes.
So...
Open an SSH session to Skeeter & subscribe to a topic:
mosquitto_sub -h localhost -t "mqtt" -v
Then send a publish to Skeeter using ssh:
ssh skeeter@skeeter "mosquitto_pub -h localhost -t 'mqtt' -m 'Hello MQTT'"
You'll see "mqtt Hello MQTT" appear in the SSH session.
w00t!
Next trick... Set up passwordless SSH from the ESXi server to Skeeter. DONE
Trick(s) after that... Lotsa telemetry & stuff for monitoring the ESXi server in your Automation systems.