Results 1 to 4 of 4

Thread: [SOLVED] After zmsetservername - old stats gone

  1. #1
    Join Date
    Apr 2008
    Location
    Seattle
    Posts
    37
    Rep Power
    7

    Default [SOLVED] After zmsetservername - old stats gone

    I recently changed my ZCS server (ZCS 5.0.11 on CentOS 5) host name from mail2.domain.com to mail.domain.com using zmsetservername and instructions on the wiki. All went well, and everything worked again after the changes. My server is creating new data in the graphs of the server statistics admin page, but all of the old data that was generated as the old host name is not showing. I assume this is because the old server name is associated with the old data, but the system queries for data belonging to the new hostname.

    Where do I go and what do I do to associate the old data to the new server name so that it will be reflected in the graphs? Is that data in the database, or is it in files in the logger directory?

    Thanks

  2. #2
    Join Date
    Dec 2007
    Location
    Ypsilanti, MI
    Posts
    145
    Rep Power
    7

    Default

    You'll have to update all the tables manually in the zimbra_logger database to reflect the name change.

    The tables are:

    +-------------------------+
    | Tables_in_zimbra_logger |
    +-------------------------+
    | amavis |
    | amavis_aggregate |
    | config |
    | disk_aggregate |
    | disk_status |
    | mta |
    | mta_aggregate |
    | processing_history |
    | raw_logs |
    | service_status |
    +-------------------------+

    So you'll need to do something like:

    zimbra@mail:~> logmysql zimbra_logger
    mysql> update `amavis` set host='newhostname' where host='oldhostname';

    for each of the tables. You should probably do something like:

    mysql> select * from `amavis` limit 1\G

    to find out what the old hostname is set to so that you set the new hostname similarly. Likely the hostname will be just the name, without the domain, of your system. So if your system is mail.domain.com the host field will have mail.

  3. #3
    Join Date
    Apr 2008
    Location
    Seattle
    Posts
    37
    Rep Power
    7

    Default

    Thanks Tonster, that worked. Here are the specific sql commands for each table:

    These are the tables that needed alteration:
    amavis: update amavis set host='mail' where host='mail2';
    amavis_aggregate: update amavis_aggregate set host='mail' where host='mail2';
    disk_aggregate: update disk_aggregate set host='mail.domain.com' where host='mail2.domain.com';
    disk_status: update disk_status set server='mail.domain.com' where server='mail2.domain.com';
    mta: update mta set host='mail' where host='mail2';
    mta_aggregate: update mta_aggregate set host='mail' where host='mail2';

    These tables needed no alteration:
    config
    processing_history
    service_status
    raw_logs (I ran update raw_logs set loghost='mail' where loghost='mail2'; but no rows were changed.)

    All old stats showed up after making these alterations.
    Last edited by warmbowski; 04-09-2009 at 11:07 AM.

  4. #4
    Join Date
    Apr 2008
    Location
    Seattle
    Posts
    37
    Rep Power
    7

    Default

    One additional note.

    For some reason my aggregate tables all had a mix of mail2 and mail2.domain.com under the host field. so I had to run the update twice for each aggregate table such as:

    update amavis_aggregate set host='mail' where host='mail2';
    update amavis_aggregate set host='mail.domain.com' where host='mail2.domain.com';

Similar Threads

  1. stats changed from running to stopped
    By maumar in forum Administrators
    Replies: 5
    Last Post: 03-03-2011, 12:33 AM
  2. stats service stopped
    By tiger2000 in forum Administrators
    Replies: 0
    Last Post: 07-31-2008, 08:06 PM
  3. stats Stopped but not really
    By mcesari in forum Administrators
    Replies: 0
    Last Post: 01-29-2008, 08:29 AM
  4. Web client logon fails (INVALID_PDU)
    By jermxx in forum Installation
    Replies: 8
    Last Post: 02-20-2007, 02:20 PM
  5. Tomcat broken after upgrade to 4
    By dotslashroot in forum Migration
    Replies: 13
    Last Post: 01-31-2007, 06:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •