From 0c8a8a0499095ef321718cd40c39a54c056df9ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Toledo?= Date: Sun, 4 Jan 2026 18:46:43 -0300 Subject: [PATCH] feat: Add Zabbix Gold Standard template for pfSense monitoring via SNMP. --- .../template_pfsense_hybrid_gold.yaml | 790 ++++++++++++------ 1 file changed, 517 insertions(+), 273 deletions(-) diff --git a/templates_gold/pfsense_hybrid_snmp_agent/template_pfsense_hybrid_gold.yaml b/templates_gold/pfsense_hybrid_snmp_agent/template_pfsense_hybrid_gold.yaml index 5430d71..95ced80 100644 --- a/templates_gold/pfsense_hybrid_snmp_agent/template_pfsense_hybrid_gold.yaml +++ b/templates_gold/pfsense_hybrid_snmp_agent/template_pfsense_hybrid_gold.yaml @@ -4,28 +4,90 @@ zabbix_export: - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6 name: Templates/Applications templates: - - uuid: 8b9d4a6df0b6499d9d891ddc33ab70dd + - uuid: 05b29f6748b34f4ab8a3930d8b064f94 template: PFSense by SNMP name: PFSense by SNMP - description: | - Template para monitoramento do pfSense via SNMP - Configuração: - 1. Habilite o daemon SNMP em Services na interface web do pfSense: https://docs.netgate.com/pfsense/en/latest/services/snmp.html - 2. Configure a regra de firewall para permitir acesso do Zabbix Proxy/Server via SNMP: https://docs.netgate.com/pfsense/en/latest/firewall/index.html#managing-firewall-rules - 3. Associe o template ao host. - - MIBs usadas: - BEGEMOT-PF-MIB - HOST-RESOURCES-MIB - - Gerado originalmente pela ferramenta oficial "Templator", Otimizado para Padrão Gold (Arthur) + description: "Template para monitoramento do pfSense via SNMP\nConfiguração:\n 1. Habilite o daemon SNMP em Services na interface web do pfSense: https://docs.netgate.com/pfsense/en/latest/services/snmp.html\n 2. Configure a regra de firewall para permitir acesso do Zabbix Proxy/Server via SNMP: https://docs.netgate.com/pfsense/en/latest/firewall/index.html#managing-firewall-rules\n 3. Associe o template ao host.\n\nMIBs usadas:\nBEGEMOT-PF-MIB\nHOST-RESOURCES-MIB\n\nGerado originalmente pela ferramenta oficial \"Templator\", Otimizado para Padrão Gold (Arthur)\n" vendor: name: Zabbix version: 7.0-2 groups: - name: Templates/Applications + macros: + - macro: '{$VPN.S2S.PATTERN}' + value: '^S2S_' + description: 'Regex para identificar túneis Site-to-Site pelo nome (CN).' + - macro: '{$VPN.DATA.LIMIT}' + value: '10737418240' + description: 'Limite de Download (10GB) para alerta de Exfiltração.' + - macro: '{$VPN.WORK.START}' + value: '080000' + description: 'Início do expediente (HHMMSS).' + - macro: '{$VPN.WORK.END}' + value: '180000' + description: 'Fim do expediente (HHMMSS).' + - macro: '{$VPN.ZOMBIE.LIMIT}' + value: '86400' + description: 'Tempo máximo de conexão (24h) para alerta de Sessão Zumbi.' + - macro: '{$IF.ERRORS.WARN}' + value: '2' + description: Limiar de taxa de pacotes com erro para disparo de alerta. Pode ser usado com contexto de nome de interface. + - macro: '{$IF.DISCARDS.WARN}' + value: '10' + description: Limiar de descartes de pacotes por segundo que dispara alertas de congestionamento. + - macro: '{$PF.FRAG.MAX}' + value: '100' + description: Limite de pacotes fragmentados por segundo que indica MTU ou ataque. + - macro: '{$IF.UTIL.MAX}' + value: '90' + description: Limiar de utilização de banda da interface para alerta (%). Pode ser usado com contexto de nome de interface. + - macro: '{$IFCONTROL}' + value: '1' + description: Macro para controle de estado operacional da interface (trigger de link down). Valor 1 = monitorar, 0 = ignorar. Pode ser usado com contexto de nome de interface. + - macro: '{$NET.IF.IFADMINSTATUS.MATCHES}' + value: ^.* + description: Filtro de descoberta de interfaces de rede (status administrativo). + - macro: '{$NET.IF.IFADMINSTATUS.NOT_MATCHES}' + value: ^2$ + description: Ignora interfaces com status administrativo down(2). + - macro: '{$NET.IF.IFALIAS.MATCHES}' + value: .* + description: Filtro de descoberta de interfaces de rede (alias). + - macro: '{$NET.IF.IFALIAS.NOT_MATCHES}' + value: CHANGE_IF_NEEDED + description: Filtro de descoberta de interfaces de rede (alias - exclusão). + - macro: '{$NET.IF.IFDESCR.MATCHES}' + value: .* + description: Filtro de descoberta de interfaces de rede (descrição). + - macro: '{$NET.IF.IFDESCR.NOT_MATCHES}' + value: CHANGE_IF_NEEDED + description: Filtro de descoberta de interfaces de rede (descrição - exclusão). + - macro: '{$NET.IF.IFNAME.NOT_MATCHES}' + value: (^pflog[0-9.]*$|^pfsync[0-9.]*$) + description: Filtro de descoberta de interfaces de rede (nome - exclusão). Ignora pflog e pfsync. + - macro: '{$NET.IF.IFOPERSTATUS.MATCHES}' + value: ^.*$ + description: Filtro de descoberta de interfaces de rede (status operacional). + - macro: '{$NET.IF.IFOPERSTATUS.NOT_MATCHES}' + value: ^6$ + description: Ignora interfaces com status operacional notPresent(6). + - macro: '{$NET.IF.IFTYPE.MATCHES}' + value: .* + description: Filtro de descoberta de interfaces de rede (tipo de interface). + - macro: '{$NET.IF.IFTYPE.NOT_MATCHES}' + value: CHANGE_IF_NEEDED + description: Filtro de descoberta de interfaces de rede (tipo - exclusão). + - macro: '{$SNMP.TIMEOUT}' + value: 5m + description: Intervalo de tempo para considerar SNMP indisponível. + - macro: '{$SOURCE.TRACKING.TABLE.UTIL.MAX}' + value: '90' + description: Limiar de utilização da tabela de rastreamento de origem (%). + - macro: '{$STATE.TABLE.UTIL.MAX}' + value: '90' + description: Limiar de utilização da tabela de estados (%). items: - - uuid: 4250f40956f940d69079a8f7b6329be3 + - uuid: e2a65d09f0d04f87a22b48754d52d219 name: 'Coleta Raw (SNMP): Interfaces de Rede PF' type: SNMP_AGENT snmp_oid: walk[1.3.6.1.4.1.12325.1.200.1.8.2] @@ -33,10 +95,7 @@ zabbix_export: history: '0' value_type: TEXT trends: '0' - description: | - MIB: BEGEMOT-PF-MIB - Coleta bruta (Walk) da tabela pfInterfacesIfTable. - Dados usados para a Descoberta (LLD) de interfaces de rede. + description: "MIB: BEGEMOT-PF-MIB\nColeta bruta (Walk) da tabela pfInterfacesIfTable. \nDados usados para a Descoberta (LLD) de interfaces de rede.\n" preprocessing: - type: SNMP_WALK_TO_JSON parameters: @@ -97,7 +156,7 @@ zabbix_export: tags: - tag: component value: raw - - uuid: 89f2ab4b91bc454582d5b8b0ec9e6377 + - uuid: 43ef5151237d4bd48428b26cd389042d name: 'Coleta Raw (SNMP): Interfaces de Rede (IF-MIB)' type: SNMP_AGENT snmp_oid: walk[1.3.6.1.2.1.2.2.1.8,1.3.6.1.2.1.2.2.1.7,1.3.6.1.2.1.31.1.1.1.18,1.3.6.1.2.1.31.1.1.1.1,1.3.6.1.2.1.2.2.1.2,1.3.6.1.2.1.2.2.1.3,1.3.6.1.2.1.31.1.1.1.6,1.3.6.1.2.1.31.1.1.1.10,1.3.6.1.2.1.2.2.1.14,1.3.6.1.2.1.2.2.1.20,1.3.6.1.2.1.2.2.1.19,1.3.6.1.2.1.2.2.1.13,1.3.6.1.2.1.31.1.1.1.15] @@ -109,16 +168,15 @@ zabbix_export: tags: - tag: component value: raw - - uuid: 2b599a29de0e4e239d26996666b34544 + - uuid: d6873f4b275c40c18d2ef512b102e382 name: Status do servidor DHCP - type: DEPENDENT key: pfsense.dhcpd.status delay: '0' description: 'MIB: HOST-RESOURCES-MIB - + Status do processo do servidor DHCP. - + ' valuemap: name: Services status @@ -134,7 +192,7 @@ zabbix_export: - tag: component value: application triggers: - - uuid: f34f5b824d5342d49cc20c3378444535 + - uuid: 014a4a17d96f457da8ba701de62fcb4f expression: last(/PFSense by SNMP/pfsense.dhcpd.status)=0 name: '🚨 DHCP Parado: Servidor DHCP não está em execução' event_name: '🚨 DHCP Parado em {HOST.NAME}: O serviço dhcpd retornou status {ITEM.LASTVALUE}' @@ -144,16 +202,15 @@ zabbix_export: tags: - tag: scope value: availability - - uuid: 689942c8f6114886b1ff66fa2ab14f17 + - uuid: 827033dc86ab45bfa46b5c6d7552b315 name: Status do servidor DNS - type: DEPENDENT key: pfsense.dns.status delay: '0' description: 'MIB: HOST-RESOURCES-MIB - + Status do processo do servidor DNS. - + ' valuemap: name: Services status @@ -169,7 +226,7 @@ zabbix_export: - tag: component value: application triggers: - - uuid: 008b94a2d82547ae9d164e4df3c2e3dd + - uuid: 471d897f345b4bfbb4d1c77362739a2b expression: last(/PFSense by SNMP/pfsense.dns.status)=0 name: '🚨 DNS Parado: Servidor DNS (Unbound) não está em execução' event_name: '🚨 DNS Parado em {HOST.NAME}: O serviço unbound retornou status {ITEM.LASTVALUE}' @@ -179,16 +236,15 @@ zabbix_export: tags: - tag: scope value: availability - - uuid: 9d05bdcd10e549dc9c505f3e4dd3858d + - uuid: 10e3a5669abb44b196d17e2bee0fa206 name: Estado do processo Nginx (Web) - type: DEPENDENT key: pfsense.nginx.status delay: '0' description: 'MIB: HOST-RESOURCES-MIB - + Status do processo do Nginx. - + ' valuemap: name: Services status @@ -204,7 +260,7 @@ zabbix_export: - tag: component value: application triggers: - - uuid: c024aae3d3cb45f1885025be18bfe4e9 + - uuid: fc1696e914e049e5a7df88d07aeff03c expression: last(/PFSense by SNMP/pfsense.nginx.status)=0 name: '🚨 WebServer Parado: Nginx não está rodando' event_name: '🚨 WebServer Parado em {HOST.NAME}: O serviço nginx retornou status {ITEM.LASTVALUE}' @@ -214,9 +270,8 @@ zabbix_export: tags: - tag: scope value: availability - - uuid: 6aba34e30fb74303ba8488411c021e21 + - uuid: 279896526ea349a1afd73d58c5ac68c5 name: Pacotes com offset incorreto (Bad Offset) - type: DEPENDENT key: pfsense.packets.bad.offset delay: '0' @@ -240,9 +295,8 @@ zabbix_export: tags: - tag: component value: network - - uuid: 9ae66cc7888d424badc37778fdca9641 + - uuid: ca13b4cd9a794cd38a933382ffcf1303 name: Pacotes Fragmentados - type: DEPENDENT key: pfsense.packets.fragment delay: '0' @@ -267,24 +321,26 @@ zabbix_export: - tag: component value: network triggers: - - uuid: d8e447dd82774baaabf05c67a93fe184 - expression: 'min(/PFSense by SNMP/pfsense.packets.fragment,5m)>{$PF.FRAG.MAX}' + - uuid: ff9f3a0bfdd94d8b89f9771b9cb76849 + expression: min(/PFSense by SNMP/pfsense.packets.fragment,5m)>{$PF.FRAG.MAX} recovery_mode: RECOVERY_EXPRESSION - recovery_expression: 'max(/PFSense by SNMP/pfsense.packets.fragment,5m)<{$PF.FRAG.MAX}*0.5' - name: '🧩 Fragmentação Excessiva IPv4' + recovery_expression: max(/PFSense by SNMP/pfsense.packets.fragment,5m)<{$PF.FRAG.MAX}*0.5 + name: 🧩 Fragmentação Excessiva IPv4 event_name: '🧩 Fragmentação Excessiva em {HOST.NAME}: {ITEM.LASTVALUE}/s (Limite: {$PF.FRAG.MAX}/s)' opdata: 'Taxa: {ITEM.LASTVALUE}/s' priority: WARNING - description: | - Alta taxa de fragmentação de pacotes IPv4. + description: 'Alta taxa de fragmentação de pacotes IPv4. + Causas comuns: MTU mal configurado na WAN, Path MTU Discovery bloqueado, ou tentativa de evasão de IDS/IPS. + Verifique: System > Advanced > Networking > "Disable Scrub" e configurações de MTU. + + ' tags: - tag: scope value: security - - uuid: 06bcab7f0d0148ca8223d69e583067a7 + - uuid: 403697863f564e6bad6f09cb3bde48ac name: Pacotes correspondentes a uma regra de filtro - type: DEPENDENT key: pfsense.packets.match delay: '0' @@ -309,26 +365,28 @@ zabbix_export: - tag: component value: network triggers: - - uuid: 45677f3de5b7471c8896c6858413d66d - expression: 'min(/PFSense by SNMP/pfsense.packets.match,5m)>avg(/PFSense by SNMP/pfsense.packets.match,1h)*3' + - uuid: 7e634c0b00a647d68e4bea916dd3d42b + expression: min(/PFSense by SNMP/pfsense.packets.match,5m)>avg(/PFSense by SNMP/pfsense.packets.match,1h)*3 recovery_mode: RECOVERY_EXPRESSION - recovery_expression: 'max(/PFSense by SNMP/pfsense.packets.match,5m) System Logs > Firewall. + + ' tags: - tag: scope value: security - tag: type value: anomaly - - uuid: 853f19894a904c95805d9a6a14255c1d + - uuid: b775071904fb494c846b3dd37dc951b9 name: Pacotes descartados por limite de memória - type: DEPENDENT key: pfsense.packets.mem.drop delay: '0' @@ -352,9 +410,8 @@ zabbix_export: tags: - tag: component value: network - - uuid: e165d49de28c4310a593e3ccaf57fe22 + - uuid: 1e050409f84040bb8950e113c428177c name: Pacotes Normalizados - type: DEPENDENT key: pfsense.packets.normalize delay: '0' @@ -378,9 +435,8 @@ zabbix_export: tags: - tag: component value: network - - uuid: 69cf54ef6abf4caea72d87e924755a30 + - uuid: d774954a835e49be9322d2e11fa254c9 name: Pacotes Curtos (Short Packets) - type: DEPENDENT key: pfsense.packets.short delay: '0' @@ -404,9 +460,8 @@ zabbix_export: tags: - tag: component value: network - - uuid: 48e6ce30566940f5bd641b6eea094f8f + - uuid: 59476388a4c745b998f4f93fbcc61fa9 name: Status de execução do Packet Filter - type: SNMP_AGENT snmp_oid: get[1.3.6.1.4.1.12325.1.200.1.1.1.0] key: pfsense.pf.status @@ -423,17 +478,16 @@ zabbix_export: - tag: component value: health triggers: - - uuid: b3fa1cafe76d4613bf8fdb191b9f3573 + - uuid: e9f25a8cd5da4a0ea801b2528816a04c expression: last(/PFSense by SNMP/pfsense.pf.status)<>1 name: '🚨 Firewall Desligado: Packet Filter inativo' opdata: 'Estado Atual: {ITEM.LASTVALUE1}' priority: HIGH description: O Packet Filter (Firewall) está desligado. O sistema está vulnerável ou agindo apenas como roteador. - tags: - tag: scope value: availability - - uuid: 505fc903500b4114b931c1bb1b7214f4 + - uuid: 80febc02c284406cbcd74b4d7a4d9cf5 name: 'Coleta Raw (SNMP): Contadores PF (pfCounter)' type: SNMP_AGENT snmp_oid: walk[1.3.6.1.4.1.12325.1.200.1.2] @@ -441,16 +495,18 @@ zabbix_export: history: '0' value_type: TEXT trends: '0' - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Coleta bruta (Walk) dos contadores PF (pfCounter). + Dados usados para itens dependentes de contagem. + + ' tags: - tag: component value: raw - - uuid: a65556255e1947c580a14bb67e27ab24 + - uuid: 9173404e36144515b0a4ec65e86a7811 name: Contagem de regras de Firewall - type: SNMP_AGENT snmp_oid: get[1.3.6.1.4.1.12325.1.200.1.11.1.0] key: pfsense.rules.count @@ -462,9 +518,8 @@ zabbix_export: tags: - tag: component value: firewall - - uuid: f4b2e5693e814766a8e1f88080acae00 + - uuid: b32fedd2fa2b4f80a88ffafc8206e431 name: 'Tabela de Rastreamento: Origens Atuais (Source Tracking)' - type: SNMP_AGENT snmp_oid: get[1.3.6.1.4.1.12325.1.200.1.4.1.0] key: pfsense.source.tracking.table.count @@ -476,9 +531,8 @@ zabbix_export: tags: - tag: component value: network - - uuid: 9992d298bee242159f79a379ee0734f3 + - uuid: 7ba4b4e710e24585b908e012fcd14c17 name: 'Tabela de Rastreamento: Limite (Limit)' - type: SNMP_AGENT snmp_oid: get[1.3.6.1.4.1.12325.1.200.1.5.2.0] key: pfsense.source.tracking.table.limit @@ -490,9 +544,8 @@ zabbix_export: tags: - tag: component value: network - - uuid: 6f3524a9f8d64a91bf45229ec90f35e9 + - uuid: 15bfda94b7a442ed8af39493714586f8 name: 'Tabela de Rastreamento: Utilização (%)' - type: CALCULATED key: pfsense.source.tracking.table.pused value_type: FLOAT @@ -503,34 +556,34 @@ zabbix_export: - tag: component value: network triggers: - - uuid: 03a215cbb0eb4bc1a5933e512d2706ee + - uuid: 928bd977d97a4d478bd73c9e7d969ef6 expression: min(/PFSense by SNMP/pfsense.source.tracking.table.pused,#3)>{$SOURCE.TRACKING.TABLE.UTIL.MAX} name: '⚠️ Tabela de Rastreamento Cheia: Uso elevado ({ITEM.LASTVALUE1}%)' event_name: '⚠️ Tabela de Rastreamento Cheia: Uso acima de {$SOURCE.TRACKING.TABLE.UTIL.MAX}%' opdata: 'Utilização Atual: {ITEM.LASTVALUE1}' priority: WARNING description: Verifique o número de sticky connections. https://docs.netgate.com/pfsense/en/latest/monitoring/status/firewall-states-sources.html - tags: - tag: scope value: capacity - - uuid: 330293a920c0446fbc5fac7bd19c9030 - expression: 'timeleft(/PFSense by SNMP/pfsense.source.tracking.table.pused,1h,100)<1h' - name: '⏳ Source Tracking cheia em < 1h (Previsão)' + - uuid: d01d68e0b68744a9b649ef19f8a68f8b + expression: timeleft(/PFSense by SNMP/pfsense.source.tracking.table.pused,1h,100)<1h + name: ⏳ Source Tracking cheia em < 1h (Previsão) event_name: '⏳ Previsão: Source Tracking em {HOST.NAME} cheia em menos de 1 hora' opdata: 'Utilização Atual: {ITEM.LASTVALUE1}%' priority: HIGH - description: | - Baseado na taxa de crescimento da última hora, a Tabela de Rastreamento de Origem atingirá 100% em menos de 1 hora. + description: 'Baseado na taxa de crescimento da última hora, a Tabela de Rastreamento de Origem atingirá 100% em menos de 1 hora. + Ação Preventiva: Verifique regras com "sticky-address" ou "source-track" e considere aumentar os limites. + + ' tags: - tag: scope value: capacity - tag: type value: predictive - - uuid: b3a2eaaaa6c24a05a1e33c49b413fa26 + - uuid: b68001ded3d84372bd8f2d25097331d5 name: 'Tabela de Estados: Atual (State Table)' - type: SNMP_AGENT snmp_oid: get[1.3.6.1.4.1.12325.1.200.1.3.1.0] key: pfsense.state.table.count @@ -542,9 +595,8 @@ zabbix_export: tags: - tag: component value: network - - uuid: cbe37ad19a6a457d8577d8b7c8f2751e + - uuid: 483dc0d67c7548ed96f22e341b85b48f name: 'Tabela de Estados: Limite (Limit)' - type: SNMP_AGENT snmp_oid: get[1.3.6.1.4.1.12325.1.200.1.5.1.0] key: pfsense.state.table.limit @@ -556,9 +608,8 @@ zabbix_export: tags: - tag: component value: network - - uuid: 8820619856ec4b7fa19c55e8b5f6c0f2 + - uuid: f4f192b367fc43578828365c3d78be43 name: 'Tabela de Estados: Utilização (%)' - type: CALCULATED key: pfsense.state.table.pused value_type: FLOAT @@ -569,7 +620,7 @@ zabbix_export: - tag: component value: network triggers: - - uuid: 52cdec52076447cdbf32e783823d56e7 + - uuid: aeb585f0eac145159521ff06de04220e expression: min(/PFSense by SNMP/pfsense.state.table.pused,#3)>{$STATE.TABLE.UTIL.MAX} name: '🔥 Tabela de Estados Crítica: Risco de bloqueio ({ITEM.LASTVALUE1}%)' event_name: '🔥 Tabela de Estados Crítica: Uso acima de {$STATE.TABLE.UTIL.MAX}%' @@ -579,21 +630,23 @@ zabbix_export: tags: - tag: scope value: capacity - - uuid: 58c3ccce9df04d24adfc6f59c67179bc - expression: 'timeleft(/PFSense by SNMP/pfsense.state.table.pused,1h,100)<1h' - name: '⏳ Tabela de Estados cheia em < 1h (Previsão)' + - uuid: c6cc7b069e564a5c91b3e777bd88266e + expression: timeleft(/PFSense by SNMP/pfsense.state.table.pused,1h,100)<1h + name: ⏳ Tabela de Estados cheia em < 1h (Previsão) event_name: '⏳ Previsão: Tabela de Estados em {HOST.NAME} cheia em menos de 1 hora' opdata: 'Utilização Atual: {ITEM.LASTVALUE1}%' priority: HIGH - description: | - Baseado na taxa de crescimento da última hora, a Tabela de Estados atingirá 100% em menos de 1 hora. + description: 'Baseado na taxa de crescimento da última hora, a Tabela de Estados atingirá 100% em menos de 1 hora. + Ação Preventiva: Verifique se há conexões anômalas (State Table Flood) ou aumente o limite em System > Advanced > Firewall & NAT. + + ' tags: - tag: scope value: capacity - tag: type value: predictive - - uuid: 8ac87a366c1a4b3f98d18cc68bd8429f + - uuid: 2c1c84a1a0fb40c09d6bb2252a9240a4 name: 'Coleta Raw (SNMP): Software Instalado (hrSWRun)' type: SNMP_AGENT snmp_oid: walk[1.3.6.1.2.1.25.4.2.1.2,1.3.6.1.2.1.25.4.2.1.7,1.3.6.1.2.1.25.4.2.1.5] @@ -601,10 +654,13 @@ zabbix_export: history: '0' value_type: TEXT trends: '0' - description: | - MIB: HOST-RESOURCES-MIB + description: 'MIB: HOST-RESOURCES-MIB + Coleta bruta (Walk) da tabela hrSWRunTable. + Dados usados para itens dependentes de status de serviço e descoberta de processos DHCP. + + ' preprocessing: - type: SNMP_WALK_TO_JSON parameters: @@ -620,16 +676,21 @@ zabbix_export: tags: - tag: component value: raw - - uuid: 05e16f0524834e6ea6b7ded5af814838 + - uuid: 517cbb7af4304df1a09fe75ca5d5e619 name: Disponibilidade do Agente SNMP type: INTERNAL key: zabbix[host,snmp,available] - description: | - Disponibilidade das checagens SNMP no host. + description: 'Disponibilidade das checagens SNMP no host. + Valores possíveis: + 0 - indisponível + 1 - disponível + 2 - desconhecido + + ' valuemap: name: zabbix.host.available tags: @@ -638,7 +699,7 @@ zabbix_export: - tag: component value: network triggers: - - uuid: 205fffafbb0b4873b6e79c1754bf05a0 + - uuid: 94f82cddb0dd44d986c59c7df67953f6 expression: max(/PFSense by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0 name: '🚨 Falha SNMP: Sem coleta de dados no pfSense' opdata: 'Estado Atual: {ITEM.LASTVALUE1}' @@ -648,9 +709,8 @@ zabbix_export: - tag: scope value: availability discovery_rules: - - uuid: 3fec43567a43495e89c2791c48de560e + - uuid: e9fa3f6d8d864df8b0132f690ae54a1b name: Descoberta de interfaces de rede - type: DEPENDENT key: pfsense.net.if.discovery delay: '0' @@ -701,15 +761,17 @@ zabbix_export: formulaid: L description: Descoberta de interfaces via IF-MIB. item_prototypes: - - uuid: 20c0f88e7f564847877fe11b55bf8a9d + - uuid: 9ef6068a317d479881e405464ccf6bc1 name: 'Interface [{#IFNAME}({#IFALIAS})]: Tráfego IPv4 de entrada bloqueado' type: DEPENDENT key: net.if.in.block.v4.bps[{#SNMPINDEX}] delay: '0' units: bps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Tráfego IPv4 (bits/s) bloqueado na entrada desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -731,15 +793,17 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 23cf68152d034e79b6ead5300b5d687a + - uuid: e6b6d1394b7248e192c1e8db91ca1c97 name: 'Interface [{#IFNAME}({#IFALIAS})]: Pacotes IPv4 de entrada bloqueados' type: DEPENDENT key: net.if.in.block.v4.pps[{#SNMPINDEX}] delay: '0' units: pps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Número de pacotes IPv4 bloqueados na entrada desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -758,15 +822,17 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 9b06a076390045d69811139044d7c2a0 + - uuid: f725a30292f24361b0fb20348f192269 name: 'Interface [{#IFNAME}({#IFALIAS})]: Tráfego IPv6 de entrada bloqueado' type: DEPENDENT key: net.if.in.block.v6.bps[{#SNMPINDEX}] delay: '0' units: bps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Tráfego IPv6 (bits/s) bloqueado na entrada desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -788,15 +854,17 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 3ff23cd760b64a67948bbdfaef3ed21c + - uuid: 5952bb5bce3f429f83c63889454f73e3 name: 'Interface [{#IFNAME}({#IFALIAS})]: Pacotes IPv6 de entrada bloqueados' type: DEPENDENT key: net.if.in.block.v6.pps[{#SNMPINDEX}] delay: '0' units: pps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Número de pacotes IPv6 bloqueados na entrada desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -815,15 +883,18 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: be07928e1f2e43abb176764b04df2fda + - uuid: 0ee2183a375e4e53899ba9e3ff9cb040 name: 'Interface [{#IFNAME}({#IFALIAS})]: Pacotes de entrada descartados' type: DEPENDENT key: net.if.in.discards[{#SNMPINDEX}] delay: '0' - description: | - MIB: IF-MIB + description: 'MIB: IF-MIB + Número de pacotes de entrada que foram descartados, mesmo sem conter erros. + Motivo comum: Falta de espaço em buffer (congestionamento) ou limite de taxa. + + ' preprocessing: - type: SNMP_WALK_VALUE parameters: @@ -842,32 +913,38 @@ zabbix_export: - tag: interface value: '{#IFNAME}' trigger_prototypes: - - uuid: 902e8ce8cdea4a12a0dc5d40004c3ee6 - expression: 'min(/PFSense by SNMP/net.if.in.discards[{#SNMPINDEX}],5m)>{$IF.DISCARDS.WARN:"{#IFNAME}"}' + - uuid: 7deee856841d4dd295435c06c69db714 + expression: min(/PFSense by SNMP/net.if.in.discards[{#SNMPINDEX}],5m)>{$IF.DISCARDS.WARN:"{#IFNAME}"} recovery_mode: RECOVERY_EXPRESSION - recovery_expression: 'max(/PFSense by SNMP/net.if.in.discards[{#SNMPINDEX}],5m)<{$IF.DISCARDS.WARN:"{#IFNAME}"}*0.8' + recovery_expression: max(/PFSense by SNMP/net.if.in.discards[{#SNMPINDEX}],5m)<{$IF.DISCARDS.WARN:"{#IFNAME}"}*0.8 name: '🐢 Congestionamento: Descartes na interface {#IFNAME}' event_name: '🐢 Congestionamento: Descartes na interface {#IFNAME} (> {$IF.DISCARDS.WARN:"{#IFNAME}"}/s por 5m)' opdata: 'Descartes: {ITEM.LASTVALUE1}/s' priority: WARNING - description: | - Pacotes estão sendo descartados na interface {#IFNAME}. + description: 'Pacotes estão sendo descartados na interface {#IFNAME}. + Causas comuns: Buffer cheio (congestionamento), CPU alta, ou limite de taxa (QoS). + Verifique se a interface está saturada ou se há um pico de tráfego. + + ' tags: - tag: scope value: capacity - tag: layer value: network - - uuid: 9071bbf698184cb3900360f9cff590d9 + - uuid: 59a418974c7f4f27987c84faf2bf00b8 name: 'Interface [{#IFNAME}({#IFALIAS})]: Pacotes de entrada com erros' type: DEPENDENT key: net.if.in.errors[{#SNMPINDEX}] delay: '0' - description: | - MIB: IF-MIB + description: 'MIB: IF-MIB + Número de pacotes de entrada que continham erros impedindo a entrega a protocolos de camadas superiores. + Causas comuns: Cabeamento defeituoso, problemas na porta do switch, duplex mismatch. + + ' preprocessing: - type: SNMP_WALK_VALUE parameters: @@ -886,7 +963,7 @@ zabbix_export: - tag: interface value: '{#IFNAME}' trigger_prototypes: - - uuid: 3b90bbb77abb4fa9bdfe816fc7c485fc + - uuid: 8730a59fd47b44d8ab09a8080a381e59 expression: min(/PFSense by SNMP/net.if.in.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} recovery_mode: RECOVERY_EXPRESSION recovery_expression: max(/PFSense by SNMP/net.if.in.errors[{#SNMPINDEX}],5m)<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8 @@ -901,15 +978,17 @@ zabbix_export: tags: - tag: scope value: availability - - uuid: 57dce18d39cf4c48bfa9731f7761bfdf + - uuid: 1bd37e94b786445caa6ada8855dfb252 name: 'Interface [{#IFNAME}({#IFALIAS})]: Tráfego IPv4 de entrada permitido' type: DEPENDENT key: net.if.in.pass.v4.bps[{#SNMPINDEX}] delay: '0' units: bps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Tráfego IPv4 (bits/s) permitido na entrada desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -931,15 +1010,17 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: e0345999c3a94391a891ee5d46878b7d + - uuid: 243751e84f884372832e51fc4e32a7dc name: 'Interface [{#IFNAME}({#IFALIAS})]: Pacotes IPv4 de entrada permitidos' type: DEPENDENT key: net.if.in.pass.v4.pps[{#SNMPINDEX}] delay: '0' units: pps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Número de pacotes IPv4 permitidos na entrada desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -958,15 +1039,17 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 0fe4379e5ea0417ab49fd348a6c18ee7 + - uuid: 722c2f1696274667a754c4c3bbc5b548 name: 'Interface [{#IFNAME}({#IFALIAS})]: Tráfego IPv6 de entrada permitido' type: DEPENDENT key: net.if.in.pass.v6.bps[{#SNMPINDEX}] delay: '0' units: bps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Tráfego IPv6 (bits/s) permitido na entrada desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -988,15 +1071,17 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 45dffb5b97434fd381432e7cf302b78f + - uuid: 9e10f4a41f9d4762a81cb0e0906624d5 name: 'Interface [{#IFNAME}({#IFALIAS})]: Pacotes IPv6 de entrada permitidos' type: DEPENDENT key: net.if.in.pass.v6.pps[{#SNMPINDEX}] delay: '0' units: pps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Número de pacotes IPv6 permitidos na entrada desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -1015,16 +1100,19 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: ba2b4bc30c1b4187992a04103f26c691 + - uuid: 2f2bd830634a47c19de2522c9435b428 name: 'Interface [{#IFNAME}({#IFALIAS})]: Bits recebidos' type: DEPENDENT key: net.if.in[{#SNMPINDEX}] delay: '0' units: bps - description: | - MIB: IF-MIB + description: 'MIB: IF-MIB + Total de octetos recebidos na interface, incluindo caracteres de enquadramento. + Equivale ao objeto ifInOctets (64-bit). + + ' preprocessing: - type: SNMP_WALK_VALUE parameters: @@ -1045,15 +1133,17 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: c5307c9050834bd48189e8b2b66b9011 + - uuid: d0c8f2518bae4d58bdb4268a02ed2451 name: 'Interface [{#IFNAME}({#IFALIAS})]: Tráfego IPv4 de saída bloqueado' type: DEPENDENT key: net.if.out.block.v4.bps[{#SNMPINDEX}] delay: '0' units: bps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Tráfego IPv4 (bits/s) bloqueado na saída desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -1075,15 +1165,17 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 95de85c6a0fd4f79bd97ac16ed6f29de + - uuid: 6f1a2a5d11734c7b8f2831f0760fdbe9 name: 'Interface [{#IFNAME}({#IFALIAS})]: Pacotes IPv4 de saída bloqueados' type: DEPENDENT key: net.if.out.block.v4.pps[{#SNMPINDEX}] delay: '0' units: pps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Número de pacotes IPv4 bloqueados na saída desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -1102,15 +1194,17 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: c61326b125eb4fd88700a8f3d1337708 + - uuid: 1314708916dc452ab5a6cc391b7b1d5a name: 'Interface [{#IFNAME}({#IFALIAS})]: Tráfego IPv6 de saída bloqueado' type: DEPENDENT key: net.if.out.block.v6.bps[{#SNMPINDEX}] delay: '0' units: bps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Tráfego IPv6 (bits/s) bloqueado na saída desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -1132,15 +1226,18 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: da70f115ef314f55898fae2e1f37175f + - uuid: 5c44ce98d46c447e887ca51029e9d283 name: 'Interface [{#IFNAME}({#IFALIAS})]: Pacotes de saída descartados' type: DEPENDENT key: net.if.out.discards[{#SNMPINDEX}] delay: '0' - description: | - MIB: IF-MIB + description: 'MIB: IF-MIB + Número de pacotes de saída que foram descartados, mesmo sem conter erros. + Motivo comum: Falta de espaço em buffer (congestionamento) ou limite de taxa. + + ' preprocessing: - type: SNMP_WALK_VALUE parameters: @@ -1158,15 +1255,18 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 2db5b83fbd1941838de4c4f43ef61c2f + - uuid: d2f086cfa1ec4b49b3f67b28937aa879 name: 'Interface [{#IFNAME}({#IFALIAS})]: Pacotes de saída com erros' type: DEPENDENT key: net.if.out.errors[{#SNMPINDEX}] delay: '0' - description: | - MIB: IF-MIB + description: 'MIB: IF-MIB + Número de pacotes de saída que continham erros impedindo a entrega a protocolos de camadas superiores. + Causas comuns: Cabeamento defeituoso, problemas na porta do switch, duplex mismatch. + + ' preprocessing: - type: SNMP_WALK_VALUE parameters: @@ -1185,7 +1285,7 @@ zabbix_export: - tag: interface value: '{#IFNAME}' trigger_prototypes: - - uuid: 282c8350880e4bf09d6ed861689df62e + - uuid: c8a6edd70f16407887f5a9a2a8c34e0d expression: min(/PFSense by SNMP/net.if.out.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} recovery_mode: RECOVERY_EXPRESSION recovery_expression: max(/PFSense by SNMP/net.if.out.errors[{#SNMPINDEX}],5m)<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8 @@ -1200,15 +1300,17 @@ zabbix_export: tags: - tag: scope value: availability - - uuid: 79cd18b8ef0d47fea75fb501c5f4856a + - uuid: 4a0aab86624a46a89405f0e52333a320 name: 'Interface [{#IFNAME}({#IFALIAS})]: Tráfego IPv4 de saída permitido' type: DEPENDENT key: net.if.out.pass.v4.bps[{#SNMPINDEX}] delay: '0' units: bps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Tráfego IPv4 (bits/s) permitido na saída desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -1230,15 +1332,17 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 1a72512ddbf64136886053d89feafcb6 + - uuid: de4f5905719040dfa99eb8a31075f610 name: 'Interface [{#IFNAME}({#IFALIAS})]: Pacotes IPv4 de saída permitidos' type: DEPENDENT key: net.if.out.pass.v4.pps[{#SNMPINDEX}] delay: '0' units: pps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Número de pacotes IPv4 permitidos na saída desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -1257,15 +1361,17 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 12c861ec3d3f41cabe2ff5224c6f0759 + - uuid: fdc005f450664b159b9c5a6f75878e49 name: 'Interface [{#IFNAME}({#IFALIAS})]: Tráfego IPv6 de saída permitido' type: DEPENDENT key: net.if.out.pass.v6.bps[{#SNMPINDEX}] delay: '0' units: bps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Tráfego IPv6 (bits/s) permitido na saída desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -1287,15 +1393,17 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 5e28799bcd9646f8a1dfe7438cbe38a7 + - uuid: 9425d460009a48648a03e4d431bfa4db name: 'Interface [{#IFNAME}({#IFALIAS})]: Pacotes IPv6 de saída permitidos' type: DEPENDENT key: net.if.out.pass.v6.pps[{#SNMPINDEX}] delay: '0' units: pps - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Número de pacotes IPv6 permitidos na saída desta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -1314,16 +1422,19 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 1a7573aa11444ab6a7aa0826ec3d92f1 + - uuid: 769bc0e41d13401a903c11acb3bf4127 name: 'Interface [{#IFNAME}({#IFALIAS})]: Bits enviados' type: DEPENDENT key: net.if.out[{#SNMPINDEX}] delay: '0' units: bps - description: | - MIB: IF-MIB + description: 'MIB: IF-MIB + Total de octetos transmitidos pela interface, incluindo caracteres de enquadramento. + Equivale ao objeto ifOutOctets (64-bit). + + ' preprocessing: - type: SNMP_WALK_VALUE parameters: @@ -1344,14 +1455,16 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 3fff53943fdf49a288da9643172633ae + - uuid: 2714800b92634c8cb79a0fcf262f1f2f name: 'Interface [{#IFNAME}({#IFALIAS})]: Contagem de referências de regras' type: DEPENDENT key: net.if.rules.refs[{#SNMPINDEX}] delay: '0' - description: | - MIB: BEGEMOT-PF-MIB + description: 'MIB: BEGEMOT-PF-MIB + Número de regras que referenciam esta interface. + + ' preprocessing: - type: JSONPATH parameters: @@ -1367,16 +1480,19 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: b84e371151d54ef5a35454fb76f56352 + - uuid: 5636f9f1b52b43779f59bd2e751c7a3e name: 'Interface [{#IFNAME}({#IFALIAS})]: Velocidade' type: DEPENDENT key: net.if.speed[{#SNMPINDEX}] delay: '0' units: bps - description: | - MIB: IF-MIB + description: 'MIB: IF-MIB + Estimativa de largura de banda da interface em bits por segundo. + Se não houver estimativa precisa, contém a largura de banda nominal. + + ' preprocessing: - type: SNMP_WALK_VALUE parameters: @@ -1397,22 +1513,32 @@ zabbix_export: value: '{#IFALIAS}' - tag: interface value: '{#IFNAME}' - - uuid: 8d8b2859b7ce4ca0bc12eddd9e14c11d + - uuid: 4217558941c2437bbad030a19f60639b name: 'Interface [{#IFNAME}({#IFALIAS})]: Status operacional' type: DEPENDENT key: net.if.status[{#SNMPINDEX}] delay: '0' - description: | - MIB: IF-MIB + description: 'MIB: IF-MIB + Status operacional atual da interface. + Valores principais: + - up(1): Interface pronta para transmitir/receber. + - down(2): Interface parada por falha. + - testing(3): Em modo de teste. + - unknown(4): Estado desconhecido. + - dormant(5): Aguardando ação externa. + - notPresent(6): Componente de hardware ausente. + - lowerLayerDown(7): Interface física abaixo está parada. + + ' valuemap: name: IF-MIB::ifOperStatus preprocessing: @@ -1433,27 +1559,33 @@ zabbix_export: - tag: interface value: '{#IFNAME}' trigger_prototypes: - - uuid: fc8d20aefeb348e5afa7901ff9437f86 + - uuid: ec74da7a0ec543939d80bbf93e6ed33f expression: '{$IFCONTROL:"{#IFNAME}"}=1 and (last(/PFSense by SNMP/net.if.status[{#SNMPINDEX}])=2)' name: '🔌 PFSense: Interface [{#IFNAME}({#IFALIAS})]: Link indisponível' opdata: 'Estado atual: {ITEM.LASTVALUE1}' priority: AVERAGE - description: | - A interface está operacionalmente parada (Link Down). + description: 'A interface está operacionalmente parada (Link Down). + Causas possíveis: Cabo desconectado, porta desabilitada no switch, ou falha de hardware. + Nota: Se `{$IFCONTROL:"{#IFNAME}"}` for 0, este alerta é inibido. + + ' tags: - tag: scope value: availability - - uuid: 9ad3e8956073485c92522dc884649a57 + - uuid: 515394e4d006469ab91d5cd9d40874c8 name: 'Interface [{#IFNAME}({#IFALIAS})]: Tipo de interface' type: DEPENDENT key: net.if.type[{#SNMPINDEX}] delay: '0' - description: | - MIB: IF-MIB + description: 'MIB: IF-MIB + O tipo de interface (ex: ethernet, softwareLoopback, etc). + Valores definidos pela IANA. + + ' valuemap: name: IF-MIB::ifType preprocessing: @@ -1474,7 +1606,7 @@ zabbix_export: - tag: interface value: '{#IFNAME}' trigger_prototypes: - - uuid: cc2053e553f246a2be78d783e3ab007f + - uuid: 5a27caf007fa4d20837edfb3b67f4753 expression: 'change(/PFSense by SNMP/net.if.speed[{#SNMPINDEX}])<0 and last(/PFSense by SNMP/net.if.speed[{#SNMPINDEX}])>0 and ( @@ -1514,7 +1646,7 @@ zabbix_export: tags: - tag: scope value: capacity - - uuid: c30a96ab819347f8b0b240c8718b9785 + - uuid: 7e8b530b7b38444388eabfedd9a4f2ea expression: '(avg(/PFSense by SNMP/net.if.in[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/PFSense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/PFSense by SNMP/net.if.speed[{#SNMPINDEX}])>0 @@ -1533,7 +1665,7 @@ zabbix_export: tags: - tag: scope value: performance - - uuid: 03763e561b1d4722b0fc9cee8000f500 + - uuid: c3f5f04c84b944a9afc04a14e4b549e2 expression: '(avg(/PFSense by SNMP/net.if.out[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/PFSense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/PFSense by SNMP/net.if.speed[{#SNMPINDEX}])>0 @@ -1553,7 +1685,7 @@ zabbix_export: - tag: scope value: performance graph_prototypes: - - uuid: fae41ea7632f42fa999cb61a6998d113 + - uuid: 753ffcb1edd44a3eacbf898990a7aa37 name: 'Interface [{#IFNAME}({#IFALIAS})]: Tráfego de Entrada (PF)' graph_items: - color: 1A7C11 @@ -1599,7 +1731,7 @@ zabbix_export: item: host: PFSense by SNMP key: net.if.in.block.v6.pps[{#SNMPINDEX}] - - uuid: 39886ce2366947f49ded14164aad29bf + - uuid: 0fcdd7eb9bf247afa616cda9c4e90cf4 name: 'Interface [{#IFNAME}({#IFALIAS})]: Tráfego de Rede' graph_items: - drawtype: GRADIENT_LINE @@ -1637,7 +1769,7 @@ zabbix_export: item: host: PFSense by SNMP key: net.if.in.discards[{#SNMPINDEX}] - - uuid: f7b9c88697f54d3c9910190c6cff655c + - uuid: 32175c20e813464c912e1d2726973ea3 name: 'Interface [{#IFNAME}({#IFALIAS})]: Tráfego de Saída (PF)' graph_items: - color: 1A7C11 @@ -1703,35 +1835,39 @@ zabbix_export: - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 1h - - uuid: d4001ddcfb154daa8029d531c590ba8a - name: 'Descoberta de Processos DHCP' + - uuid: 912aa599db6c4f79ba52b3cc91bccbc4 + name: Descoberta de Processos DHCP type: DEPENDENT key: pfsense.dhcp.discovery delay: '0' - description: | - Descobre instâncias do DHCP Server (dhcpd) diferenciadas por parâmetros (ex: IPv4 vs IPv6). + description: 'Descobre instâncias do DHCP Server (dhcpd) diferenciadas por parâmetros (ex: IPv4 vs IPv6). + Permite monitoramento individual de cada instância do serviço DHCP. + + ' filter: evaltype: AND conditions: - macro: '{#HR_SW_NAME}' - value: '^dhcpd$' + value: ^dhcpd$ formulaid: A item_prototypes: - - uuid: 32ee3374996543daba3e1d6e976fc60d + - uuid: 1a78fbd118e64d99b12f333f88436e56 name: 'Processo DHCP [{#HR_SW_PARAMS}]: Status' type: DEPENDENT - key: 'pfsense.dhcp.process.status[{#HR_SW_PARAMS}]' + key: pfsense.dhcp.process.status[{#HR_SW_PARAMS}] delay: '0' - description: | - Status da instância DHCP rodando com argumentos: {#HR_SW_PARAMS}. + description: 'Status da instância DHCP rodando com argumentos: {#HR_SW_PARAMS}. + Valor 1 = running (em execução), 0 = parado/ausente. + + ' valuemap: name: Services status preprocessing: - type: JSONPATH parameters: - - '$[?(@.hrSWRunName == "{#HR_SW_NAME}" && @.hrSWRunParameters == "{#HR_SW_PARAMS}")].hrSWRunStatus.first()' + - $[?(@.hrSWRunName == "{#HR_SW_NAME}" && @.hrSWRunParameters == "{#HR_SW_PARAMS}")].hrSWRunStatus.first() error_handler: CUSTOM_VALUE error_handler_params: '0' master_item: @@ -1742,15 +1878,17 @@ zabbix_export: - tag: service value: dhcp trigger_prototypes: - - uuid: e84cad72d3aa447d8d0397d24502ee68 - expression: 'last(/PFSense by SNMP/pfsense.dhcp.process.status[{#HR_SW_PARAMS}])=0' + - uuid: b619b3979b114f9cadb52845cd892027 + expression: last(/PFSense by SNMP/pfsense.dhcp.process.status[{#HR_SW_PARAMS}])=0 name: '🚨 DHCP Parado: Instância {#HR_SW_PARAMS} não está rodando' event_name: '🚨 DHCP em {HOST.NAME}: Instância "{#HR_SW_PARAMS}" parou' opdata: 'Status: {ITEM.LASTVALUE}' priority: HIGH - description: | - A instância do DHCP com parâmetros "{#HR_SW_PARAMS}" parou de responder. + description: 'A instância do DHCP com parâmetros "{#HR_SW_PARAMS}" parou de responder. + Verifique o serviço DHCP em Services > DHCP Server. + + ' tags: - tag: scope value: availability @@ -1758,78 +1896,177 @@ zabbix_export: value: dhcp lld_macro_paths: - lld_macro: '{#HR_SW_NAME}' - path: '$.hrSWRunName' + path: $.hrSWRunName - lld_macro: '{#HR_SW_PARAMS}' - path: '$.hrSWRunParameters' + path: $.hrSWRunParameters - lld_macro: '{#HR_SW_STATUS}' - path: '$.hrSWRunStatus' + path: $.hrSWRunStatus master_item: key: pfsense.sw.walk + - uuid: a8fb2e8345964e9abbe44eb1ad1534ed + name: Descoberta de Usuários OpenVPN + type: ZABBIX_ACTIVE + key: openvpn.discovery + delay: 5m + lifetime: 1d + description: 'Descobre usuários e túneis OpenVPN conectados. + + Retorna: {#VPN.USER}, {#VPN.SERVER}, {#VPN.REAL_IP} + + ' + item_prototypes: + - uuid: a238ea332afe471393035965cbc29e5c + name: 'OpenVPN [{#VPN.USER}]: Download Total (Bytes)' + type: ZABBIX_ACTIVE + key: openvpn.user.bytes_received.total[{#VPN.USER}] + delay: 1m + units: B + description: Total de bytes recebidos (download) pelo usuário desde a conexão. + tags: + - tag: application + value: vpn + - tag: Company + value: '{{#VPN.SERVER}.regsub("(?:CLIENT_|S2S_)?(.*)", "\1")}' + - uuid: 19112b3cbfdb47b28baa5b8843ea5933 + name: 'OpenVPN [{#VPN.USER}]: Upload Total (Bytes)' + type: ZABBIX_ACTIVE + key: openvpn.user.bytes_sent.total[{#VPN.USER}] + delay: 1m + units: B + description: Total de bytes enviados (upload) pelo usuário desde a conexão. + tags: + - tag: application + value: vpn + - tag: Company + value: '{{#VPN.SERVER}.regsub("(?:CLIENT_|S2S_)?(.*)", "\1")}' + - uuid: e68e9902fd3a45ce896c19bddd06ff8e + name: 'OpenVPN [{#VPN.USER}]: IP Real' + type: ZABBIX_ACTIVE + key: openvpn.user.real_address.new[{#VPN.USER}] + delay: 1m + trends: '0' + value_type: TEXT + description: Endereço IP real (público) do usuário VPN. + tags: + - tag: application + value: vpn + - tag: Company + value: '{{#VPN.SERVER}.regsub("(?:CLIENT_|S2S_)?(.*)", "\1")}' + - uuid: 52788b70897542e0bd5baeeff1b5b7fc + name: 'OpenVPN [{#VPN.USER}]: Status' + type: ZABBIX_ACTIVE + key: openvpn.user.status[{#VPN.USER}] + delay: 1m + description: 'Status da conexão: 1=Conectado, 0=Desconectado.' + valuemap: + name: OpenVPN Connection Status + tags: + - tag: application + value: vpn + - tag: Company + value: '{{#VPN.SERVER}.regsub("(?:CLIENT_|S2S_)?(.*)", "\1")}' + - uuid: 80439efbb32d47b5bd6819afe73a6206 + name: 'OpenVPN [{#VPN.USER}]: Tempo Conectado (Unix)' + type: ZABBIX_ACTIVE + key: openvpn.user.connected_since[{#VPN.USER}] + delay: 5m + units: unixtime + description: Timestamp Unix de quando o usuário conectou. + tags: + - tag: application + value: vpn + - tag: Company + value: '{{#VPN.SERVER}.regsub("(?:CLIENT_|S2S_)?(.*)", "\1")}' + trigger_prototypes: + - uuid: 06fd55dcd7694b03ac50735e33bd8774 + expression: change(/PFSense by SNMP/openvpn.user.real_address.new[{#VPN.USER}])<>0 and last(/PFSense by SNMP/openvpn.user.status[{#VPN.USER}])=1 + name: 'OpenVPN [{#VPN.USER}]: IP Alterado Durante Sessão (Possível Hijacking)' + event_name: '🛡️ SEGURANÇA: IP de {#VPN.USER} alterou para {ITEM.LASTVALUE1} enquanto conectado' + priority: HIGH + description: 'O IP real do usuário mudou enquanto a sessão VPN ainda está ativa. + + Isso pode indicar: + + 1. Sequestro de sessão (Session Hijacking). + + 2. Reconexão de rede do usuário. + + Ação: Verifique a legitimidade da conexão. + + ' + tags: + - tag: scope + value: security + - uuid: 73ea7045fd9f4a099265edbad1163323 + expression: (max(/PFSense by SNMP/openvpn.user.bytes_received.total[{#VPN.USER}],1h)-min(/PFSense by SNMP/openvpn.user.bytes_received.total[{#VPN.USER}],1h))>{$VPN.DATA.LIMIT} + name: 'OpenVPN [{#VPN.USER}]: Exfiltração de Dados (Download > 10GB/h)' + event_name: '🚨 EXFILTRAÇÃO: {#VPN.USER} baixou mais de 10GB na última hora' + priority: HIGH + description: 'O usuário baixou mais de {$VPN.DATA.LIMIT} bytes (10GB) na última hora. + + Isso pode indicar vazamento de dados ou download não autorizado. + + Ação: Contate o usuário e verifique a natureza do tráfego. + + ' + tags: + - tag: scope + value: security + - uuid: f612c09955474b3b90b34be246d6ce4e + expression: (now()-last(/PFSense by SNMP/openvpn.user.connected_since[{#VPN.USER}]))>{$VPN.ZOMBIE.LIMIT} + name: 'OpenVPN [{#VPN.USER}]: Sessão Zumbi (> 24h conectado)' + event_name: '🧟 ZUMBI: {#VPN.USER} está conectado há mais de 24h' + priority: WARNING + description: 'O usuário está conectado há mais de {$VPN.ZOMBIE.LIMIT} segundos (24h por padrão). + + Verifique se a conexão ainda é legítima ou se o dispositivo foi esquecido ligado. + + ' + tags: + - tag: scope + value: compliance + overrides: + - name: Site-to-Site (S2S) + step: '1' + filter: + conditions: + - macro: '{#VPN.USER}' + value: '{$VPN.S2S.PATTERN}' + formulaid: A + operations: + - operationobject: TRIGGER_PROTOTYPE + operator: REGEXP + value: Exfiltração|Hijacking|Zumbi + status: DISABLED + - operationobject: ITEM_PROTOTYPE + operator: LIKE + value: '' + tags: + - tag: Type + value: S2S + - name: User (Colaborador) + step: '2' + filter: + evaltype: AND + conditions: + - macro: '{#VPN.USER}' + value: '{$VPN.S2S.PATTERN}' + operator: NOT_MATCHES_REGEX + formulaid: A + operations: + - operationobject: ITEM_PROTOTYPE + operator: LIKE + value: '' + tags: + - tag: Type + value: User tags: - tag: class value: software - tag: target value: pfsense - macros: - - macro: '{$IF.ERRORS.WARN}' - value: '2' - description: Limiar de taxa de pacotes com erro para disparo de alerta. Pode ser usado com contexto de nome de interface. - - macro: '{$IF.DISCARDS.WARN}' - value: '10' - description: Limiar de descartes de pacotes por segundo que dispara alertas de congestionamento. - - macro: '{$PF.FRAG.MAX}' - value: '100' - description: Limite de pacotes fragmentados por segundo que indica MTU ou ataque. - - macro: '{$IF.UTIL.MAX}' - value: '90' - description: Limiar de utilização de banda da interface para alerta (%). Pode ser usado com contexto de nome de interface. - - macro: '{$IFCONTROL}' - value: '1' - description: Macro para controle de estado operacional da interface (trigger de link down). Valor 1 = monitorar, 0 = ignorar. Pode ser usado com contexto de nome de interface. - - macro: '{$NET.IF.IFADMINSTATUS.MATCHES}' - value: ^.* - description: Filtro de descoberta de interfaces de rede (status administrativo). - - macro: '{$NET.IF.IFADMINSTATUS.NOT_MATCHES}' - value: ^2$ - description: Ignora interfaces com status administrativo down(2). - - macro: '{$NET.IF.IFALIAS.MATCHES}' - value: .* - description: Filtro de descoberta de interfaces de rede (alias). - - macro: '{$NET.IF.IFALIAS.NOT_MATCHES}' - value: CHANGE_IF_NEEDED - description: Filtro de descoberta de interfaces de rede (alias - exclusão). - - macro: '{$NET.IF.IFDESCR.MATCHES}' - value: .* - description: Filtro de descoberta de interfaces de rede (descrição). - - macro: '{$NET.IF.IFDESCR.NOT_MATCHES}' - value: CHANGE_IF_NEEDED - description: Filtro de descoberta de interfaces de rede (descrição - exclusão). - - macro: '{$NET.IF.IFNAME.NOT_MATCHES}' - value: (^pflog[0-9.]*$|^pfsync[0-9.]*$) - description: Filtro de descoberta de interfaces de rede (nome - exclusão). Ignora pflog e pfsync. - - macro: '{$NET.IF.IFOPERSTATUS.MATCHES}' - value: ^.*$ - description: Filtro de descoberta de interfaces de rede (status operacional). - - macro: '{$NET.IF.IFOPERSTATUS.NOT_MATCHES}' - value: ^6$ - description: Ignora interfaces com status operacional notPresent(6). - - macro: '{$NET.IF.IFTYPE.MATCHES}' - value: .* - description: Filtro de descoberta de interfaces de rede (tipo de interface). - - macro: '{$NET.IF.IFTYPE.NOT_MATCHES}' - value: CHANGE_IF_NEEDED - description: Filtro de descoberta de interfaces de rede (tipo - exclusão). - - macro: '{$SNMP.TIMEOUT}' - value: 5m - description: Intervalo de tempo para considerar SNMP indisponível. - - macro: '{$SOURCE.TRACKING.TABLE.UTIL.MAX}' - value: '90' - description: Limiar de utilização da tabela de rastreamento de origem (%). - - macro: '{$STATE.TABLE.UTIL.MAX}' - value: '90' - description: Limiar de utilização da tabela de estados (%). dashboards: - - uuid: 0f3e733b65c7449faff3f0ad6749e3e4 + - uuid: 1cb88d5d96484a61b3dd96c5e98ff260 name: 'PFSense: Overview' pages: - name: Filtro de Pacotes @@ -1896,7 +2133,14 @@ zabbix_export: name: reference value: AAAAD valuemaps: - - uuid: 8dde482f5baa420c86d86c5c263a3800 + - uuid: 7b7a2bcea9084e3ab7428522fb991eff + name: 'OpenVPN Connection Status' + mappings: + - value: '0' + newvalue: Desconectado + - value: '1' + newvalue: Conectado + - uuid: 09d094600f2841b2808b785771e91afa name: IF-MIB::ifOperStatus mappings: - value: '1' @@ -1913,7 +2157,7 @@ zabbix_export: newvalue: Não Presente - value: '7' newvalue: Camada Inferior Down - - uuid: f8cda956c81244a6b8a5c773c35b1197 + - uuid: f58b3f693e704820b878ec7a772587d7 name: IF-MIB::ifType mappings: - value: '1' @@ -2488,21 +2732,21 @@ zabbix_export: newvalue: ptm - value: '290' newvalue: ghn - - uuid: bf20afc8d6b746c99860534226ac4000 + - uuid: 60004ca88d644194964e4febb5f82510 name: Services status mappings: - value: '0' newvalue: Parado - value: '2' newvalue: Executando - - uuid: 5e7b103ef8134a289e496256abeb2594 + - uuid: 3607263605264a6eb01b08b74a6017da name: SNMPv2-TC::TruthValue mappings: - value: '1' newvalue: Verdadeiro - value: '2' newvalue: Falso - - uuid: acc11afeb6d54db1b31324792fbe8747 + - uuid: 3607cfa1513f49a89114307a127c5433 name: zabbix.host.available mappings: - value: '0' @@ -2512,7 +2756,7 @@ zabbix_export: - value: '2' newvalue: Desconhecido graphs: - - uuid: 5421a5d6d6784bb59e8f550d63f0ce9d + - uuid: 18b72f3eafe54206a574f431e7bb563a name: 'PFSense: Códigos de Motivo (Packet Filter)' type: STACKED ymin_type_1: FIXED