How to aggregate zimbra logs?


I want to aggregate zimbra logs from serveral servers. Here is an short example :

85C19C0506: removed
A4936C0506: client=unknown[]:55288
9DE10C0502:,[]:7025, delay=0.15, delays=0.01/0/0.02/0.12, dsn=2.1.5, status=sent (250 2.1.5 Delivery OK)
9DE10C0502: removed
A4936C0506:, size=3072, nrcpt=1 (queue active)
connect from localhost[]:48434
C5FB0C0502: client=localhost[]:48434
disconnect from unknown[]:55288
connect from unknown[]:48228
C5FB0C0502:, size=3274, nrcpt=1 (queue active)
disconnect from localhost[]:48434
A4936C0506:, relay=[]:10030, delay=0.2, delays=0.15/0/0/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C5FB0C0502)

Its exemple from one server. Sometimes one mail is processed on several servers. Flow on one server starts with some id, for example A4936C0506 (I call it ID_IN) and ends with the id it will start on the next server, for example C5FB0C0502 (ID_OUT). I want to aggregate only logs with ID_IN or ID_OUT. I want to create all flow how mail is processed. I have all grok pattern what i need. I can cut ID_IN or ID_IN and ID_OUT from one log. My idea is to assign a new id (UUID) ID_FLOW. One log in -> grok -> logstash (with elasticsearch plugin) looking (60s) back id IN or OUT -> if old log have ID_FLOW than copy this to your ID_FLOW else create new ID_FLOW.

Generelly I want to create mail processing flow form all servers.

Ok. Time to explain what i have.

Logstash :

if [ID_IN] {

	elasticsearch {
                    hosts => ["localhost:9200"]
		query => "@timestamp:[now-60s TO now] AND (ID_IN:%{[ID_IN]} OR ID_OUT:%{[ID_IN]})"
	if [] {
		uuid {
			target => "ID_Flow"

I was stuck in this place :smiley:

Please.. Help me to resolve this problem :smiley:


Stuck how/why?

if [] {


I dont know how to write it.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.