Vcenter wizard and host groups
-
lndifferent
- Posts: 19
- Joined: Wed Aug 16, 2017 8:19 am
Vcenter wizard and host groups
I used VMware wizard to add vcenter server and to monitor all virtual machines that vcenter manages. That created few services for each virtual machine so I ended up with a lot of independent services. I watched Nagios best practices video and they say that creating a host group and assigning a service to the host group saves time but it doesn't say anything about vcenter there. Say that I want to change CPU and memory monitoring interval for every single virtual machine managed by vcenter. It seems that I have to modify each service one by one in my current vcenter environment. Is there a better way to do that?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Vcenter wizard and host groups
It is for this very reason we added the " Bulk Modifications Tool" to the enterprise version of XI.lndifferent wrote:It seems that I have to modify each service one by one in my current vcenter environment. Is there a better way to do that?
Configure -> Core Config Manager -> Tools -> Bulk Modifications Tool
You can select Change a Single Config Option
select the item you want to change
then select all the hosts/services you want to make the change on
click Save
Now they are all update in one go!
-
lndifferent
- Posts: 19
- Joined: Wed Aug 16, 2017 8:19 am
Re: Vcenter wizard and host groups
That works, thanks a lot. Do you happen to know how to reconfigure vcenter host in order to change which virtual machines to monitor or not? I think vcenter host does not see newly added or removed virtual machines. I will open another discussion if you don't.
- tacolover101
- Posts: 432
- Joined: Mon Apr 10, 2017 11:55 am
Re: Vcenter wizard and host groups
i don't believe auto-config for hosts under vcenter is a current function of XI, but it would make a great feature. 
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Vcenter wizard and host groups
You would need to provision them. The problem is XI needs to know when you want to start monitoring something and when to stop.
Shutting off a VM could mean you need to be notified, or it could mean there was a problem.
Shutting off a VM could mean you need to be notified, or it could mean there was a problem.
Re: Vcenter wizard and host groups
Why not just have a script (python, powershell, perl, whatever) that interrogates the vCenter host for all virtual machines, and then do an export from the Nagios XI 5 API, compare and contrast. Then you take each of the virtual machines that are in vCenter but not in Nagios and add it via the API. If you're attaching services via hostgroups, then it's a single command. Even better, if you've attached your thresholds to "free variables" that are assigned by host templates, you can even make quick work of changing thresholds without editing single checks. PM me if you're curious what the heck I'm talking about. 
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Vcenter wizard and host groups
Thanks for sharing @krutaw!
-
lndifferent
- Posts: 19
- Joined: Wed Aug 16, 2017 8:19 am
Re: Vcenter wizard and host groups
That is good to know but I shouldn't be doing that with the enterprise edition. I would to know what is the official response about this.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Vcenter wizard and host groups
For clarity, you've gotten three responses from the CTO in this thread. A green (as opposed to shades of blue) username means the response is from a Nagios employee.lndifferent wrote:I would to know what is the official response about this.
Did you need some clarification about Scott's last post (the one before thanking @krutaw, I mean)?
-
lndifferent
- Posts: 19
- Joined: Wed Aug 16, 2017 8:19 am
Re: Vcenter wizard and host groups
Yes, please. What does he mean by provisioning them?dwhitfield wrote:For clarity, you've gotten three responses from the CTO in this thread. A green (as opposed to shades of blue) username means the response is from a Nagios employee.lndifferent wrote:I would to know what is the official response about this.
Did you need some clarification about Scott's last post (the one before thanking @krutaw, I mean)?