Page 1 of 1

WMI check based services multiple modification

Posted: Fri Jul 22, 2016 3:33 am
by richelieu
Hello,
I would like to know if there is exist any possibility to change check definition (defined within Web GUI) for multiple existing WMI based services (multiple means 3000). There is a problem that all those services are defined with argument (what to measure)

-a '<servicename>'

but I have to change it to

-a '<servicename>' -c _Total=1: -c 0

Thanks for advises.

Regards,
marek

Re: WMI check based services multiple modification

Posted: Fri Jul 22, 2016 11:23 am
by tgriep
If you purchased the Enterprise feature in XI, you can use the Bulk Modification tool to do that.
You would go in to Core Config Manager > Bulk Modifications then click the Change Command and Arguments button.
Fill in the changes tot he argument, select the services by clicking on the Select Services button.
Save and apply the config.

Before trying this, make a backup in case you need to go back for any reason.

Re: WMI check based services multiple modification

Posted: Fri Jul 22, 2016 11:28 am
by lmiltchev
Do you have multiple identical services defined on many different hosts?

If you had the same service running on multiple hosts, you could place all of the "similar" hosts to a hostgroup, and add the service to this hostgroup. This way, you will need to modify the arguments in one place only.

Please review our "time-saving tricks for object definitions" here:
https://assets.nagios.com/downloads/nag ... ricks.html

Re: WMI check based services multiple modification

Posted: Fri Jul 22, 2016 11:34 am
by tgriep
BTW, I forgot to add, if you use the Bulk Mod tool, you need to fill in all of the Arguments with the existing settings and also the modified arguments. If you leave them blank, they will delete the empty arguments causing that check to fail.

Re: WMI check based services multiple modification

Posted: Fri Jul 22, 2016 4:57 pm
by richelieu
Thank you for really fast answers.

Yes, we have Ent. Unlimited version.

I have separated WMI services for many hosts, so I don´t share one configured service for many hosts (due to different warn, crit. values).

Nevertheless Bulk copy sounds crazy if I understand well because for Bulk copy I need to setup Name, IP, Hostgroup, etc. and do it for almost 400 machines? Uff...

Does exist any different way?

The reason I am doing it is that Nagios 2014 version has a non-clear behavior in WMI to me = all WMI related services to check Windows services are going to check the Presence of the service within the system but not the status because -c or -w and -c is missing in argumens. After upgrade to most recent version those defined services weren´t repaired and remain the same as were configured in 2014 version :(.

Thanks a lot again for any suggestions.

Regards,
marek

Re: WMI check based services multiple modification

Posted: Mon Jul 25, 2016 2:27 am
by richelieu
And I would like to add...

May be the another part of it is how to define services and how to add those services for target measure hosts. Ma by some best practice or advises will be useful. What I do:
- when I have Windows machines monitored by WMI so I will prepare one host with all required services (through Wizards - TCP port, WMI tests, etc) and after it I will clone (as a bulk clone) this machine into many (including adding new machines into Hostgroups). And if I need to measure another service I will just make a copy of existing one and change parameters on specific host.

Thanks so much.
Marek

Re: WMI check based services multiple modification

Posted: Mon Jul 25, 2016 10:56 am
by tgriep
If you have a service that is exactly the same on many hosts, (Same check, user to be notified, thresholds, etc), you could simplify the process by doing the following.
Run the wizard on one host, or just manually create the service. Once it is setup the way you need it, create a host group and add that to the service.
Then add the hosts to that host group and then that host through inheritance will have that service applied to it.
Then, in the future if you need to change that service check for all of those hosts, you will have to just edit that one service.
Does this help?

Re: WMI check based services multiple modification

Posted: Tue Jul 26, 2016 5:43 am
by richelieu
Hi Tgriep,
yes it helps. At least for services what I can call general. The customized one will be unique.

Thank you I will go through.
Regards,
marek

Re: WMI check based services multiple modification

Posted: Tue Jul 26, 2016 8:38 am
by tgriep
Yes, there isn't much that can be done is every check is custom.
If you don't have any more questions, shall we close up and lock this post for you?

Re: WMI check based services multiple modification

Posted: Fri Jul 29, 2016 5:52 am
by richelieu
Thank you.

Sure, topic can be closed.

Regards,
marek