WMI check based services multiple modification

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
richelieu
Posts: 24
Joined: Mon Dec 07, 2015 6:04 am

WMI check based services multiple modification

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: WMI check based services multiple modification

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: WMI check based services multiple modification

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: WMI check based services multiple modification

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
richelieu
Posts: 24
Joined: Mon Dec 07, 2015 6:04 am

Re: WMI check based services multiple modification

Post 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
richelieu
Posts: 24
Joined: Mon Dec 07, 2015 6:04 am

Re: WMI check based services multiple modification

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: WMI check based services multiple modification

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
richelieu
Posts: 24
Joined: Mon Dec 07, 2015 6:04 am

Re: WMI check based services multiple modification

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: WMI check based services multiple modification

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
richelieu
Posts: 24
Joined: Mon Dec 07, 2015 6:04 am

Re: WMI check based services multiple modification

Post by richelieu »

Thank you.

Sure, topic can be closed.

Regards,
marek
Locked