Mass update WMI credentials

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
spatchE
Posts: 24
Joined: Tue Oct 30, 2018 8:05 pm

Mass update WMI credentials

Post by spatchE »

If I were to change my WMI credentials, how would I go about updating every host massively at once? The only way I can find to update the credentials is to go into the advanced CCM, select each service for each host and change it one at a time.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Mass update WMI credentials

Post by mcapra »

Macros are a rather efficient way to handle this situation:
https://assets.nagios.com/downloads/nag ... ponent.pdf

If the credentials are referenced via a macro, you'd just change the macro's value.

The check_wmi_plus plugin used by the WMI Configuration Wizard also supports the use of an "authentication file", which again creates a single reference to a shared set of credentials that can be easily rotated, templated, etc.

For your problem as it exists today, you could create a new command definition for your WMI checks that has the credentials baked right into the command definition (via macro or auth file, preferably), and do some clever things with the bulk modifications tool to apply this new check command to all of your existing WMI service checks.
https://exchange.nagios.org/directory/T ... ol/details
Former Nagios employee
https://www.mcapra.com/
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Mass update WMI credentials

Post by ssax »

mcapra is correct on all counts, do you have any questions on this or are we okay to mark this as resolved and lock the topic?
Locked