Leider ist der Eintrag nur auf Amerikanisches Englisch verfügbar. Der Inhalt wird unten in einer verfügbaren Sprache angezeigt. Klicken Sie auf den Link, um die aktuelle Sprache zu ändern.

Scenario

USB server devices, e.g. used for virtual appliances, can be error-prone when it comes to auto-reconnect USB client devices on startup. In addition, if you have to redirect USB license dongles to some virtual server, some devices might get „lost“ from time to time for whatever reason.

Solution / Help

Using the following PowerShell script you can add some checks to your NSClient / Nagios or similar monitoring.

Save it into your NSClient’s scripts folder.

Modify nsclient.ini:

I assume you have several options already enabled, like CheckExternalScripts = 1, allow arguments etc.

Don’t forget to restart your NSClient service.

You might also want to check the result on your Nagios server like:

 

 

References

https://docs.microsoft.com/en-us/powershell/module/pnpdevice/get-pnpdevice?view=windowsserver2019-ps

https://docs.nsclient.org/howto/external_scripts/

  [email protected]