nightwich
Contributor
Contributor

Changing ESXi Syslog from verbose

Hi all Gurus,

I have tring to change the default log level in ESXi 4.1.0 version 348481.

I already read a lot off stuff about the subject, but unfortunately I cannot get this accomplished.

Steps:

- Read this http://virtirl.com/?p=56 and this http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100479... .. etc ...

- Alter the configuration:

   <log>
      <!-- controls where rolling log files are stored -->
      <directory>/var/log/vmware/</directory>

      <!-- name of log file -->
      <name>hostd</name>

      <!-- controls whether logger sends its output to console also -->
      <outputToConsole>false</outputToConsole>

      <!-- If true, log to files on disk -->
      <outputToFiles>true</outputToFiles>

      <!-- default size(in bytes) of each log file before rolling over to next -->
      <maxFileSize>524288</maxFileSize>

      <!-- default number of log files to rotate amongst -->
      <maxFileNum>8</maxFileNum>

      <!-- default log level -->
      <level>none</level>

      <!-- If true, logs to syslog -->
      <outputToSyslog>true</outputToSyslog>

      <!-- syslog configuration.  Only used if outputToSyslog is true. -->
      <syslog>
         <!-- syslog identifier to use when logging -->
         <ident>Hostd</ident>

         <!-- syslog facility to use when logging -->
         <facility>local4</facility>
      </syslog>

   </log>

   <!-- Log level configuration (Rules are applied in order) -->
   <level id = "1">
      <logName> PropertyProvider </logName>
      <logLevel> info </logLevel>
      <prefix> false </prefix>
   </level>

   <level id = "2">
      <logName> SoapAdapter.HTTPService </logName>
      <logLevel> info </logLevel>
      <prefix> false </prefix>
   </level>

- Restart the hostd

- reboot the physical host

But I keep getting the info level in the /var/log/messages

I 'am open to ideas, any one have a clue what maybe the problem in this ?

Regards

0 Kudos
4 Replies
rwilliam
Contributor
Contributor

After making configuration changes, load the new configuration changes using the commnad:

esxcli system syslog reload.

0 Kudos
nightwich
Contributor
Contributor

Hi rwilliam

I try the command and I get:

/var/log # esxcli system syslog reload

Errors:

Unknown Namespace system

Althought I already try reboot the server it should reload everything !!.

Best regards

0 Kudos
admin
Immortal
Immortal


The reason why it is not updating is as per the tag provided by you:

<!-- default log level -->

      <level>none</level>

It should be

<!-- default log level -->

      <level>None</level>

Its case -sensitive.

0 Kudos
nightwich
Contributor
Contributor

Hi Aakash

I do not think it is case sensative:

http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.pg.doc_50%2FPG_ChA_Diagnostics...

But I try your "bet":

      <!-- default log level -->
      <level>None</level>

      <!-- If true, logs to syslog -->
      <outputToSyslog>true</outputToSyslog>

      <!-- syslog configuration.  Only used if outputToSyslog is true. -->
      <syslog>
         <!-- syslog identifier to use when logging -->
         <ident>Hostd</ident>

         <!-- syslog facility to use when logging -->
         <facility>local4</facility>
      </syslog>

   </log>

   <!-- Log level configuration (Rules are applied in order) -->
   <level id = "1">
      <logName> PropertyProvider </logName>
      <logLevel> None </logLevel>
      <prefix> false </prefix>
   </level>

   <level id = "2">
      <logName> SoapAdapter.HTTPService </logName>
      <logLevel> None </logLevel>
      <prefix> false </prefix>
   </level>

After change that I did:

- services.sh restart hostd

- kill -HUP $(cat /var/run/syslogd.pid)

But no changes I still get verbose and info messages in /var/log/messages:

/var/log # tail -100 messages | grep -i verbose

May 29 10:20:19 shell[558287]: tail -100 messages | grep -i verbose

May 29 10:24:30 Hostd: [2013-05-29 10:24:30.045 FFB8CE80 verbose 'Vmomi'] Arg version:

May 29 10:24:58 shell[558287]: tail -100 messages | grep -i verbose

/var/log # tail -100 messages | grep -i info

May 29 10:20:14 shell[558287]: tail -100 messages | grep -i info

May 29 10:24:30 Hostd: [2013-05-29 10:24:30.045 FFB8CE80 info 'Vmomi'] Activation [N5Vmomi10ActivationE:0x6f2d94c0] : Invoke done [waitForUpdates] on [vmodl.query.PropertyCollector:ha-property-collector]

May 29 10:24:30 Hostd: [2013-05-29 10:24:30.046 FFB8CE80 info 'Vmomi'] Throw vmodl.fault.RequestCanceled

May 29 10:24:30 Hostd: [2013-05-29 10:24:30.046 FFB8CE80 info 'Vmomi'] Result:

May 29 10:25:07 shell[558287]: tail -100 messages | grep -i info

Any ideas gurus in ESXi ? , I am getting very frustrated :S ...

0 Kudos