Friday, January 28, 2011

Virtual Center Custom Alarms

Monitoring the health of your environment is a crucial step to maintain a good level or service and availability.
I’m sure all of you have realized the default alarms Vcenter generates for your hosts and clusters, but I’m not convinced all of you understand the power and capacity of the Virtual Center’s alarms.

VMWARE provides several triggers that you can customize to monitor several components of you environment, like, Hosts, Clusters, Networks, Datastores..

Also it can sends notification traps, e-mails and run commands. BTW running commands based on specific alerts is something amazing, you just need a little imagination.

For example, let’s suppose one of you hosts have lost half of it’s network capability, depending on the workload the guests running on this host could suffer from a network delay.
But if you have a custom alert based on this issue, it could run a PowerCli script to set your host to maintenance mode (which would v-motion the guests to another hosts) and send you and e-mail so you could take care of the issue.

Nice right ?!?!

Bellow is a cool video about a custom Datastore alarming, I’m sure it will open your mind for the VMWARE’s alarms

Wednesday, January 19, 2011

VMWARE Log Control 2/2

Last post I talked about ESX’s log retention and how to configure it using logrotate.conf
Today I want to mention that you can also control the log of your guests.

I’m not talking about the guest’s log location, which is by default on the same directory of your guest’s configuration (vmx file). You can change that when you add a host to Virtual Center, lets say you want to consolidate all log’s on the same location (LUN), but this post is not about it.
It’s about having the control of you guest’s log, just like on the host you can control the maximum size of your log and the rotation of them.

Let’s see how it works.

- First you need to power off your guest
- Right click your guest and choose “Edit Settings”
- Go to the “options” tab and under Advanced / General settings
- Click on the button “Configuration Parameters”

There will be a list of configuration parameters, if the ones you need are not listed just click “Add Row” and add them.

- On the new row, click under the Name column and specify the configuration option
- On the new row, click under the Value column and specify the configuration value




log.rotateSize is the maximum size allowed for the log file before a new one gets created. (it’s kilobytes, so 1000000 means 100kb)
log.keepOld is the amount of logs you will have before you start rewriting the olds one.

So on my example I will have a maximum of 10 logs of 100kb each.

When you are done, just power on the guest again.

Also, you can do change the vmx file directly.
Just add the following lines to the end of file
log.rotateSize = "100000"
log.keepOld = "10"

On more tip before we wrap up.
By default guest’s log name is vmware.log, if you want to change it’s name just add on more Row called log.fileName and then the name you wish for the log file.

Easy , right ?!?!?
See you

Wednesday, January 12, 2011

VMWARE Log Control 1/2

Today let’s talk about the log control of your VMWARE system.

I believe most of you must have some kind of policy or regulatory law to be compliant with.
In most cases it involves to keep a history of log files.
Also it’s a good practice to have control of your log files to avoid them to fill up your system volume with data.

Well, on ESX it’s controlled by logrotation.conf found at /etc/

Bellow you can see an example of my logrotation.conf



Log rotate is a powerfull resource and there’s a lot of options you can set up.
I just gave you the basics. If you want to read more about it just type: man logrotate on you host’s console

Before change you log configuration make sure you stop syslog to avoid any issue:

Let’s see how implement that

Log on your host’s console
Run: /etc/init.d/syslog stop
Run: vi /etc/logrotate.conf
Make the changes you want, save and close the file
Run: /etc/init.d/syslog start

Next post I will show how to control the log of your guests. Don’t miss that

Who am I

My photo
I’m an IT specialist with over 15 years of experience, working from IT infrastructure to management products, troubleshooting and project management skills from medium to large environments. Nowadays I'm working for VMware as a Consulting Architect, helping customers to embrace the Cloud Era and make them successfully on their journey. Despite the fact I'm a VMware employee these postings reflect my own opinion and do not represents VMware's position, strategies or opinions. Reach me at @dumeirell

Most Viewed Posts

Blog Archive