ncc.zabbix_templates

Yohn Y. 2023-09-30 Child:448eb9ded92a

0:143ba793d077 Browse Files

.. init

FreeBSD.common/res/newsyslogd_config/warnmsg.conf FreeBSD.common/res/syslog_config/warnmsg.conf FreeBSD.common/res/zabbix_agent_config/aw_freebsd.conf FreeBSD.common/zbx_export_templates.yaml HTTP/zbx_export_templates.yaml Linux.common/additions/apt.updater.sh Linux.common/res/sudoers_config/zabbix Linux.common/res/zabbix_agent_config/aw_linux_mon.conf Linux.common/zbx_export_templates.yaml rspamd/zbx_export_templates.yaml

     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/FreeBSD.common/res/newsyslogd_config/warnmsg.conf	Sat Sep 30 22:30:25 2023 +0300
     1.3 @@ -0,0 +1,1 @@
     1.4 +/var/log/warning_msg.log        640  3     1000    *   JC
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/FreeBSD.common/res/syslog_config/warnmsg.conf	Sat Sep 30 22:30:25 2023 +0300
     2.3 @@ -0,0 +1,2 @@
     2.4 +!-postfix
     2.5 +*.err;auth.none;authpriv.none;mail.none             /var/log/warning_msg.log
     2.6 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/FreeBSD.common/res/zabbix_agent_config/aw_freebsd.conf	Sat Sep 30 22:30:25 2023 +0300
     3.3 @@ -0,0 +1,1 @@
     3.4 +UserParameter=aw.fbsd.pkg.updatable,pkg version | awk '$2 == "<" || $2 == "?" {print $1}'
     3.5 \ No newline at end of file
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/FreeBSD.common/zbx_export_templates.yaml	Sat Sep 30 22:30:25 2023 +0300
     4.3 @@ -0,0 +1,56 @@
     4.4 +zabbix_export:
     4.5 +  version: '6.0'
     4.6 +  date: '2023-09-30T19:25:24Z'
     4.7 +  groups:
     4.8 +    - uuid: 22941f4e01294888a9bed3aae15f6ef9
     4.9 +      name: Templates/AWNET
    4.10 +  templates:
    4.11 +    - uuid: 188bbd004fd94b4d8bbaee4333ca8077
    4.12 +      template: 'AWNET FreeBSD Template'
    4.13 +      name: 'AWNET FreeBSD Template'
    4.14 +      groups:
    4.15 +        - name: Templates/AWNET
    4.16 +      items:
    4.17 +        - uuid: ac4c32ef9cf44ed5b18585989a141389
    4.18 +          name: 'Пакеты под обновление'
    4.19 +          type: ZABBIX_ACTIVE
    4.20 +          key: aw.fbsd.pkg.updatable
    4.21 +          delay: 5m
    4.22 +          trends: '0'
    4.23 +          value_type: TEXT
    4.24 +          preprocessing:
    4.25 +            - type: NOT_MATCHES_REGEX
    4.26 +              parameters:
    4.27 +                - '^ *$'
    4.28 +              error_handler: DISCARD_VALUE
    4.29 +          tags:
    4.30 +            - tag: Application
    4.31 +              value: PKG
    4.32 +          triggers:
    4.33 +            - uuid: 88160873c0aa4bba82aba7f5391b5115
    4.34 +              expression: 'nodata(/AWNET FreeBSD Template/aw.fbsd.pkg.updatable,5m)=0'
    4.35 +              recovery_mode: RECOVERY_EXPRESSION
    4.36 +              recovery_expression: 'nodata(/AWNET FreeBSD Template/aw.fbsd.pkg.updatable,15m)=1'
    4.37 +              name: 'Существуют пакеты, требующие обновления'
    4.38 +              priority: WARNING
    4.39 +              tags:
    4.40 +                - tag: Application
    4.41 +                  value: PKG
    4.42 +        - uuid: 21140a98f99b4eadb62a632adc76fcf0
    4.43 +          name: 'Ошибки в системном журнале'
    4.44 +          type: ZABBIX_ACTIVE
    4.45 +          key: 'logrt["/var/log/warning_msg\.log","@FreeBSD syslog file warning filter",uft-8]'
    4.46 +          trends: '0'
    4.47 +          value_type: LOG
    4.48 +          tags:
    4.49 +            - tag: Module
    4.50 +              value: 'Системный журнал'
    4.51 +          triggers:
    4.52 +            - uuid: a9049f62969a465ca9e7dcaa5de8a988
    4.53 +              expression: 'nodata(/AWNET FreeBSD Template/logrt["/var/log/warning_msg\.log","@FreeBSD syslog file warning filter",uft-8],2m)=0'
    4.54 +              name: 'Ошибки в системном журнале'
    4.55 +              opdata: '{ITEM.VALUE}'
    4.56 +              priority: WARNING
    4.57 +      macros:
    4.58 +        - macro: '{$AW.FBSD.IGNORE_PKGS}'
    4.59 +          description: 'Регулярка игнорируемых пакетов при выдаче информации о пакетах, требующих обновления'
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/HTTP/zbx_export_templates.yaml	Sat Sep 30 22:30:25 2023 +0300
     5.3 @@ -0,0 +1,616 @@
     5.4 +zabbix_export:
     5.5 +  version: '6.0'
     5.6 +  date: '2023-09-30T19:28:07Z'
     5.7 +  groups:
     5.8 +    - uuid: 22941f4e01294888a9bed3aae15f6ef9
     5.9 +      name: Templates/AWNET
    5.10 +  templates:
    5.11 +    - uuid: c40bb45aea654661ad8d08af056cc7fd
    5.12 +      template: 'Monitoring HTTP AWNET'
    5.13 +      name: 'Мониторинг HTTP AWNET'
    5.14 +      groups:
    5.15 +        - name: Templates/AWNET
    5.16 +      items:
    5.17 +        - uuid: 0c18593e50564c28b81f1670e1b926ca
    5.18 +          name: 'Потеря пакетов'
    5.19 +          type: SIMPLE
    5.20 +          key: 'icmppingloss["{HOST.CONN}",100,700,1000,5000]'
    5.21 +          value_type: FLOAT
    5.22 +          tags:
    5.23 +            - tag: Application
    5.24 +              value: Доступность
    5.25 +            - tag: Proto
    5.26 +              value: ICMP
    5.27 +          triggers:
    5.28 +            - uuid: e4a815685f5a4d2386d81cc3d9080d15
    5.29 +              expression: 'last(/Monitoring HTTP AWNET/icmppingloss["{HOST.CONN}",100,700,1000,5000])>50'
    5.30 +              name: 'Большой уровень потерь пакетов'
    5.31 +              priority: HIGH
    5.32 +              dependencies:
    5.33 +                - name: 'Потеря сетевой связности с сервисом'
    5.34 +                  expression: 'last(/Monitoring HTTP AWNET/icmppingsec["{HOST.CONN}",10,700,1000,5000,max])=0 or last(/Monitoring HTTP AWNET/icmppingsec["{HOST.CONN}",10,700,1000,5000,min])=0'
    5.35 +            - uuid: 74f3b5e5a64d44a793ca7274c05f657a
    5.36 +              expression: 'last(/Monitoring HTTP AWNET/icmppingloss["{HOST.CONN}",100,700,1000,5000])>30'
    5.37 +              name: 'Плохая связность с сервисом'
    5.38 +              priority: AVERAGE
    5.39 +              dependencies:
    5.40 +                - name: 'Большой уровень потерь пакетов'
    5.41 +                  expression: 'last(/Monitoring HTTP AWNET/icmppingloss["{HOST.CONN}",100,700,1000,5000])>50'
    5.42 +              tags:
    5.43 +                - tag: Application
    5.44 +                  value: Доступность
    5.45 +        - uuid: b29a8e52cc3444d28c53a53f12970d15
    5.46 +          name: 'Максимальная сетевая задержка сервиса'
    5.47 +          type: SIMPLE
    5.48 +          key: 'icmppingsec["{HOST.CONN}",10,700,1000,5000,max]'
    5.49 +          value_type: FLOAT
    5.50 +          units: s
    5.51 +          tags:
    5.52 +            - tag: Proto
    5.53 +              value: ICMP
    5.54 +          triggers:
    5.55 +            - uuid: 98f8f82c16a04dd49e3b9edacfb484a4
    5.56 +              expression: 'last(/Monitoring HTTP AWNET/icmppingsec["{HOST.CONN}",10,700,1000,5000,max])>"200ms"'
    5.57 +              name: 'Больная сетевая задержка при доступе к сервису'
    5.58 +              priority: AVERAGE
    5.59 +              dependencies:
    5.60 +                - name: 'Большой уровень потерь пакетов'
    5.61 +                  expression: 'last(/Monitoring HTTP AWNET/icmppingloss["{HOST.CONN}",100,700,1000,5000])>50'
    5.62 +              tags:
    5.63 +                - tag: Application
    5.64 +                  value: Доступность
    5.65 +        - uuid: dd7ae5e67efe43f2a47b437d232079cb
    5.66 +          name: 'Минимальная сетевая задержка сервиса'
    5.67 +          type: SIMPLE
    5.68 +          key: 'icmppingsec["{HOST.CONN}",10,700,1000,5000,min]'
    5.69 +          value_type: FLOAT
    5.70 +          units: s
    5.71 +          tags:
    5.72 +            - tag: Proto
    5.73 +              value: ICMP
    5.74 +        - uuid: 8a682b9de14249d196886de1f6c4aace
    5.75 +          name: 'Время доступа к сервису - вторичный порт'
    5.76 +          type: SIMPLE
    5.77 +          key: 'net.tcp.service.perf[tcp,"{HOST.CONN}","{$AW.HTTP.PORT_EX}"]'
    5.78 +          value_type: FLOAT
    5.79 +          units: s
    5.80 +          tags:
    5.81 +            - tag: Proto
    5.82 +              value: HTTP
    5.83 +            - tag: SubProto
    5.84 +              value: TLS
    5.85 +          triggers:
    5.86 +            - uuid: 169c70370d5a41e18827d52de8706d36
    5.87 +              expression: 'last(/Monitoring HTTP AWNET/net.tcp.service.perf[tcp,"{HOST.CONN}","{$AW.HTTP.PORT_EX}"])=0'
    5.88 +              name: 'Сервис не доступен - вторичный порт'
    5.89 +              priority: HIGH
    5.90 +              tags:
    5.91 +                - tag: Application
    5.92 +                  value: Доступность
    5.93 +        - uuid: d276f7bdf45b45c18fd5e6dcd2d72b26
    5.94 +          name: 'Время доступа к сервису'
    5.95 +          type: SIMPLE
    5.96 +          key: 'net.tcp.service.perf[tcp,"{HOST.CONN}","{$AW.HTTP.PORT}"]'
    5.97 +          value_type: FLOAT
    5.98 +          units: s
    5.99 +          tags:
   5.100 +            - tag: Proto
   5.101 +              value: HTTP
   5.102 +            - tag: SubProto
   5.103 +              value: PLAIN
   5.104 +          triggers:
   5.105 +            - uuid: 3f26d6ca37c6486a8967901bc466e5b2
   5.106 +              expression: 'last(/Monitoring HTTP AWNET/net.tcp.service.perf[tcp,"{HOST.CONN}","{$AW.HTTP.PORT}"])=0'
   5.107 +              name: 'Сервис не доступен'
   5.108 +              priority: HIGH
   5.109 +              tags:
   5.110 +                - tag: Application
   5.111 +                  value: Доступность
   5.112 +      httptests:
   5.113 +        - uuid: da4b90b9053a43f195553c0a6634409b
   5.114 +          name: 'Основная проверка'
   5.115 +          agent: '{$AW.HTTP.AGENT_NAME}'
   5.116 +          steps:
   5.117 +            - name: 'Запрос страницы проверки'
   5.118 +              url: '{$AW.HTTP.SCHEMA}://{HOST.CONN}:{$AW.HTTP.PORT}{$AW.HTTP.TEST_URL}'
   5.119 +              follow_redirects: 'NO'
   5.120 +              status_codes: '{$AW.HTTP.HTTP_CHECK_RESPONSE_CODE}'
   5.121 +          tags:
   5.122 +            - tag: ChackType
   5.123 +              value: Основная
   5.124 +            - tag: Proto
   5.125 +              value: HTTP
   5.126 +      macros:
   5.127 +        - macro: '{$AW.HTTP.AGENT_NAME}'
   5.128 +          value: AWNET.ZABBIX
   5.129 +          description: 'Имя клиента для проверки'
   5.130 +        - macro: '{$AW.HTTP.HTTP_CHECK_RESPONSE_CODE}'
   5.131 +          value: '200'
   5.132 +          description: 'Статус код проверочного ссайта'
   5.133 +        - macro: '{$AW.HTTP.PORT}'
   5.134 +          value: '443'
   5.135 +          description: 'Основной порт сайта'
   5.136 +        - macro: '{$AW.HTTP.PORT_EX}'
   5.137 +          value: '80'
   5.138 +          description: 'Дополнительный порт, с него например могут идти перенаправления или там развёрнута система мониторинга сайта'
   5.139 +        - macro: '{$AW.HTTP.SCHEMA}'
   5.140 +          value: https
   5.141 +          description: 'Основная адресная схема сайта'
   5.142 +        - macro: '{$AW.HTTP.TEST_URL}'
   5.143 +          value: /
   5.144 +          description: 'URL для тестирования'
   5.145 +    - uuid: 0f6efdd37f094f65bf3c53fd6f1f551c
   5.146 +      template: 'Monitoring HTTP AWNET - PHP'
   5.147 +      name: 'Мониторинг HTTP AWNET - PHP'
   5.148 +      templates:
   5.149 +        - name: 'Monitoring HTTP AWNET'
   5.150 +      groups:
   5.151 +        - name: Templates/AWNET
   5.152 +      items:
   5.153 +        - uuid: 1c50367c783a44ae928e584aedc02b33
   5.154 +          name: 'PHP-FPM: Accepted connections per second'
   5.155 +          type: DEPENDENT
   5.156 +          key: php-fpm.conn_accepted.rate
   5.157 +          delay: '0'
   5.158 +          history: 7d
   5.159 +          value_type: FLOAT
   5.160 +          description: 'The number of accepted requests per second.'
   5.161 +          preprocessing:
   5.162 +            - type: JSONPATH
   5.163 +              parameters:
   5.164 +                - '$.[''accepted conn'']'
   5.165 +            - type: CHANGE_PER_SECOND
   5.166 +              parameters:
   5.167 +                - ''
   5.168 +          master_item:
   5.169 +            key: php-fpm.get_status
   5.170 +          tags:
   5.171 +            - tag: Application
   5.172 +              value: PHP-FPM
   5.173 +        - uuid: 9cc132b46638463da970001ae4c85159
   5.174 +          name: 'PHP-FPM: Get ping page'
   5.175 +          type: HTTP_AGENT
   5.176 +          key: php-fpm.get_ping
   5.177 +          history: '0'
   5.178 +          trends: '0'
   5.179 +          value_type: TEXT
   5.180 +          url: '{$PHP_FPM.SCHEME}://{HOST.CONN}:{$AW.HTTP.PORT_EX}{$PHP_FPM.PING.PAGE}'
   5.181 +          retrieve_mode: BOTH
   5.182 +          tags:
   5.183 +            - tag: Application
   5.184 +              value: 'Zabbix raw items'
   5.185 +        - uuid: 95f0f1fda78c49038802375a232fe539
   5.186 +          name: 'PHP-FPM: Get status page'
   5.187 +          type: HTTP_AGENT
   5.188 +          key: php-fpm.get_status
   5.189 +          history: '0'
   5.190 +          trends: '0'
   5.191 +          value_type: TEXT
   5.192 +          url: '{$PHP_FPM.SCHEME}://{HOST.CONN}:{$AW.HTTP.PORT_EX}{$PHP_FPM.STATUS.PAGE}?json'
   5.193 +          tags:
   5.194 +            - tag: Application
   5.195 +              value: 'Zabbix raw items'
   5.196 +        - uuid: 71b9110791e34264bb707e1aeb0032f9
   5.197 +          name: 'PHP-FPM: Listen queue'
   5.198 +          type: DEPENDENT
   5.199 +          key: php-fpm.listen_queue
   5.200 +          delay: '0'
   5.201 +          history: 7d
   5.202 +          description: 'The current number of connections that have been initiated, but not yet accepted.'
   5.203 +          preprocessing:
   5.204 +            - type: JSONPATH
   5.205 +              parameters:
   5.206 +                - '$.[''listen queue'']'
   5.207 +          master_item:
   5.208 +            key: php-fpm.get_status
   5.209 +          tags:
   5.210 +            - tag: Application
   5.211 +              value: PHP-FPM
   5.212 +        - uuid: 95bba027ff08422ebfeef4b664e7d9ba
   5.213 +          name: 'PHP-FPM: Listen queue, len'
   5.214 +          type: DEPENDENT
   5.215 +          key: php-fpm.listen_queue_len
   5.216 +          delay: '0'
   5.217 +          history: 7d
   5.218 +          description: 'Size of the socket queue of pending connections.'
   5.219 +          preprocessing:
   5.220 +            - type: JSONPATH
   5.221 +              parameters:
   5.222 +                - '$.[''listen queue len'']'
   5.223 +          master_item:
   5.224 +            key: php-fpm.get_status
   5.225 +          tags:
   5.226 +            - tag: Application
   5.227 +              value: PHP-FPM
   5.228 +        - uuid: 3abbb29d356c4191b84dec5cc227cc5e
   5.229 +          name: 'PHP-FPM: Listen queue, max'
   5.230 +          type: DEPENDENT
   5.231 +          key: php-fpm.listen_queue_max
   5.232 +          delay: '0'
   5.233 +          history: 7d
   5.234 +          description: 'The maximum number of requests in the queue of pending connections since this FPM pool has started.'
   5.235 +          preprocessing:
   5.236 +            - type: JSONPATH
   5.237 +              parameters:
   5.238 +                - '$.[''max listen queue'']'
   5.239 +          master_item:
   5.240 +            key: php-fpm.get_status
   5.241 +          tags:
   5.242 +            - tag: Application
   5.243 +              value: PHP-FPM
   5.244 +        - uuid: 9c0a29e0da454a0bb43ca71dd33ba668
   5.245 +          name: 'PHP-FPM: Queue usage'
   5.246 +          type: CALCULATED
   5.247 +          key: php-fpm.listen_queue_usage
   5.248 +          history: 7d
   5.249 +          value_type: FLOAT
   5.250 +          units: '%'
   5.251 +          params: 'last(//php-fpm.listen_queue)/(last(//php-fpm.listen_queue_len)+(last(//php-fpm.listen_queue_len)=0))*100'
   5.252 +          description: 'Queue utilization'
   5.253 +          tags:
   5.254 +            - tag: Application
   5.255 +              value: PHP-FPM
   5.256 +          triggers:
   5.257 +            - uuid: b4dbc689bd8f499b8f1dc5e94ddf0b04
   5.258 +              expression: 'min(/Monitoring HTTP AWNET - PHP/php-fpm.listen_queue_usage,15m)  > {$PHP_FPM.QUEUE.WARN.MAX}'
   5.259 +              name: 'PHP-FPM: Queue utilization is high (over {$PHP_FPM.QUEUE.WARN.MAX}% for 15m)'
   5.260 +              priority: WARNING
   5.261 +              description: 'The queue for this pool reached {$PHP_FPM.QUEUE.WARN.MAX}% of its maximum capacity. Items in queue represent the current number of connections that have been initiated on this pool, but not yet accepted.'
   5.262 +        - uuid: 047799c9fe31465ba3e450ae81cbb755
   5.263 +          name: 'PHP-FPM: Max children reached'
   5.264 +          type: DEPENDENT
   5.265 +          key: php-fpm.max_children
   5.266 +          delay: '0'
   5.267 +          history: 7d
   5.268 +          description: 'The number of times that pm.max_children has been reached since the php-fpm pool started'
   5.269 +          preprocessing:
   5.270 +            - type: JSONPATH
   5.271 +              parameters:
   5.272 +                - '$.[''max children reached'']'
   5.273 +            - type: SIMPLE_CHANGE
   5.274 +              parameters:
   5.275 +                - ''
   5.276 +          master_item:
   5.277 +            key: php-fpm.get_status
   5.278 +          tags:
   5.279 +            - tag: Application
   5.280 +              value: PHP-FPM
   5.281 +        - uuid: 6c65341ed101462d89f6ef4eaf3fac6e
   5.282 +          name: 'PHP-FPM: Pool name'
   5.283 +          type: DEPENDENT
   5.284 +          key: php-fpm.name
   5.285 +          delay: '0'
   5.286 +          history: 7d
   5.287 +          trends: '0'
   5.288 +          value_type: CHAR
   5.289 +          description: 'The name of current pool.'
   5.290 +          preprocessing:
   5.291 +            - type: JSONPATH
   5.292 +              parameters:
   5.293 +                - $.pool
   5.294 +            - type: DISCARD_UNCHANGED_HEARTBEAT
   5.295 +              parameters:
   5.296 +                - 3h
   5.297 +          master_item:
   5.298 +            key: php-fpm.get_status
   5.299 +          tags:
   5.300 +            - tag: Application
   5.301 +              value: PHP-FPM
   5.302 +        - uuid: d55bd360ac85416aa4a2c9fd233c7076
   5.303 +          name: 'PHP-FPM: Ping'
   5.304 +          type: DEPENDENT
   5.305 +          key: php-fpm.ping
   5.306 +          delay: '0'
   5.307 +          history: 7d
   5.308 +          preprocessing:
   5.309 +            - type: REGEX
   5.310 +              parameters:
   5.311 +                - '{$PHP_FPM.PING.REPLY}($|\n)'
   5.312 +                - '1'
   5.313 +              error_handler: CUSTOM_VALUE
   5.314 +              error_handler_params: '0'
   5.315 +          master_item:
   5.316 +            key: php-fpm.get_ping
   5.317 +          tags:
   5.318 +            - tag: Application
   5.319 +              value: PHP-FPM
   5.320 +          triggers:
   5.321 +            - uuid: a2cbca03ee18478cba2771ceed2eb3cc
   5.322 +              expression: 'last(/Monitoring HTTP AWNET - PHP/php-fpm.ping)=0 or nodata(/Monitoring HTTP AWNET - PHP/php-fpm.ping,3m)=1'
   5.323 +              name: 'PHP-FPM: Service is down'
   5.324 +              priority: HIGH
   5.325 +              manual_close: 'YES'
   5.326 +        - uuid: 3f4b713fd09c40fabd843f19ce78dac4
   5.327 +          name: 'PHP-FPM: Processes, active'
   5.328 +          type: DEPENDENT
   5.329 +          key: php-fpm.processes_active
   5.330 +          delay: '0'
   5.331 +          history: 7d
   5.332 +          description: 'The total number of active processes.'
   5.333 +          preprocessing:
   5.334 +            - type: JSONPATH
   5.335 +              parameters:
   5.336 +                - '$.[''active processes'']'
   5.337 +          master_item:
   5.338 +            key: php-fpm.get_status
   5.339 +          tags:
   5.340 +            - tag: Application
   5.341 +              value: PHP-FPM
   5.342 +        - uuid: 48f6cbea84a849f498d6e834960da817
   5.343 +          name: 'PHP-FPM: Processes, idle'
   5.344 +          type: DEPENDENT
   5.345 +          key: php-fpm.processes_idle
   5.346 +          delay: '0'
   5.347 +          history: 7d
   5.348 +          description: 'The total number of idle processes.'
   5.349 +          preprocessing:
   5.350 +            - type: JSONPATH
   5.351 +              parameters:
   5.352 +                - '$.[''idle processes'']'
   5.353 +          master_item:
   5.354 +            key: php-fpm.get_status
   5.355 +          tags:
   5.356 +            - tag: Application
   5.357 +              value: PHP-FPM
   5.358 +        - uuid: e60f966ef0d3496188054307d963583e
   5.359 +          name: 'PHP-FPM: Processes, max active'
   5.360 +          type: DEPENDENT
   5.361 +          key: php-fpm.processes_max_active
   5.362 +          delay: '0'
   5.363 +          history: 7d
   5.364 +          description: 'The highest value that ''active processes'' has reached since the php-fpm server started.'
   5.365 +          preprocessing:
   5.366 +            - type: JSONPATH
   5.367 +              parameters:
   5.368 +                - '$.[''max active processes'']'
   5.369 +          master_item:
   5.370 +            key: php-fpm.get_status
   5.371 +          tags:
   5.372 +            - tag: Application
   5.373 +              value: PHP-FPM
   5.374 +        - uuid: eca836fc846b4140bfb8a7dcd77f2a6b
   5.375 +          name: 'PHP-FPM: Processes, total'
   5.376 +          type: DEPENDENT
   5.377 +          key: php-fpm.processes_total
   5.378 +          delay: '0'
   5.379 +          history: 7d
   5.380 +          description: 'The total number of server processes currently running.'
   5.381 +          preprocessing:
   5.382 +            - type: JSONPATH
   5.383 +              parameters:
   5.384 +                - '$.[''total processes'']'
   5.385 +          master_item:
   5.386 +            key: php-fpm.get_status
   5.387 +          tags:
   5.388 +            - tag: Application
   5.389 +              value: PHP-FPM
   5.390 +        - uuid: 8f0bc115b7a94021a56d82858cc020cd
   5.391 +          name: 'PHP-FPM: Process manager'
   5.392 +          type: DEPENDENT
   5.393 +          key: php-fpm.process_manager
   5.394 +          delay: '0'
   5.395 +          history: 7d
   5.396 +          trends: '0'
   5.397 +          value_type: CHAR
   5.398 +          description: 'The method used by the process manager to control the number of child processes for this pool.'
   5.399 +          preprocessing:
   5.400 +            - type: JSONPATH
   5.401 +              parameters:
   5.402 +                - '$.[''process manager'']'
   5.403 +            - type: DISCARD_UNCHANGED_HEARTBEAT
   5.404 +              parameters:
   5.405 +                - 3h
   5.406 +          master_item:
   5.407 +            key: php-fpm.get_status
   5.408 +          tags:
   5.409 +            - tag: Application
   5.410 +              value: PHP-FPM
   5.411 +          triggers:
   5.412 +            - uuid: 5303f276e90746dba1909c6a8d24455e
   5.413 +              expression: 'last(/Monitoring HTTP AWNET - PHP/php-fpm.process_manager,#1)<>last(/Monitoring HTTP AWNET - PHP/php-fpm.process_manager,#2)'
   5.414 +              name: 'PHP-FPM: Manager  changed (new value received: {ITEM.VALUE})'
   5.415 +              priority: INFO
   5.416 +              description: 'PHP-FPM manager changed. Ack to close.'
   5.417 +              manual_close: 'YES'
   5.418 +        - uuid: d362245503f4424e8a794bc2374a6f93
   5.419 +          name: 'PHP-FPM: Slow requests'
   5.420 +          type: DEPENDENT
   5.421 +          key: php-fpm.slow_requests
   5.422 +          delay: '0'
   5.423 +          history: 7d
   5.424 +          description: 'The number of requests that exceeded your request_slowlog_timeout value.'
   5.425 +          preprocessing:
   5.426 +            - type: JSONPATH
   5.427 +              parameters:
   5.428 +                - '$.[''slow requests'']'
   5.429 +            - type: SIMPLE_CHANGE
   5.430 +              parameters:
   5.431 +                - ''
   5.432 +          master_item:
   5.433 +            key: php-fpm.get_status
   5.434 +          tags:
   5.435 +            - tag: Application
   5.436 +              value: PHP-FPM
   5.437 +          triggers:
   5.438 +            - uuid: 97c7a387c57245a6a9a4a23f3fb3ef58
   5.439 +              expression: 'min(/Monitoring HTTP AWNET - PHP/php-fpm.slow_requests,#3)>0'
   5.440 +              name: 'PHP-FPM: Detected slow requests'
   5.441 +              priority: WARNING
   5.442 +              description: 'PHP-FPM detected slow request. A slow request means that it took more time to execute than expected (defined in the configuration of your pool).'
   5.443 +        - uuid: bed55b93e18041c8ad623ee4c9895f1f
   5.444 +          name: 'PHP-FPM: Start time'
   5.445 +          type: DEPENDENT
   5.446 +          key: php-fpm.start_time
   5.447 +          delay: '0'
   5.448 +          history: 7d
   5.449 +          units: unixtime
   5.450 +          description: 'The time when this pool was started.'
   5.451 +          preprocessing:
   5.452 +            - type: JSONPATH
   5.453 +              parameters:
   5.454 +                - '$.[''start time'']'
   5.455 +          master_item:
   5.456 +            key: php-fpm.get_status
   5.457 +          tags:
   5.458 +            - tag: Application
   5.459 +              value: PHP-FPM
   5.460 +        - uuid: e8fdb88860454b6cb9a0f78f57838cd3
   5.461 +          name: 'PHP-FPM: Uptime'
   5.462 +          type: DEPENDENT
   5.463 +          key: php-fpm.uptime
   5.464 +          delay: '0'
   5.465 +          history: 7d
   5.466 +          units: s
   5.467 +          description: 'How long has this pool been running.'
   5.468 +          preprocessing:
   5.469 +            - type: JSONPATH
   5.470 +              parameters:
   5.471 +                - '$.[''start since'']'
   5.472 +          master_item:
   5.473 +            key: php-fpm.get_status
   5.474 +          tags:
   5.475 +            - tag: Application
   5.476 +              value: PHP-FPM
   5.477 +          triggers:
   5.478 +            - uuid: cb7285bc9a4a473a909354c9b9dabce4
   5.479 +              expression: 'nodata(/Monitoring HTTP AWNET - PHP/php-fpm.uptime,30m)=1'
   5.480 +              name: 'PHP-FPM: Failed to fetch info data (or no data for 30m)'
   5.481 +              priority: INFO
   5.482 +              description: 'Zabbix has not received data for items for the last 30 minutes'
   5.483 +              manual_close: 'YES'
   5.484 +              dependencies:
   5.485 +                - name: 'PHP-FPM: Service is down'
   5.486 +                  expression: 'last(/Monitoring HTTP AWNET - PHP/php-fpm.ping)=0 or nodata(/Monitoring HTTP AWNET - PHP/php-fpm.ping,3m)=1'
   5.487 +            - uuid: 81a7e762da1e4c56841206a60940c123
   5.488 +              expression: 'last(/Monitoring HTTP AWNET - PHP/php-fpm.uptime)<10m'
   5.489 +              name: 'PHP-FPM: has been restarted (uptime < 10m)'
   5.490 +              priority: INFO
   5.491 +              description: 'Uptime is less than 10 minutes'
   5.492 +              manual_close: 'YES'
   5.493 +        - uuid: 7f6ef0a370074296972af02183ea9551
   5.494 +          name: 'PHP-FPM: Version'
   5.495 +          type: DEPENDENT
   5.496 +          key: php-fpm.version
   5.497 +          delay: '0'
   5.498 +          history: 7d
   5.499 +          trends: '0'
   5.500 +          value_type: CHAR
   5.501 +          description: 'Current version PHP. Get from HTTP-Header "X-Powered-By" and may not work if you change default HTTP-headers.'
   5.502 +          preprocessing:
   5.503 +            - type: REGEX
   5.504 +              parameters:
   5.505 +                - '^[.\s\S]*X-Powered-By: PHP/([.\d]{1,})'
   5.506 +                - \1
   5.507 +              error_handler: DISCARD_VALUE
   5.508 +            - type: DISCARD_UNCHANGED_HEARTBEAT
   5.509 +              parameters:
   5.510 +                - 3h
   5.511 +          master_item:
   5.512 +            key: php-fpm.get_ping
   5.513 +          tags:
   5.514 +            - tag: Application
   5.515 +              value: PHP-FPM
   5.516 +          triggers:
   5.517 +            - uuid: ce0882caba9b4b8a8ab5d8b119713757
   5.518 +              expression: 'last(/Monitoring HTTP AWNET - PHP/php-fpm.version,#1)<>last(/Monitoring HTTP AWNET - PHP/php-fpm.version,#2) and length(last(/Monitoring HTTP AWNET - PHP/php-fpm.version))>0'
   5.519 +              name: 'PHP-FPM: Version has changed (new version: {ITEM.VALUE})'
   5.520 +              priority: INFO
   5.521 +              description: 'PHP-FPM version has changed. Ack to close.'
   5.522 +              manual_close: 'YES'
   5.523 +      macros:
   5.524 +        - macro: '{$PHP_FPM.PING.PAGE}'
   5.525 +          value: /php_ping
   5.526 +        - macro: '{$PHP_FPM.PING.REPLY}'
   5.527 +          value: pong
   5.528 +        - macro: '{$PHP_FPM.QUEUE.WARN.MAX}'
   5.529 +          value: '50'
   5.530 +        - macro: '{$PHP_FPM.SCHEME}'
   5.531 +          value: http
   5.532 +        - macro: '{$PHP_FPM.STATUS.PAGE}'
   5.533 +          value: /php_status
   5.534 +  triggers:
   5.535 +    - uuid: 963920735f48419eb8894454bf7f9806
   5.536 +      expression: 'last(/Monitoring HTTP AWNET/web.test.fail[Основная проверка])<>0 and (length(last(/Monitoring HTTP AWNET/web.test.error[Основная проверка]))=0 or length(last(/Monitoring HTTP AWNET/web.test.error[Основная проверка]))<>0)'
   5.537 +      name: 'Ошибка сервиса'
   5.538 +      opdata: 'Ошибка: {ITEM.VALUE2}'
   5.539 +      priority: HIGH
   5.540 +      dependencies:
   5.541 +        - name: 'Сервис не доступен'
   5.542 +          expression: 'last(/Monitoring HTTP AWNET/net.tcp.service.perf[tcp,"{HOST.CONN}","{$AW.HTTP.PORT}"])=0'
   5.543 +      tags:
   5.544 +        - tag: Application
   5.545 +          value: Доступность
   5.546 +    - uuid: 7902643a93f84303b7df08b3fd9634a3
   5.547 +      expression: 'last(/Monitoring HTTP AWNET/icmppingsec["{HOST.CONN}",10,700,1000,5000,max])=0 or last(/Monitoring HTTP AWNET/icmppingsec["{HOST.CONN}",10,700,1000,5000,min])=0'
   5.548 +      name: 'Потеря сетевой связности с сервисом'
   5.549 +      priority: HIGH
   5.550 +      tags:
   5.551 +        - tag: Application
   5.552 +          value: Доступность
   5.553 +  graphs:
   5.554 +    - uuid: ee0d4a5ec50c4ce09275e9b214311338
   5.555 +      name: 'PHP-FPM: Process'
   5.556 +      graph_items:
   5.557 +        - color: 1A7C11
   5.558 +          item:
   5.559 +            host: 'Monitoring HTTP AWNET - PHP'
   5.560 +            key: php-fpm.processes_max_active
   5.561 +        - sortorder: '1'
   5.562 +          color: 2774A4
   5.563 +          item:
   5.564 +            host: 'Monitoring HTTP AWNET - PHP'
   5.565 +            key: php-fpm.processes_idle
   5.566 +        - sortorder: '2'
   5.567 +          color: F63100
   5.568 +          item:
   5.569 +            host: 'Monitoring HTTP AWNET - PHP'
   5.570 +            key: php-fpm.processes_total
   5.571 +        - sortorder: '3'
   5.572 +          color: A54F10
   5.573 +          item:
   5.574 +            host: 'Monitoring HTTP AWNET - PHP'
   5.575 +            key: php-fpm.processes_active
   5.576 +    - uuid: 14dc2b1cb210498aa0f912d0316f4799
   5.577 +      name: 'PHP-FPM: Queue'
   5.578 +      graph_items:
   5.579 +        - color: 1A7C11
   5.580 +          item:
   5.581 +            host: 'Monitoring HTTP AWNET - PHP'
   5.582 +            key: php-fpm.listen_queue_len
   5.583 +        - sortorder: '1'
   5.584 +          color: 2774A4
   5.585 +          item:
   5.586 +            host: 'Monitoring HTTP AWNET - PHP'
   5.587 +            key: php-fpm.listen_queue
   5.588 +        - sortorder: '2'
   5.589 +          color: F63100
   5.590 +          item:
   5.591 +            host: 'Monitoring HTTP AWNET - PHP'
   5.592 +            key: php-fpm.listen_queue_max
   5.593 +    - uuid: 1e7b8c02fbf341379c938e24e3196574
   5.594 +      name: 'Время доступа к сервису'
   5.595 +      graph_items:
   5.596 +        - color: 1A7C11
   5.597 +          calc_fnc: ALL
   5.598 +          item:
   5.599 +            host: 'Monitoring HTTP AWNET'
   5.600 +            key: 'net.tcp.service.perf[tcp,"{HOST.CONN}","{$AW.HTTP.PORT}"]'
   5.601 +        - sortorder: '1'
   5.602 +          color: '274482'
   5.603 +          calc_fnc: ALL
   5.604 +          item:
   5.605 +            host: 'Monitoring HTTP AWNET'
   5.606 +            key: 'icmppingsec["{HOST.CONN}",10,700,1000,5000,max]'
   5.607 +        - sortorder: '2'
   5.608 +          color: F63100
   5.609 +          calc_fnc: ALL
   5.610 +          item:
   5.611 +            host: 'Monitoring HTTP AWNET'
   5.612 +            key: 'icmppingsec["{HOST.CONN}",10,700,1000,5000,min]'
   5.613 +        - sortorder: '3'
   5.614 +          color: 2774A4
   5.615 +          yaxisside: RIGHT
   5.616 +          calc_fnc: ALL
   5.617 +          item:
   5.618 +            host: 'Monitoring HTTP AWNET'
   5.619 +            key: 'web.test.time[Основная проверка,Запрос страницы проверки,resp]'
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/Linux.common/additions/apt.updater.sh	Sat Sep 30 22:30:25 2023 +0300
     6.3 @@ -0,0 +1,16 @@
     6.4 +#!/bin/sh
     6.5 +# devel.a0fs.ru --  -- v1.r202309.1 #
     6.6 +export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
     6.7 +
     6.8 +SYSLOG_ID="sys-updater"
     6.9 +
    6.10 +log () {
    6.11 +    logger -t "$SYSLOG_ID" "$@"
    6.12 +}
    6.13 +
    6.14 +{
    6.15 +    log "UPDATE START"
    6.16 +    apt update
    6.17 +    log "UPDATE END"
    6.18 +    
    6.19 +} 2>&1 | log
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/Linux.common/res/sudoers_config/zabbix	Sat Sep 30 22:30:25 2023 +0300
     7.3 @@ -0,0 +1,2 @@
     7.4 +Defaults:zabbix !requiretty
     7.5 +zabbix ALL=(root) NOPASSWD: /usr/bin/apt list --upgradable, /usr/bin/journalctl -p err -S *
     7.6 \ No newline at end of file
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/Linux.common/res/zabbix_agent_config/aw_linux_mon.conf	Sat Sep 30 22:30:25 2023 +0300
     8.3 @@ -0,0 +1,3 @@
     8.4 +Timeout=30
     8.5 +UserParameter=aw.linux.apt.updatable,sudo apt list --upgradable
     8.6 +UserParameter=aw.linux.journalctl[*],sudo journalctl -p err -S "$1 minutes ago"
     8.7 \ No newline at end of file
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/Linux.common/zbx_export_templates.yaml	Sat Sep 30 22:30:25 2023 +0300
     9.3 @@ -0,0 +1,122 @@
     9.4 +zabbix_export:
     9.5 +  version: '6.0'
     9.6 +  date: '2023-09-30T06:54:07Z'
     9.7 +  groups:
     9.8 +    - uuid: 22941f4e01294888a9bed3aae15f6ef9
     9.9 +      name: Templates/AWNET
    9.10 +  templates:
    9.11 +    - uuid: d9ed1ecc0bc14cafb7fcbd309ad9a944
    9.12 +      template: 'AWNET Linux Template'
    9.13 +      name: 'AWNET Linux Template'
    9.14 +      groups:
    9.15 +        - name: Templates/AWNET
    9.16 +      items:
    9.17 +        - uuid: 85da57ac953f48c5a1e08f74fb2b65d5
    9.18 +          name: 'Пакеты к обновлению'
    9.19 +          key: aw.linux.apt.updatable
    9.20 +          delay: 1h
    9.21 +          trends: '0'
    9.22 +          value_type: TEXT
    9.23 +          preprocessing:
    9.24 +            - type: JAVASCRIPT
    9.25 +              parameters:
    9.26 +                - |
    9.27 +                  var buf = value.split('\n');
    9.28 +                  var res = "";
    9.29 +                     
    9.30 +                  var re_test = [
    9.31 +                    /^WARNING:/,
    9.32 +                    /^Вывод списка/,
    9.33 +                  ];
    9.34 +                  
    9.35 +                  var flag;
    9.36 +                  for (var i in buf) {
    9.37 +                    flag = true;
    9.38 +                    for (var j in re_test) {
    9.39 +                      if (re_test[j].test(buf[i])) {
    9.40 +                        flag = false
    9.41 +                        break;
    9.42 +                      }
    9.43 +                    }
    9.44 +                    
    9.45 +                    if (flag && buf[i].length > 0) {
    9.46 +                      res += buf[i] + "\n";
    9.47 +                    }
    9.48 +                  }
    9.49 +                  
    9.50 +                  return res
    9.51 +            - type: NOT_MATCHES_REGEX
    9.52 +              parameters:
    9.53 +                - '^ *$'
    9.54 +              error_handler: DISCARD_VALUE
    9.55 +          tags:
    9.56 +            - tag: Module
    9.57 +              value: 'Система пакетов'
    9.58 +          triggers:
    9.59 +            - uuid: 9a2fbf76b8f44d45b8a987c1997de212
    9.60 +              expression: 'nodata(/AWNET Linux Template/aw.linux.apt.updatable,2h)=0'
    9.61 +              name: 'Появились обновления системы'
    9.62 +              opdata: '{ITEM.VALUE}'
    9.63 +              priority: WARNING
    9.64 +        - uuid: 33c23ce59f3c49068057013b35ffb849
    9.65 +          name: 'Ошибка в системном журнале'
    9.66 +          key: 'aw.linux.journalctl[2]'
    9.67 +          delay: 2m
    9.68 +          trends: '0'
    9.69 +          value_type: TEXT
    9.70 +          preprocessing:
    9.71 +            - type: JAVASCRIPT
    9.72 +              parameters:
    9.73 +                - |
    9.74 +                  var buf = value.split('\n');
    9.75 +                  var res = "";
    9.76 +                     
    9.77 +                  var re_test = [
    9.78 +                    new RegExp('^-- Journal begins'),
    9.79 +                    new RegExp('^-- No entries --'),
    9.80 +                    new RegExp('[0-9]{2} [0-9:]{8} [a-zA-Z0-9._-]* sudo\[[0-9]*\]: '),
    9.81 +                    new RegExp('CONFIG: restrict nopeer ignored'),
    9.82 +                    new RegExp('statistics directory /var/log/ntpsec/ does not exist or is unwriteable, error No such file or directory'),
    9.83 +                    new RegExp('error\: kex_exchange_identification\: Connection closed by remote host'),
    9.84 +                    new RegExp('error\: maximum authentication attempts exceeded for [^ ]* from [a-f0-9.:-]* port [0-9]+ ssh[0-9]*'),
    9.85 +                    new RegExp('error\: kex_exchange_identification\: client sent invalid protocol identifier "[^"]*"'),
    9.86 +                    new RegExp('error\: beginning MaxStartups throttling'),
    9.87 +                    new RegExp('error\: kex_exchange_identification\: read\: Connection reset by peer'),
    9.88 +                    new RegExp('error\: kex_exchange_identification\: banner line contains invalid characters'),
    9.89 +                    new RegExp('error\: maximum authentication attempts exceeded for invalid user [a-zA-Z0-9_.-]+ from [0-9a-f:.]+ port [0-9]+ ssh[0-9]*'),
    9.90 +                    new RegExp('fatal\: userauth_pubkey\: parse request failed: incomplete message'),
    9.91 +                    new RegExp('sshd\[[0-9]*\]\: error\: Protocol major versions differ\: [0-9]+ vs\. [0-9]+'),
    9.92 +                    new RegExp('sshd\[[0-9]*\]\: fatal\: userauth_finish\: Broken pipe \\[preauth\\]'),
    9.93 +                    new RegExp('openvpn\[[0-9]*\]\: [0-9.:a-fA-F]* Connection reset, restarting \\[[0-9]\\]'),
    9.94 +                    new RegExp('/system\.journal\: Journal header limits reached or header out-of-date, rotating\.'),
    9.95 +                  ];
    9.96 +                  
    9.97 +                  var flag;
    9.98 +                  for (var i in buf) {
    9.99 +                    flag = true;
   9.100 +                    for (var j in re_test) {
   9.101 +                      if (re_test[j].test(buf[i])) {
   9.102 +                        flag = false
   9.103 +                        break;
   9.104 +                      }
   9.105 +                    }
   9.106 +                    
   9.107 +                    if (flag) {
   9.108 +                      res += buf[i] + "\n";
   9.109 +                    }
   9.110 +                  }
   9.111 +                  
   9.112 +                  return res
   9.113 +            - type: NOT_MATCHES_REGEX
   9.114 +              parameters:
   9.115 +                - '^ *$'
   9.116 +              error_handler: DISCARD_VALUE
   9.117 +          tags:
   9.118 +            - tag: Module
   9.119 +              value: 'Системный журнал'
   9.120 +          triggers:
   9.121 +            - uuid: e8001f72a356424ea8e83abfd2a83c63
   9.122 +              expression: 'nodata(/AWNET Linux Template/aw.linux.journalctl[2],5m)=0'
   9.123 +              name: 'Ошибки в системном журнале'
   9.124 +              opdata: '{ITEM.VALUE}'
   9.125 +              priority: WARNING
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/rspamd/zbx_export_templates.yaml	Sat Sep 30 22:30:25 2023 +0300
    10.3 @@ -0,0 +1,166 @@
    10.4 +zabbix_export:
    10.5 +  version: '6.0'
    10.6 +  date: '2023-09-30T19:27:27Z'
    10.7 +  groups:
    10.8 +    - uuid: 22941f4e01294888a9bed3aae15f6ef9
    10.9 +      name: Templates/AWNET
   10.10 +  templates:
   10.11 +    - uuid: e7223de11bb74d62b29ed0d5918e9060
   10.12 +      template: rspamd
   10.13 +      name: rspamd
   10.14 +      groups:
   10.15 +        - name: Templates/AWNET
   10.16 +      items:
   10.17 +        - uuid: 8503b9843e35409f975709598a19b59e
   10.18 +          name: 'STAT: Добавление заголовка'
   10.19 +          type: DEPENDENT
   10.20 +          key: awnet.rspamd.stats.add_header
   10.21 +          delay: '0'
   10.22 +          preprocessing:
   10.23 +            - type: JSONPATH
   10.24 +              parameters:
   10.25 +                - '$.actions["add header"]'
   10.26 +          master_item:
   10.27 +            key: 'vfs.file.contents[{$RSPAMD.STATS}]'
   10.28 +        - uuid: 6a3048a5c1cc45ffad0ea0180a985d47
   10.29 +          name: 'STAT: Соединений'
   10.30 +          type: DEPENDENT
   10.31 +          key: awnet.rspamd.stats.connections
   10.32 +          delay: '0'
   10.33 +          preprocessing:
   10.34 +            - type: JSONPATH
   10.35 +              parameters:
   10.36 +                - $.connections
   10.37 +          master_item:
   10.38 +            key: 'vfs.file.contents[{$RSPAMD.STATS}]'
   10.39 +        - uuid: 4eaec9840db146c5ba7e5fedd6be1ee5
   10.40 +          name: 'STAT: Служебных соединений'
   10.41 +          type: DEPENDENT
   10.42 +          key: awnet.rspamd.stats.control_connections
   10.43 +          delay: '0'
   10.44 +          preprocessing:
   10.45 +            - type: JSONPATH
   10.46 +              parameters:
   10.47 +                - $.control_connections
   10.48 +          master_item:
   10.49 +            key: 'vfs.file.contents[{$RSPAMD.STATS}]'
   10.50 +        - uuid: 7204d5b6c02240c49692d9fa9d13e69b
   10.51 +          name: 'STAT: Отработка по схеме серого списка'
   10.52 +          type: DEPENDENT
   10.53 +          key: awnet.rspamd.stats.greylist
   10.54 +          delay: '0'
   10.55 +          preprocessing:
   10.56 +            - type: JSONPATH
   10.57 +              parameters:
   10.58 +                - $.actions.greylist
   10.59 +          master_item:
   10.60 +            key: 'vfs.file.contents[{$RSPAMD.STATS}]'
   10.61 +        - uuid: 7dfb5756c284479081315bc986353c3e
   10.62 +          name: 'STAT: Отправлено в обучающие механизмы'
   10.63 +          type: DEPENDENT
   10.64 +          key: awnet.rspamd.stats.learned
   10.65 +          delay: '0'
   10.66 +          preprocessing:
   10.67 +            - type: JSONPATH
   10.68 +              parameters:
   10.69 +                - $.learned
   10.70 +          master_item:
   10.71 +            key: 'vfs.file.contents[{$RSPAMD.STATS}]'
   10.72 +        - uuid: 6e8e201587b34ae7bf4c77461aa1b0e6
   10.73 +          name: 'STAT: Принято без претензий'
   10.74 +          type: DEPENDENT
   10.75 +          key: awnet.rspamd.stats.no_action
   10.76 +          delay: '0'
   10.77 +          preprocessing:
   10.78 +            - type: JSONPATH
   10.79 +              parameters:
   10.80 +                - '$.actions["no action"]'
   10.81 +          master_item:
   10.82 +            key: 'vfs.file.contents[{$RSPAMD.STATS}]'
   10.83 +        - uuid: 1536636235d043e79679b6bcc608b8c8
   10.84 +          name: 'STAT: Отброшено сообщений'
   10.85 +          type: DEPENDENT
   10.86 +          key: awnet.rspamd.stats.reject
   10.87 +          delay: '0'
   10.88 +          preprocessing:
   10.89 +            - type: JSONPATH
   10.90 +              parameters:
   10.91 +                - $.actions.reject
   10.92 +          master_item:
   10.93 +            key: 'vfs.file.contents[{$RSPAMD.STATS}]'
   10.94 +        - uuid: 97d38f7235244b1a9ebeca7925ff3c76
   10.95 +          name: 'STAT: Метка темы'
   10.96 +          type: DEPENDENT
   10.97 +          key: awnet.rspamd.stats.rewrite_subject
   10.98 +          delay: '0'
   10.99 +          preprocessing:
  10.100 +            - type: JSONPATH
  10.101 +              parameters:
  10.102 +                - '$.actions["rewrite subject"]'
  10.103 +          master_item:
  10.104 +            key: 'vfs.file.contents[{$RSPAMD.STATS}]'
  10.105 +        - uuid: 525c54f1d30c480baaa4dbc160c5ba97
  10.106 +          name: 'STAT: Отсканировано'
  10.107 +          type: DEPENDENT
  10.108 +          key: awnet.rspamd.stats.scanned
  10.109 +          delay: '0'
  10.110 +          preprocessing:
  10.111 +            - type: JSONPATH
  10.112 +              parameters:
  10.113 +                - $.scanned
  10.114 +          master_item:
  10.115 +            key: 'vfs.file.contents[{$RSPAMD.STATS}]'
  10.116 +        - uuid: a2b5ea4f60164fa3a5edbad812a63e32
  10.117 +          name: 'STAT: Отброшено мягко'
  10.118 +          type: DEPENDENT
  10.119 +          key: awnet.rspamd.stats.soft_reject
  10.120 +          delay: '0'
  10.121 +          preprocessing:
  10.122 +            - type: JSONPATH
  10.123 +              parameters:
  10.124 +                - '$.actions["soft reject"]'
  10.125 +          master_item:
  10.126 +            key: 'vfs.file.contents[{$RSPAMD.STATS}]'
  10.127 +        - uuid: 0f097475d0d64ce8b3423c3a7af4a927
  10.128 +          name: 'Состоянии порта управления'
  10.129 +          key: 'net.tcp.service[tcp,,{$RSPAMD.PORT}]'
  10.130 +          valuemap:
  10.131 +            name: 'Socket status'
  10.132 +          triggers:
  10.133 +            - uuid: 5bbbcffdb5464c0181b2e033ecbbbdce
  10.134 +              expression: 'last(/rspamd/net.tcp.service[tcp,,{$RSPAMD.PORT}])=0'
  10.135 +              name: 'Не доступен сервис управления'
  10.136 +              priority: HIGH
  10.137 +        - uuid: d91d4a931d204ce798e1e3f2e867b681
  10.138 +          name: 'Статистика сервиса'
  10.139 +          key: 'vfs.file.contents[{$RSPAMD.STATS}]'
  10.140 +          delay: 3m
  10.141 +          trends: '0'
  10.142 +          value_type: TEXT
  10.143 +        - uuid: 0f7f2b350233419f8963b22b735f92e9
  10.144 +          name: 'Обновление файла статистики'
  10.145 +          key: 'vfs.file.time[{$RSPAMD.STATS}]'
  10.146 +          units: unixtime
  10.147 +          triggers:
  10.148 +            - uuid: 1e0b231eb0d14d75bfcff0bbdb026cb3
  10.149 +              expression: 'now() - last(/rspamd/vfs.file.time[{$RSPAMD.STATS}])>15m'
  10.150 +              name: 'Слишком долго не обновлялся файл статистики'
  10.151 +              priority: HIGH
  10.152 +      tags:
  10.153 +        - tag: Application
  10.154 +          value: rspamd
  10.155 +      macros:
  10.156 +        - macro: '{$RSPAMD.PORT}'
  10.157 +          value: '11334'
  10.158 +          description: 'Порт управления'
  10.159 +        - macro: '{$RSPAMD.STATS}'
  10.160 +          value: /var/db/rspamd/stats.ucl
  10.161 +          description: 'Статистика сервиса'
  10.162 +      valuemaps:
  10.163 +        - uuid: 68a58b2ffb5e4703b392322cb801bf73
  10.164 +          name: 'Socket status'
  10.165 +          mappings:
  10.166 +            - value: '1'
  10.167 +              newvalue: OK
  10.168 +            - value: '0'
  10.169 +              newvalue: 'Connection FAIL'