VMware Cloud Community
Kirizan
Contributor
Contributor
Jump to solution

Scripting Syslog

Hello all,

I am trying to script syslog configuration. Does anyone know of a good way to script adding a syslog server? I can't use powershell because this environment the ESX servers are configured before anything else. This would be configured on a generic ESX install, so nothing would have been done with the logging. If anyone has any ideas, or knows of a good resource to study about configuring syslog I would be very grateful. Also, I can't add new VMs or anything, and I need this to run from the service console. I was initally thinking of using the perl command to make changes to the syslog file, but I wasn't sure exactly what needs to be changed. I'm using ESX 4.0 update 1 if that changes anything.

Thank you for the help.

Nick

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

This tutorial should help - http://beyondvm.com/tutorial-esx-4-0-syslog-configuration/, you can create a simple script that can be part of your kickstart script as a post configuration.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
5 Replies
lamw
Community Manager
Community Manager
Jump to solution

You can use vCLI, if you're familiar with the esxcfg-* commands on classic ESX Service Console, then these will be very familiar as the exact commands have been replicated using the remote CLI's and vSphere API.

You'll want to take a look at esxcfg-syslog to configure your systems and here is a great document by Dave on some examples - http://engineering.ucsb.edu/~duonglt/vmware/#vmware_rcli

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Kirizan
Contributor
Contributor
Jump to solution

Thank you for the quick answer. I'm sorry, I should have mentioned this, but I'm using ESX 4.0, not ESX 4i. Also, I do not have access to the vCLI (well, the installers who will utimately do the installs will not have access), so it all needs to be done with commands available directly on the ESX 4.0 service console. Some of the environments will be directly connected to the consol of the ESX server durring configuration, so they won't even have a windows/linux box to run the vCLI from.

0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

Whoops, long day, posted wrong reply.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

This tutorial should help - http://beyondvm.com/tutorial-esx-4-0-syslog-configuration/, you can create a simple script that can be part of your kickstart script as a post configuration.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
Kirizan
Contributor
Contributor
Jump to solution

Awesome, that is exactly what I was looking for. Thank you for the quick reply. I don't suppose you have any links on how to add logs to the syslog? I'm also interested in forwarding audit logs to the syslog server. Thank you for the help you've already given, have a great day.

-Nick

0 Kudos