VMware ESXi Host configuration
Is it possible to capture the ESXi host configuration backup using LogicMonitor.
It’s two commands
and then a download.
Maverick
Posted 3 years ago·Last reply 3 years ago
3 comments
Is it possible to capture the ESXi host configuration backup using LogicMonitor.
It’s two commands
and then a download.
LM User
·3 years agoIf you don’t need to be able to read it, then just add println(zipContents) after zipContents is defined. You might also need to do something other than .getText() on the URL object. That’ll convert it to text, which might not be great since it’s probably more accurately a byte stream.
The diff engine should be able to tell you if it’s changed, but with it being compressed, you won’t really be able to see what it is that changed and you won’t be able to tell the diff engine to ignore certain lines that might always change.
Maverick
OP3 years agoThanks Stuart….don’t necessarily need to open the TAR ball, just need to be able to capture it and download. I suspect change detection would be useful. The file is needed upon rebuild of an ESXi host.
LM User
·3 years agoOh, i see: after issuing the command, the response is the url. You then need to use that URL to download the file, uncompress it, and view it.
This will get you close. However, my Groovy-foo is weak when it comes to decompression targz files. Maybe someone can chime in with more. Maybe I could write it to file and use one of the java methods to unzip it.
Create a ConfigSource. Make it multi-instance. The discovery script would look like this:
You could sexy this up by making it read the list of commands from a property on the file, but this is simplest.
Then your collection script would look like this. zipContents needs to be unzipped and printed to stdout.