zabbix_export: version: '5.4' date: '2021-11-21T21:57:58Z' groups: - uuid: 7df96b18c230490a9a0a9e2307226338 name: Templates templates: - uuid: 7109002605e24b5cb17e78c52f8ad1a4 template: Zimbra name: Zimbra description: | ## Overview É necessário habilitar o Allow root e o comando externo. Coleta status dos serviços, fila e spam. Adicionar ao Userparameter UserParameter=zimbra.mailq,/opt/zimbra/common/sbin/mailq | grep -v "Mail queue is empty" | grep -c '^[0-9A-Z]' UserParameter=zimbra.service.status,su - zimbra -c"zmcontrol status" > /tmp/zimbrastatus.txt UserParameter=zimbra.amavis.status,awk '/amavis/{print $2}' /tmp/zimbrastatus.txt UserParameter=zimbra.antispam.status,awk '/antispam/{print $2}' /tmp/zimbrastatus.txt UserParameter=zimbra.antivirus.status,awk '/antivirus/{print $2}' /tmp/zimbrastatus.txt UserParameter=zimbra.cbpolicyd.status,awk '/cbpolicyd/{print $2}' /tmp/zimbrastatus.txt UserParameter=zimbra.mailbox.status,awk '/mailbox/{print $2}' /tmp/zimbrastatus.txt UserParameter=zimbra.mta.status,awk '/mta/{print $2}' /tmp/zimbrastatus.txt UserParameter=zimbra.zmconfigd.status,awk '/zmconfigd/{print $2}' /tmp/zimbrastatus.txt UserParameter=zimbra.webmail.status,awk '/service webapp/{print $3}' /tmp/zimbrastatus.txt UserParameter=zimbra.webadm.status,awk '/zimbraAdmin/{print $3}' /tmp/zimbrastatus.txt UserParameter=zimbra.proxy.status,awk '/proxy/{print $2}' /tmp/zimbrastatus.txt UserParameter=zimbra.mailq.active,/opt/zimbra/libexec/zmqstat | grep active | cut -d= -f2 UserParameter=zimbra.mailq.corrupt,/opt/zimbra/libexec/zmqstat | grep corrupt | cut -d= -f2 UserParameter=zimbra.mailq.hold,/opt/zimbra/libexec/zmqstat | grep hold | cut -d= -f2 UserParameter=zimbra.mailq.deferred,/opt/zimbra/libexec/zmqstat | grep deferred | cut -d= -f2 UserParameter=zimbra.mailq.incoming,/opt/zimbra/libexec/zmqstat | grep incoming | cut -d= -f2 ## Author Carlos Eduardo groups: - name: Templates items: - uuid: 737ce331ed9c453997910b735db36103 name: 'Mail Report' key: 'system.run[/opt/zimbra/libexec/zmdailyreport > /tmp/report.txt]' delay: 0;h23m40 history: 180d trends: '0' value_type: TEXT description: 'Gera o relatório para análise do servidor de e-mails.' tags: - tag: Application value: Zimbra - uuid: ef0a1f2e45dc4bdb83a43a49f1dd2cc1 name: 'Bloqueio Lista b.barracudacentral.org' key: 'system.run[awk ''/blocked using b.barracudacentral.org/{print $5}'' /tmp/report.txt]' delay: 0;h23m50 description: 'Retorna quantidade de e-mails diários bloqueados pela lista b.barracudacentral.org.' preprocessing: - type: TRIM parameters: - ) tags: - tag: Application value: 'Anti Spam' - uuid: 291c4fea3cdf45a4b3f2e6964176eba5 name: 'Bloqueio Lista bl.spamcop.net' key: 'system.run[awk ''/blocked using bl.spamcop.net/{print $5}'' /tmp/report.txt]' delay: 0;h23m50 description: 'Retorna quantidade de e-mails diários bloqueados pela lista bl.spamcop.net.' preprocessing: - type: TRIM parameters: - ) tags: - tag: Application value: 'Anti Spam' - uuid: 4ba13026df544f988a0e5f513d2ad290 name: 'Bloqueio Lista dbl.spamhaus.org' key: 'system.run[awk ''/blocked using dbl.spamhaus.org/{print $5}'' /tmp/report.txt]' delay: 0;h23m50 description: 'Retorna quantidade de e-mails diários bloqueados pela lista dbl.spamhaus.org' preprocessing: - type: TRIM parameters: - ) tags: - tag: Application value: 'Anti Spam' - uuid: e9533872ea4a4ebd85dbcdc484de2590 name: 'Bloqueio Lista psbl.surriel.com' key: 'system.run[awk ''/blocked using psbl.surriel.com/{print $5}'' /tmp/report.txt]' delay: 0;h23m50 description: 'Retorna quantidade de e-mails diários bloqueados pela lista psbl.surriel.com.' preprocessing: - type: TRIM parameters: - ) tags: - tag: Application value: 'Anti Spam' - uuid: 2e8403351cfe494bbaedacc800931504 name: 'Bloqueio Lista zen.spamhaus.org' key: 'system.run[awk ''/blocked using zen.spamhaus.org/{print $5}'' /tmp/report.txt]' delay: 0;h23m50 description: 'Retorna quantidade de e-mails diários bloqueados pela lista zen.spamhaus.org' preprocessing: - type: TRIM parameters: - ) tags: - tag: Application value: 'Anti Spam' - uuid: a8dc2de0f7f14007950ccebc20ddefe1 name: 'Tamanho em Mega, dos e-mails enviados' key: 'system.run[awk ''/bytes delivered/{print $1}'' /tmp/report.txt]' delay: 0;h23m50 units: B preprocessing: - type: RTRIM parameters: - m - type: MULTIPLIER parameters: - '1000000' tags: - tag: Application value: E-mail - uuid: 41369a592d5549b4bbef401d96cdbff5 name: 'Tamanho em Mega, dos e-mails recebidos' key: 'system.run[awk ''/bytes received/{print $1}'' /tmp/report.txt]' delay: 0;h23m50 units: B preprocessing: - type: RTRIM parameters: - m - type: MULTIPLIER parameters: - '1000000' tags: - tag: Application value: E-mail - uuid: 4b0655b213074080ad6113ea87e43999 name: 'E-mails rejeitados pelo comando Helo - Host não encontrado' key: 'system.run[awk ''/Helo command rejected: Host not found/{print $8}'' /tmp/report.txt]' delay: 0;h23m50 description: 'Retorna quantidade de e-mails diários bloqueados por erro por comando Helo, pelo motivo de host não encontrado.' preprocessing: - type: RTRIM parameters: - ) tags: - tag: Application value: Erro - uuid: d2d54c1eea3f4ed3851085557eee21b7 name: 'E-mails rejeitados pelo comando Helo - Host não qualificado' key: 'system.run[awk ''/Helo command rejected: need fully-qualified hostname/{print $8}'' /tmp/report.txt]' delay: 0;h23m50 description: 'Retorna quantidade de e-mails diários bloqueados por erro por comando Helo, pelo motivo de need fully-qualified hostname.' preprocessing: - type: RTRIM parameters: - ) tags: - tag: Application value: Erro - uuid: 5db0d81a24ef4ba09383c433ef596f29 name: 'E-mails rejeitados' key: 'system.run[awk ''/rejected/{print $1}'' /tmp/report.txt]' delay: 0;h23m50 status: DISABLED description: 'Retorna quantidade de e-mails diários bloqueados por erro no reverso' preprocessing: - type: RTRIM parameters: - ) - type: RTRIM parameters: - time tags: - tag: Application value: 'Anti Spam' - uuid: 7013ef17664a4d4d9676d798b21e4978 name: 'Bloqueio de e-mail por inconsistência no reverso' key: 'system.run[awk ''/reverse hostname/{print $7}'' /tmp/report.txt]' delay: 0;h23m50 description: 'Retorna quantidade de e-mails diários bloqueados por erro no reverso' preprocessing: - type: TRIM parameters: - ) tags: - tag: Application value: 'Anti Spam' - uuid: e57decaaef38485a896e341d52321d1e name: 'Status Amavis Zimbra' key: zimbra.amavis.status delay: 3m history: 180d trends: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - Running - '0' error_handler: CUSTOM_VALUE error_handler_params: '1' tags: - tag: Application value: Zimbra triggers: - uuid: 93a2b5cf5de24c839233cf6771813fd0 expression: last(/Zimbra/zimbra.amavis.status)<>0 name: 'Serviço Amavis Parado' priority: HIGH - uuid: 3083d17286a24cb6a102f5863990de26 name: 'Status AntiSpam Zimbra' key: zimbra.antispam.status delay: 3m history: 180d trends: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - Running - '0' error_handler: CUSTOM_VALUE error_handler_params: '1' tags: - tag: Application value: Zimbra triggers: - uuid: 12e3b4abf1d242a787bcf958526e29ae expression: last(/Zimbra/zimbra.antispam.status)<>0 name: 'Serviço AntiSpam Parado' priority: HIGH - uuid: 4313258b064e47eaa8d8c24a80cae0c3 name: 'Status Antivírus Zimbra' key: zimbra.antivirus.status delay: 3m history: 180d trends: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - Running - '0' error_handler: CUSTOM_VALUE error_handler_params: '1' tags: - tag: Application value: Zimbra triggers: - uuid: 2e3afef0c2804cea8b36d25539db9f5d expression: last(/Zimbra/zimbra.antivirus.status)<>0 name: 'Serviço Antivírus Parado' priority: HIGH - uuid: b466c904b4284c578044b97367affc49 name: 'Status Cbpolicyd Zimbra' key: zimbra.cbpolicyd.status delay: 3m history: 180d trends: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - Running - '0' error_handler: CUSTOM_VALUE error_handler_params: '1' tags: - tag: Application value: Zimbra triggers: - uuid: a5a2c4a8fdca4f34ae678ab65bc96a3c expression: last(/Zimbra/zimbra.cbpolicyd.status)<>0 name: 'Serviço Cbpolicyd Parado' priority: HIGH - uuid: b3372dbfdedf4382b0109665f8d54121 name: 'Status Mailbox Zimbra' key: zimbra.mailbox.status delay: 3m history: 180d trends: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - Running - '0' error_handler: CUSTOM_VALUE error_handler_params: '1' tags: - tag: Application value: Zimbra triggers: - uuid: 50bc7fe57bb74cbfa1634b15a0558463 expression: last(/Zimbra/zimbra.mailbox.status)<>0 name: 'Serviço Mailbox Parado' priority: HIGH - uuid: 003bba6d71564c8da764b5e7bedcb129 name: 'Fila de e-mail geral' key: zimbra.mailq delay: 30s history: 1w tags: - tag: Application value: postifx triggers: - uuid: 7fa21b44c4d84804aa06f88216d1a497 expression: 'avg(/Zimbra/zimbra.mailq,5m)>1300' name: 'Sua fila de email precisa de sua atenção em {HOST.NAME}' priority: WARNING - uuid: 61dd4dcb5c4a47b2bcd026833a2a8669 name: 'Fila de e-mail ativa' key: zimbra.mailq.active history: 180d description: 'Quando as mensagens estão na fila, prontas para serem enviadas.' tags: - tag: Application value: Zimbra triggers: - uuid: 836fbf8693dc497a9fe8ff74035dd763 expression: 'avg(/Zimbra/zimbra.mailq.active,5m)>50' name: 'Envio incomum de e-mails detectado em {HOST.NAME}' priority: HIGH - uuid: 12131d877647400684672460feb6bdb6 name: 'Fila de e-mails corrompido' key: zimbra.mailq.corrupt history: 180d description: 'Quando a mensagem se encontra corrompida ou danificada.' tags: - tag: Application value: Zimbra - uuid: daa04b01632f47e48c38a02200f61dc7 name: 'Fila de e-mails não entregues' key: zimbra.mailq.deferred history: 180d description: 'Quando as mensagens não podem ser entregues, são colocadas nessa fila para que seja feita uma nova tentativa de reenvio. A quantidade de tentativas de reenvio vai depender da configuração do servidor' tags: - tag: Application value: Zimbra - uuid: 5abeda2b1cfb423b822a9a3af56754ae name: 'Fila de e-mails não processados' key: zimbra.mailq.hold history: 180d description: 'Quando as mensagens não podem mais ser processadas pelo servidor ficaram nesta fila, ate que o administrador altere-as.' tags: - tag: Application value: Zimbra - uuid: 8cc23c5e709540bbb0b0425e4e83141e name: 'Fila de e-mails entregues' key: zimbra.mailq.incoming history: 180d description: 'Quando o e-mail é entregue na caixa do usuário com sucesso.' tags: - tag: Application value: Zimbra - uuid: ba02f873bd3040b299caac81e4933b9c name: 'Status MTA Zimbra' key: zimbra.mta.status delay: 3m history: 180d trends: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - Running - '0' error_handler: CUSTOM_VALUE error_handler_params: '1' tags: - tag: Application value: Zimbra triggers: - uuid: 9504748322f64e6c955bec0bc24a560d expression: last(/Zimbra/zimbra.mta.status)<>0 name: 'Serviço MTA Parado' priority: HIGH - uuid: fa7664e8cc3c4dd69ea254603afaac02 name: 'Status Proxy Zimbra' key: zimbra.proxy.status delay: 3m history: 180d trends: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - Running - '0' error_handler: CUSTOM_VALUE error_handler_params: '1' tags: - tag: Application value: Zimbra triggers: - uuid: 35b486e7359645c8988d1f8d71c21a43 expression: last(/Zimbra/zimbra.proxy.status)<>0 name: 'Serviço Proxy Parado' priority: HIGH - uuid: 68cde43f27514197a649701b37eb6bbf name: 'Zimbra Status' key: zimbra.service.status delay: 3m history: 180d trends: '0' value_type: TEXT tags: - tag: Application value: Zimbra - uuid: e85d5ceb19d3408ab0af11ce8f7b2718 name: 'Status Admin Console Zimbra' key: zimbra.webadm.status delay: 3m history: 180d trends: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - Running - '0' error_handler: CUSTOM_VALUE error_handler_params: '1' tags: - tag: Application value: Zimbra triggers: - uuid: ff6d5f80d781444eb01667c3d4f022da expression: last(/Zimbra/zimbra.webadm.status)<>0 name: 'Serviço Admin Console Parado' priority: HIGH - uuid: dbd85d04d1cd45269e3b8875ce009d20 name: 'Status Serviço Webmail Zimbra' key: zimbra.webmail.status delay: 3m history: 180d trends: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - Running - '0' error_handler: CUSTOM_VALUE error_handler_params: '1' tags: - tag: Application value: Zimbra triggers: - uuid: d16434aa45fd4ea493e204e4fb5b5536 expression: last(/Zimbra/zimbra.webmail.status)<>0 name: 'Serviço Webmail Parado' priority: HIGH - uuid: 857fb5e38b6447cfa1de99edd74a811d name: 'Status Zmconfigd Zimbra' key: zimbra.zmconfigd.status delay: 3m history: 180d trends: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - Running - '0' error_handler: CUSTOM_VALUE error_handler_params: '1' tags: - tag: Application value: Zimbra triggers: - uuid: be6c592b44854960a8d551abbcd2cb9b expression: last(/Zimbra/zimbra.zmconfigd.status)<>0 name: 'Serviço Zmconfigd Parado' priority: HIGH graphs: - uuid: 1c104e4937a04c9fab0acadcf530d07a name: 'Anti Spam' graph_items: - color: 1A7C11 item: host: Zimbra key: 'system.run[awk ''/reverse hostname/{print $7}'' /tmp/report.txt]' - sortorder: '1' color: F63100 item: host: Zimbra key: 'system.run[awk ''/blocked using b.barracudacentral.org/{print $5}'' /tmp/report.txt]' - sortorder: '2' color: 2774A4 item: host: Zimbra key: 'system.run[awk ''/blocked using bl.spamcop.net/{print $5}'' /tmp/report.txt]' - sortorder: '3' color: A54F10 item: host: Zimbra key: 'system.run[awk ''/blocked using zen.spamhaus.org/{print $5}'' /tmp/report.txt]' - sortorder: '4' color: FC6EA3 item: host: Zimbra key: 'system.run[awk ''/blocked using dbl.spamhaus.org/{print $5}'' /tmp/report.txt]' - sortorder: '5' color: 6C59DC item: host: Zimbra key: 'system.run[awk ''/blocked using psbl.surriel.com/{print $5}'' /tmp/report.txt]' - sortorder: '6' color: AC8C14 item: host: Zimbra key: 'system.run[awk ''/Helo command rejected: need fully-qualified hostname/{print $8}'' /tmp/report.txt]' - uuid: a8f8cb76d5ff47c4ab92f9062eb3e6e9 name: 'Evolução da fila de emails' show_triggers: 'NO' graph_items: - color: 1A7C11 item: host: Zimbra key: zimbra.mailq.active - sortorder: '1' color: '000000' item: host: Zimbra key: zimbra.mailq.corrupt - sortorder: '2' color: FF0000 item: host: Zimbra key: zimbra.mailq.deferred - sortorder: '3' color: 26A69A item: host: Zimbra key: zimbra.mailq.hold - sortorder: '4' color: 0040FF item: host: Zimbra key: zimbra.mailq.incoming - uuid: c59c649c868c47628b20ea67b845098d name: 'Fila de E-mail' graph_items: - color: 1A7C11 item: host: Zimbra key: zimbra.mailq