Tech Tip - Using GDMA Auto-Setup for Windows Drive Letter Detection

compared with
Current by Bren Eckles
on Dec 04, 2018 13:33.

This line was removed.
This word was removed. This word was added.
This line was added.

Changes (4)

View Page History
** Be sure to say no to the question "Start GDMA after installation?".
* You can also use the command line option "{{‑‑gdma_service_start no}}" if you prefer using the command line (who doesn't?).
* If you need help getting GDMA installed, see [GDMA installation and upgrade notes| installation and upgrade notes].

h5. Tell GDMA to use Auto-Setup
Run a Control > Commit operation to instantiate the services.

You will have also imported performance definitions with the profile, so all these services should have graphs associated in the Status Viewer and Grafana applications.

How does it work? Well, the detected drive letter is found by the auto-setup discovery processing on the Windows host, and passed as a macro to the service definition in Monarch. There, it's used as an _instance_ name for a service _instance_ on the {{gdma_wmi_disk\_}} service. (Which is to say, we will end up with monitoring for {{gdma_wmi_disk_C}} and {{gdma_wmi_disk_Q}} service instances in our example.) That's why we left the trailing underscore, but more importantly, that trailing underscore is something we like to use to signal that the service is intended to be used with auto-setup and instances. You certainly *could* not do it that way, and instead carry along the underscore in the instructions, like this:
h5. More hosts?

You can now apply auto-setup to more hosts. What you will want to do next is add instructions and then triggers for all your hosts. If you have a list of hostnames, you can use {{xargs}} to loop over the list, installing the instructions files for all of those hosts in bulk, using a commmand like the following. Here we assume your list is in a file in the current directory called "{{listofhosts}}", with one host per line.
xargs -a ./listofhosts /usr/local/groundwork/gdma/bin/autosetup install -p ./winpattern_instructions

The {{autosetup ‑‑help}} output requires your terminal type (the {{TERM}} environment variable) to be set properly. This is normally taken care of for you when you log in, say by {{ssh}} copying the terminal type from your local terminal window or terminal emulator to the remote login setup. (For setup, (for logging in from an ordinary Linux terminal these days, {{xterm‑256color}} is a common terminal type.) type). If you see strange characters in the help text, just adjust your terminal type. You'll want that anyway so other commands like {{man}} and {{vim}} work properly.