ncc.zabbix_templates

Yohn Y. 2024-04-25 Parent:dc53b904bac6 Child:ddddc38d5cf8

22:afe2333fd7b9 Go to Latest

ncc.zabbix_templates/authelia/zbx_export_templates.yaml

* Исправление груюых ошибок в шаблоне Authelia

History
     1.1 --- a/authelia/zbx_export_templates.yaml	Thu Apr 25 17:46:12 2024 +0300
     1.2 +++ b/authelia/zbx_export_templates.yaml	Thu Apr 25 20:49:48 2024 +0300
     1.3 @@ -1,6 +1,6 @@
     1.4  zabbix_export:
     1.5    version: '6.0'
     1.6 -  date: '2024-04-25T14:44:49Z'
     1.7 +  date: '2024-04-25T17:48:51Z'
     1.8    groups:
     1.9      - uuid: 22941f4e01294888a9bed3aae15f6ef9
    1.10        name: Templates/AWNET
    1.11 @@ -114,8 +114,28 @@
    1.12          - uuid: eb31c9fabf2f471f95b549e8a274d0a3
    1.13            name: '_ Сырые метрики authelia'
    1.14            key: 'web.page.get[{$AW.AUTHELIA.URL}]'
    1.15 +          history: '0'
    1.16            trends: '0'
    1.17            value_type: TEXT
    1.18 +          preprocessing:
    1.19 +            - type: JAVASCRIPT
    1.20 +              parameters:
    1.21 +                - |
    1.22 +                  var value_p = value.split('\n');
    1.23 +                  var flag = false;
    1.24 +                  var res = ''
    1.25 +                  
    1.26 +                  for (var i in value_p) {
    1.27 +                     var _buf = value_p[i].trim();
    1.28 +                     if (flag) {
    1.29 +                        res += _buf + '\n';
    1.30 +                     } else if (_buf.length == 0 && i > 1) {
    1.31 +                         flag = true;
    1.32 +                     }
    1.33 +                  }
    1.34 +                  
    1.35 +                  return res;
    1.36 +                  
    1.37            tags:
    1.38              - tag: Application
    1.39                value: Authelia