Configuring-Logger-Host: Difference between revisions

m (Protected "Configuring-Logger-Host": Excessive spamming (‎[edit=sysop] (indefinite) ‎[move=sysop] (indefinite)) [cascading])
No edit summary
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{BC|Community Sandbox}}
__FORCETOC__
<div class="col-md-12 ibox-content">
=Configuring Logger Host=
{{KB|{{Unsupported}}|{{ZCS 8.0}}|{{ZCS 7.0}}|}}
{{WIP}}
== First, Know What OS Logger Service Your Using ==
Options might be: rsyslog, syslog-ng, or syslog . The steps below will differ depending on the OS logger service your using.
Should be easy as doing [Example is from Centos test box] :
[zimbra@mail-172 ~]$ ps -ef | grep syslog
root      1299    1  0 May15 ?        00:01:14 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
zimbra  19789 13112  0 10:42 pts/1    00:00:00 grep syslog
[zimbra@mail-172 ~]$ ls /etc/sysconfig/*log*
/etc/sysconfig/mcelogd  /etc/sysconfig/rsyslog
== Below are the steps to configure logger monitor host in ZCS multi-server setup ==
== Below are the steps to configure logger monitor host in ZCS multi-server setup ==


Line 10: Line 29:
'''Run as root user'''  
'''Run as root user'''  


/opt/zimbra/libexec/zmfixperms -e -v
We need to enable a module for remote logging in logger host, below changes fixes this issue.
 
Edit the rsyslog config file "/etc/rsyslog.conf" and enable "imudp" module by uncommenting the same.
'''On the logger monitor host, you must enable syslog to log statistics from remote machines'''
 
  a. Edit the /etc/sysconfig/syslog file, add -r to the SYSLOGD_OPTIONS setting,  SYSLOGD_options=”-r -m 0”
 
  b. /opt/zimbra/libexec/zmsyslogsetup
 
  b. Stop the syslog daemon. Type /etc/init.d/syslogd stop.
 
  c. Start the syslog daemon. Type /etc/init.d/syslogd start.
 
 
'''If You are using rsyslog instead of syslog, then you will need below change in rsyslog config.'''
 
'''we need to enable a module for remote logging in logger host, below changes fixes this issue.'''
 
'''We need to edit the rsyslog config file "/etc/rsyslog.conf" and enable "imudp" module by uncommenting the same.'''


  $ModLoad imudp
  $ModLoad imudp
  $UDPServerRun 514
  $UDPServerRun 514


'''After the above change restart rsyslog service.'''
After the above change restart rsyslog service and check the status.
 
  systemctl restart rsyslog.service
  su - zimbra
  systemctl status rsyslog.service
  zmcontrol start
 
/opt/zimbra/libexec/zmloggerinit
 
/opt/zimbra/bin/zmsshkeygen


  /opt/zimbra/bin/zmupdateauthkeys
On each server, as root, type /opt/zimbra/libexec/zmsyslogsetup. This enables the server to display statistics.
  /opt/zimbra/libexec/zmsyslogsetup


'''Verify the LogHostname using below commands. (it should be set to name of  logger monitor host on all servers)'''
Verify the LogHostname using below commands. (it should be set to name of  logger monitor host on all servers)


  zmprov gacf |grep zimbraLogHostname
  zmprov gacf |grep zimbraLogHostname


'''If its different, change the same to logger monitor hostname using below command.'''
If its different, change the same to logger monitor hostname using below command.


  zmprov mcf zimbraLogHostname <Logger monitor Hostname>
  zmprov mcf zimbraLogHostname <Logger monitor Hostname>
Once the loggerhost name changed, initialize the logger host and restart rsyslog service
/opt/zimbra/libexec/zmloggerinit
systemctl restart rsyslog.service


'''On all other servers:  (if you have multiple zimbra servers in your setup)'''
On all other servers:  (if you have multiple zimbra servers in your setup)


'''Verify the LogHostname using below commands. (it should be set to name of  logger monitor host on all servers)'''
Verify the LogHostname using below commands. (it should be set to name of  logger monitor host on all servers)


  su - zimbra
  su - zimbra
  zmprov gacf |grep zimbraLogHostname   
  zmprov gacf |grep zimbraLogHostname   


'''If its different, change the same to Logger monitor Host using below command.'''
If the above steps didn't help to change loggerhost, then try deleting old logger host map & create a new logger host map using below script.
 
/opt/zimbra/bin/zmloggerhostmap -h
'''Usage: zmloggerhostmap [-adh] <dns_hostname> <zm_hostname>'''
  -a        - create a new host mapping
  -d        - delete a host mapping (specify both names to prevent accidents)
  -h        - show this help
 
'''Example:'''
 
[zimbra@zcs8 ~]$ hostname -f
zcs8.zcsvin.com
[zimbra@zcs8 ~]$ zmhostname
zcs8.zcsvin.com
[zimbra@zcs8 ~]$ /opt/zimbra/bin/zmloggerhostmap -a zcs8.zcsvin.com zcs8.zcsvin.com 2>&1
Added mapping for zcs8.zcsvin.com to zcs8.zcsvin.com
[zimbra@zcs8 ~]$


zmprov mcf zimbraLogHostname <Logger monitor Hostname>
== Note: Do not change default date/time format template in RSYSLOG configuration ==
Sites using rsyslog should make sure '''"$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat"''' is included in rsyslog.conf. This changes the timezone format from rsyslog's default to the standard syslog format. If this is not set, the logger systems will not be able to parse the syslog data correctly, and message traffic data will not appear and Admin Console will show "services are not running" for all services.


/opt/zimbra/bin/zmsshkeygen
{{Article Footer|Zimbra Collaboration 8.0, 7.0|04/16/2014}}
/opt/zimbra/bin/zmupdateauthkeys ; exit
/opt/zimbra/libexec/zmsyslogsetup (run as root user)
service syslog restart
service rsyslog restart
su - zimbra
zmcontrol restart

Latest revision as of 18:12, 13 October 2022

Configuring Logger Host

   KB 20480        Last updated on 2022-10-13  




0.00
(0 votes)

First, Know What OS Logger Service Your Using

Options might be: rsyslog, syslog-ng, or syslog . The steps below will differ depending on the OS logger service your using.

Should be easy as doing [Example is from Centos test box] :

[zimbra@mail-172 ~]$ ps -ef | grep syslog
root      1299     1  0 May15 ?        00:01:14 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
zimbra   19789 13112  0 10:42 pts/1    00:00:00 grep syslog
[zimbra@mail-172 ~]$ ls /etc/sysconfig/*log*
/etc/sysconfig/mcelogd  /etc/sysconfig/rsyslog

Below are the steps to configure logger monitor host in ZCS multi-server setup

Note: run below steps in non-peak hours during scheduled downtime.

Run on logger monitor Host:

su - zimbra
zmcontrol stop ; exit

Run as root user

We need to enable a module for remote logging in logger host, below changes fixes this issue. Edit the rsyslog config file "/etc/rsyslog.conf" and enable "imudp" module by uncommenting the same.

$ModLoad imudp
$UDPServerRun 514

After the above change restart rsyslog service and check the status.

systemctl restart rsyslog.service
systemctl status rsyslog.service

On each server, as root, type /opt/zimbra/libexec/zmsyslogsetup. This enables the server to display statistics.

/opt/zimbra/libexec/zmsyslogsetup

Verify the LogHostname using below commands. (it should be set to name of logger monitor host on all servers)

zmprov gacf |grep zimbraLogHostname

If its different, change the same to logger monitor hostname using below command.

zmprov mcf zimbraLogHostname <Logger monitor Hostname>

Once the loggerhost name changed, initialize the logger host and restart rsyslog service

/opt/zimbra/libexec/zmloggerinit 
systemctl restart rsyslog.service

On all other servers: (if you have multiple zimbra servers in your setup)

Verify the LogHostname using below commands. (it should be set to name of logger monitor host on all servers)

su - zimbra
zmprov gacf |grep zimbraLogHostname  

If the above steps didn't help to change loggerhost, then try deleting old logger host map & create a new logger host map using below script.

/opt/zimbra/bin/zmloggerhostmap -h

Usage: zmloggerhostmap [-adh] <dns_hostname> <zm_hostname>

 -a        - create a new host mapping
 -d        - delete a host mapping (specify both names to prevent accidents)
 -h        - show this help

Example:

[zimbra@zcs8 ~]$ hostname -f
zcs8.zcsvin.com
[zimbra@zcs8 ~]$ zmhostname
zcs8.zcsvin.com
[zimbra@zcs8 ~]$ /opt/zimbra/bin/zmloggerhostmap -a zcs8.zcsvin.com zcs8.zcsvin.com 2>&1
Added mapping for zcs8.zcsvin.com to zcs8.zcsvin.com
[zimbra@zcs8 ~]$

Note: Do not change default date/time format template in RSYSLOG configuration

Sites using rsyslog should make sure "$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat" is included in rsyslog.conf. This changes the timezone format from rsyslog's default to the standard syslog format. If this is not set, the logger systems will not be able to parse the syslog data correctly, and message traffic data will not appear and Admin Console will show "services are not running" for all services.

Verified Against: Zimbra Collaboration 8.0, 7.0 Date Created: 04/16/2014
Article ID: https://wiki.zimbra.com/index.php?title=Configuring-Logger-Host Date Modified: 2022-10-13



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search