zabbix_export:
  version: '6.2'
  date: '2024-12-23T03:27:59Z'
  template_groups:
    -
      uuid: 257cb9ff74e04915a115f902c91bc372
      name: TEMPLATES
  templates:
    -
      uuid: f0d3a0f1f287488ab4384e15aeca0967
      template: 'Template V Agent'
      name: 'Template V Agent'
      groups:
        -
          name: TEMPLATES
      items:
        -
          uuid: 8deebd89c4e740f78dda95138a3c0e2b
          name: 'V CPU deletor and dbdeletor'
          type: ZABBIX_ACTIVE
          key: 'proc.cpu.util[,,,deletor]'
          value_type: FLOAT
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 0ba6478f4e0f4b0d936e84e1eab672ea
          name: 'V CPU transformer'
          type: ZABBIX_ACTIVE
          key: 'proc.cpu.util[,,,transformer]'
          value_type: FLOAT
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 62c21ed5fe314fa3be6b8a0736d85986
          name: 'V CPU hislog'
          type: ZABBIX_ACTIVE
          key: 'proc.cpu.util[,,,hislog]'
          value_type: FLOAT
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 9f4c1482b53f4194946418b997a63a85
          name: 'V CPU trapsreceptor'
          type: ZABBIX_ACTIVE
          key: 'proc.cpu.util[,,,trapsreceptor]'
          value_type: FLOAT
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 5a6e9ef98c494d12b1e9fa47a5a96d1c
          name: 'V CPU rateservice system'
          type: ZABBIX_ACTIVE
          key: 'proc.cpu.util[,,system,rateservice]'
          value_type: FLOAT
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: c51c177692b5451f88df3e4bdd4bc04c
          name: 'V CPU parser'
          type: ZABBIX_ACTIVE
          key: 'proc.cpu.util[,,user,parser]'
          value_type: FLOAT
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: f3fc8332fb18430fbecf6410f39d244a
          name: 'V CPU rateservice'
          type: ZABBIX_ACTIVE
          key: 'proc.cpu.util[,,user,rateservice]'
          value_type: FLOAT
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: f91404cf19084fdc91cc04a2afb99211
          name: 'Mongo CPU'
          type: ZABBIX_ACTIVE
          key: 'proc.cpu.util[,mongod]'
          value_type: FLOAT
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 8b2e75450ef949ffab2a549004bcff83
          name: 'Postgres CPU'
          type: ZABBIX_ACTIVE
          key: 'proc.cpu.util[,postgres]'
          value_type: FLOAT
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 7661d405b15d429eaeb3788e8501a2b2
          name: 'V CPU notifier_mgr'
          type: ZABBIX_ACTIVE
          key: 'proc.cpu.util[python3,,user,notifier_mgr]'
          value_type: FLOAT
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 7c030aa233794b73b665b122fb6865d2
          name: 'V CPU collector'
          type: ZABBIX_ACTIVE
          key: 'proc.cpu.util[python3,,user,collector]'
          value_type: FLOAT
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 989ac6e0182a4d1a959a013a3011dc5a
          name: 'Python3 CPU'
          type: ZABBIX_ACTIVE
          key: 'proc.cpu.util[python3]'
          value_type: FLOAT
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 08b3bc10e6444b61afdeea8d7cb3f421
          name: 'Mongo Mem'
          type: ZABBIX_ACTIVE
          key: 'proc.mem[,mongod]'
        -
          uuid: 32ddcad488ff4b27b16cca92aa99f064
          name: 'Postgres Mem'
          type: ZABBIX_ACTIVE
          key: 'proc.mem[,postgres]'
        -
          uuid: 4e1cf6d29fff480bbd0dfb7b35112984
          name: 'Python3 Mem'
          type: ZABBIX_ACTIVE
          key: 'proc.mem[python3,root]'
        -
          uuid: 29902b2eaf8a434abf9f6a5f0cdbef88
          name: 'Mongo Proc Num'
          type: ZABBIX_ACTIVE
          key: 'proc.num[,mongod]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 652395b1ce0142b784a3039580afa7d8
          name: 'V ProcNum postgres'
          type: ZABBIX_ACTIVE
          key: 'proc.num[,postgres]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 554d79fd40d640e085a9bb043c40a918
          name: 'V ProcNum httpd'
          type: ZABBIX_ACTIVE
          key: 'proc.num[httpd]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: c5b1adaa44ec471e875dbf518d984350
          name: 'V ProcNum transformer'
          type: ZABBIX_ACTIVE
          key: 'proc.num[python3,,all,transformer]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 2d98b06bce1d46f38a373cfc809d1c60
          name: 'V ProcNum collector'
          type: ZABBIX_ACTIVE
          key: 'proc.num[python3,,all,collector]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: f437c457363b49fba2f8d261e622df75
          name: 'V ProcNum rater'
          type: ZABBIX_ACTIVE
          key: 'proc.num[python3,,all,rater]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 0f4413d2d69f4afcaeea18d3ef25171a
          name: 'V ProcNum parser'
          type: ZABBIX_ACTIVE
          key: 'proc.num[python3,,all,parser]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 255cb3f8f6864f9bbfb09588b7cfbc24
          name: 'V ProcNum scheduler'
          type: ZABBIX_ACTIVE
          key: 'proc.num[python3,,all,scheduler]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 6d2cc12d999f45b69d7500f2f0b92f13
          name: 'Python3 Proc Num'
          type: ZABBIX_ACTIVE
          key: 'proc.num[python3]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 6080d824fab747e2842280713f78f2c4
          name: 'CPU Load avg1'
          type: ZABBIX_ACTIVE
          key: 'system.cpu.load[all,avg1]'
          value_type: FLOAT
          request_method: POST
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
          triggers:
            -
              uuid: eec21a6fce38457cbed04ccef1cbdfe6
              expression: 'max(/Template V Agent/system.cpu.load[all,avg1],5m)>=32'
              name: 'on {HOST.NAME} TOO high CPU LOAD-avg1'
              priority: DISASTER
              description: 'Watch out!!! Check the server out IMMEDIATELY'
        -
          uuid: 03ec27473551404983b91b5650c8644c
          name: 'CPU Load avg15'
          type: ZABBIX_ACTIVE
          key: 'system.cpu.load[all,avg15]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
          triggers:
            -
              uuid: ede8c419645946d6a80aaf2c4a4bd581
              expression: 'max(/Template V Agent/system.cpu.load[all,avg15],5m)>=14'
              name: 'on {HOST.NAME} high CPU LOAD-avg15'
              priority: AVERAGE
              description: 'Watch out!!!'
              dependencies:
                -
                  name: 'on {HOST.NAME} TOO HIGH CPU LOAD-avg15'
                  expression: 'max(/Template V Agent/system.cpu.load[all,avg15],5m)>=16'
            -
              uuid: 3606e8a1ff7e44dba816f897af875070
              expression: 'max(/Template V Agent/system.cpu.load[all,avg15],5m)>=16'
              name: 'on {HOST.NAME} TOO HIGH CPU LOAD-avg15'
              priority: DISASTER
              description: 'Server processes too high. Take corrective actions IMMEDIATELY!!!'
        -
          uuid: cd642172f96a4a53a2c3bb5aa2bde3f6
          name: 'CPU Util avg1'
          type: ZABBIX_ACTIVE
          key: 'system.cpu.util[all,system,avg1]'
          value_type: FLOAT
          request_method: POST
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: fbb254383941420eba6c6a582784c614
          name: 'CPU util avg15'
          type: ZABBIX_ACTIVE
          key: 'system.cpu.util[all,system,avg15]'
          value_type: FLOAT
          request_method: POST
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
          triggers:
            -
              uuid: 2f0c29d43c454cd481f780e2367d78fd
              expression: 'max(/Template V Agent/system.cpu.util[all,system,avg15],5m)>=4'
              name: 'on {HOST.NAME} high CPU UTILIZATION-avg15'
              priority: AVERAGE
              description: 'Watch out!'
              dependencies:
                -
                  name: 'on {HOST.NAME} TOO HIGH CPU UTILIZATION-avg15'
                  expression: 'max(/Template V Agent/system.cpu.util[all,system,avg15],5m)>=6'
            -
              uuid: 6f394ddf4c214858899d0b6913f313ed
              expression: 'max(/Template V Agent/system.cpu.util[all,system,avg15],5m)>=6'
              name: 'on {HOST.NAME} TOO HIGH CPU UTILIZATION-avg15'
              priority: DISASTER
              description: 'Server processes too high. Take corrective actions IMMEDIATELY!!!'
        -
          uuid: 15e5f4646b8c4b6095a2f6fe3af031d1
          name: hostIPs
          type: ZABBIX_ACTIVE
          key: 'system.run[(curl -4 ifconfig.me ; echo ; ip a | grep -v valid.*lft ; echo ; echo "arp table:"; /usr/sbin/arp -a | sort ; echo ; echo ; ip r ; echo; ip -6 r ) 2>/dev/null ]'
          history: 10d
          trends: '0'
          value_type: TEXT
          description: |
            IP GW
            IPv4 
            IPv6
            ARP table
            Routes v4
            Routes v4
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - '172800'
        -
          uuid: 7ab8eaa070584c23ba8e045599e48fb7
          name: 'Used space DU /home/db/postgresql'
          type: ZABBIX_ACTIVE
          key: 'system.run[ du -sb /home/db/postgresql/base]'
          delay: 1h
          value_type: FLOAT
          units: B
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 0b17ac3a56684fcaab5098ef3aa19c46
          name: 'Parser service'
          type: ZABBIX_ACTIVE
          key: 'system.run[  if  (( $( ps -o etimes= $(pgrep -f parser.py ) |tr -d "0 \n" ) >  12 )) ; then echo 1 ; else echo 0 ; fi  ]'
          history: 60d
          trends: 180d
          triggers:
            -
              uuid: 284ba942be0340598abc4ee02505f0d3
              expression: 'last(/Template V Agent/system.run[  if  (( $( ps -o etimes= $(pgrep -f parser.py ) |tr -d "0 \n" ) >  12 )) ; then echo 1 ; else echo 0 ; fi  ],#3)=0'
              name: 'on {HOST.NAME} parser service'
              priority: HIGH
              description: 'mongod service. Check it out IMMEDIATELY!!!'
        -
          uuid: e6783a9805704163bfe4a21f919189ab
          name: 'HTTP service threads'
          type: ZABBIX_ACTIVE
          key: 'system.run[ ps -e -T  | awk ''/http|apache/{count++}END{print count}'' ]'
          history: 60d
          trends: 180d
          triggers:
            -
              uuid: 55fd78a8225742079f40c44c5aa61d97
              expression: 'last(/Template V Agent/system.run[ ps -e -T  | awk ''/http|apache/{count++}END{print count}'' ],#3)=0'
              name: 'on {HOST.NAME} http service down {EVENT.SEVERITY} ​ ​'
              priority: DISASTER
              description: 'http service. Check it out IMMEDIATELY!!!'
        -
          uuid: 63c5b932203542adb104b93f7617bbd0
          name: 'A 10.132.0.36: Out Octets PUDC06 0/4/4  4194313472'
          type: ZABBIX_ACTIVE
          key: 'system.run[ snmpbulkwalk -v2c -c comm_rd 10.132.0.36 -Oqs  1.3.6.1.4.1.2011.6.128.1.1.4.23.1.3.4194313472  ; snmpbulkwalk -v2c -c comm_rd 10.132.0.36 -Oqs 1.3.6.1.4.1.2011.6.128.1.1.4.23.1.3.4194338048 ]'
          delay: 1h
          history: '0'
          trends: '0'
          status: DISABLED
          value_type: LOG
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(3, 'ITEM XXX PON ONT scan OUT '+value);
                  
                  l=value.split(/\r?\n/);
                  OBJ=[]
                  
                  for (i= 0; i < l.length; ++i) {
                   v=l[i].split(" ")
                  
                   oid=v[0].split(".")
                  
                  // Zabbix.log(3, 'oid '+ oid );
                  
                   value=v[1]
                   index=oid[oid.length -1]
                   ponIdx=oid[oid.length -2]
                   name="ONT"+index
                   //Zabbix.log(3, 'line '+ l[i]);
                   //Zabbix.log(3, 'name '+ name );
                   //Zabbix.log(3, 'index '+ index);
                  
                  
                   obj={
                  'snmpindex': ponIdx+"."+index,
                  'ontIdx':index,
                  'ponIdx':ponIdx,
                  'outOctet': value,
                  'name': name
                  }
                  OBJ.push(obj)
                  
                  
                  }
                  Zabbix.log(3, ' ITEM XXX PON ONT OUT OBJ '+  JSON.stringify(OBJ ) );
                  
                  return  JSON.stringify(OBJ );
        -
          uuid: 015fcd4b896749dfa54569cc89d82040
          name: 'A 10.132.0.36: In Octets PUDC06 0/4/4  4194313472 4/5 4194338048'
          type: ZABBIX_ACTIVE
          key: 'system.run[ snmpbulkwalk -v2c -c comm_rd 10.132.0.36 -Oqs 1.3.6.1.4.1.2011.6.128.1.1.4.23.1.4.4194313472 ;  snmpbulkwalk -v2c -c comm_rd 10.132.0.36 -Oqs 1.3.6.1.4.1.2011.6.128.1.1.4.23.1.4.4194338048 ]'
          delay: 1h
          history: '0'
          trends: '0'
          status: DISABLED
          value_type: LOG
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(3, 'ONT PON scan IN '+value);
                  
                  l=value.split(/\r?\n/);
                  OBJ=[]
                  
                  for (i= 0; i < l.length; ++i) {
                   v=l[i].split(" ")
                  
                   oid=v[0].split(".")
                  
                  // Zabbix.log(3, 'oid '+ oid );
                  
                   value=v[1]
                   index=oid[oid.length -1]
                   ponIdx=oid[oid.length -2]
                   name="ONT"+index
                   //Zabbix.log(3, 'line '+ l[i]);
                   //Zabbix.log(3, 'name '+ name );
                   //Zabbix.log(3, 'index '+ index);
                  
                  
                   obj={
                  'snmpindex': ponIdx+"."+index,
                  'ontIdx':index,
                  'ponIdx':ponIdx,
                  'inOctet': value,
                  'name': name
                  }
                  OBJ.push(obj)
                  
                  
                  }
                  // Zabbix.log(3, ' out'+  JSON.stringify(OBJ ) );
                  
                  return  JSON.stringify(OBJ );
        -
          uuid: 8ab5d67ea2ad43ab91c92718d3de9a54
          name: 'HW OLCI01 SBEC13 4194328576 Rule Octets out'
          type: ZABBIX_ACTIVE
          key: 'system.run[  snmpbulkwalk -v2c  -c comm_rd 10.132.0.38 -Oqs  1.3.6.1.4.1.2011.6.128.1.1.4.23.1.3.4194328576]'
          delay: 5m
          history: 30d
          trends: '0'
          status: DISABLED
          value_type: LOG
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(3, 'ONT PON scan - OUT '+value);
                  
                  l=value.split(/\r?\n/);
                  OBJ=[]
                  
                  for (i= 0; i < l.length; ++i) {
                   v=l[i].split(" ")
                  
                   oid=v[0].split(".")
                  
                  // Zabbix.log(3, 'oid '+ oid );
                  
                   value=v[1]
                   index=oid[oid.length -1]
                   ponIdx=oid[oid.length -2]
                   name="ONT"+index
                   //Zabbix.log(3, 'line '+ l[i]);
                   //Zabbix.log(3, 'name '+ name );
                   //Zabbix.log(3, 'index '+ index);
                  
                  
                   obj={
                  'snmpindex': ponIdx+"."+index,
                  'ontIdx':index,
                  'ponIdx':ponIdx,
                  'outOctet': value,
                  'name': name
                  }
                  OBJ.push(obj)
                  
                  
                  }
                  // Zabbix.log(3, ' out'+  JSON.stringify(OBJ ) );
                  
                  return  JSON.stringify(OBJ );
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: ba2db2c8c5e04dc6bfd80f26008bb5db
          name: 'HW OLCI01 SBEC13 4194328576 Rule Octets IN'
          type: ZABBIX_ACTIVE
          key: 'system.run[  snmpbulkwalk -v2c  -c comm_rd 10.132.0.38 -Oqs  1.3.6.1.4.1.2011.6.128.1.1.4.23.1.4.4194328576]'
          delay: 5m
          history: 30d
          trends: '0'
          status: DISABLED
          value_type: LOG
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(3, 'ONT PON scan IN '+value);
                  
                  l=value.split(/\r?\n/);
                  OBJ=[]
                  
                  for (i= 0; i < l.length; ++i) {
                   v=l[i].split(" ")
                  
                   oid=v[0].split(".")
                  
                  // Zabbix.log(3, 'oid '+ oid );
                  
                   value=v[1]
                   index=oid[oid.length -1]
                   ponIdx=oid[oid.length -2]
                   name="ONT"+index
                   //Zabbix.log(3, 'line '+ l[i]);
                   //Zabbix.log(3, 'name '+ name );
                   //Zabbix.log(3, 'index '+ index);
                  
                  
                   obj={
                  'snmpindex': ponIdx+"."+index,
                  'ontIdx':index,
                  'ponIdx':ponIdx,
                  'inOctet': value,
                  'name': name
                  }
                  OBJ.push(obj)
                  
                  
                  }
                  // Zabbix.log(3, ' out'+  JSON.stringify(OBJ ) );
                  
                  return  JSON.stringify(OBJ );
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 95d0d897f09542de9b81b3b804a178bb
          name: 'OLT HW-OMAI02_PFL Eth10/0 Octets In'
          type: ZABBIX_ACTIVE
          key: 'system.run[   snmpbulkwalk -v2c  -Oqsv  -c comm_rd 10.132.0.44  1.3.6.1.2.1.31.1.1.1.6.234962944  ]'
          delay: 1h
          status: DISABLED
          units: bps
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN raw OMAI02: '+value);
                  return value;
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN after change per second: '+value);
                  return value;
            -
              type: MULTIPLIER
              parameters:
                - '8'
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN after multiplying by 8: '+value);
                  return value;
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 0a7c1bbb4db14465b3ddd6f95de64d96
          name: 'OLT HW-OMAI02_PFL Eth10/0 Octets Out'
          type: ZABBIX_ACTIVE
          key: 'system.run[   snmpbulkwalk -v2c  -Oqsv  -c comm_rd 10.132.0.44  1.3.6.1.2.1.31.1.1.1.10.234962944  ]'
          delay: 1h
          status: DISABLED
          units: bps
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS OUT raw: '+value);
                  return value;
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS OUT after change per second: '+value);
                  return value;
            -
              type: MULTIPLIER
              parameters:
                - '8'
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS OUT after multiplying by 8: '+value);
                  return value;
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: cf86a3e4feea47d180ad30862f033603
          name: 'OLT NK-OQLA01_LIM  nt-a1 Octets In'
          type: ZABBIX_ACTIVE
          key: 'system.run[   snmpbulkwalk -v2c  -Oqsv  -c NETMAN 10.132.0.42 1.3.6.1.2.1.31.1.1.1.6.35913728   ]'
          delay: 1h
          status: DISABLED
          units: bps
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN raw OQLA01  NT-a1: '+value);
                  return value;
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN after change per second: '+value);
                  return value;
            -
              type: MULTIPLIER
              parameters:
                - '8'
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN after multiplying by 8: '+value);
                  return value;
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: ebb46477b63f46a6838666bf2a078ed1
          name: 'OLT NK-OQLA01_LIM nt-b1 Octets In'
          type: ZABBIX_ACTIVE
          key: 'system.run[   snmpbulkwalk -v2c  -Oqsv  -c NETMAN 10.132.0.42 1.3.6.1.2.1.31.1.1.1.6.36110336   ]'
          delay: 1h
          status: DISABLED
          units: bps
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN raw OQLA01 NT-b1: '+value);
                  return value;
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN after change per second: '+value);
                  return value;
            -
              type: MULTIPLIER
              parameters:
                - '8'
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN after multiplying by 8: '+value);
                  return value;
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 9e7dbc9158654430815b2af1631ae92d
          name: 'OLT NK-OQLA01_LIM LT-1/1/3 Octets IN'
          type: ZABBIX_ACTIVE
          key: 'system.run[   snmpbulkwalk -v2c  -Oqsv  -c NETMAN 10.132.0.42 1.3.6.1.2.1.31.1.1.1.6.36339712  ]'
          delay: 1h
          status: DISABLED
          units: bps
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN raw OQLA01 LT-1/1/1: '+value);
                  return value;
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN after change per second: '+value);
                  return value;
            -
              type: MULTIPLIER
              parameters:
                - '8'
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN after multiplying by 8: '+value);
                  return value;
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 4c7dfe32c6ed47718be28083db4b899d
          name: 'OLT NK-OQLA01_LIM nt-a1 Octets Out'
          type: ZABBIX_ACTIVE
          key: 'system.run[   snmpbulkwalk -v2c  -Oqsv  -c NETMAN 10.132.0.42 1.3.6.1.2.1.31.1.1.1.10.35913728   ]'
          delay: 1h
          status: DISABLED
          units: bps
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS OUT raw OQLA01 NT-a1: '+value);
                  return value;
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS OUT after change per second: '+value);
                  return value;
            -
              type: MULTIPLIER
              parameters:
                - '8'
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS OUT after multiplying by 8: '+value);
                  return value;
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 3ad327ecc56c406da9dde9dbec286413
          name: 'OLT NK-OQLA01_LIM nt-b1 Octets Out'
          type: ZABBIX_ACTIVE
          key: 'system.run[   snmpbulkwalk -v2c  -Oqsv  -c NETMAN 10.132.0.42 1.3.6.1.2.1.31.1.1.1.10.36110336  ]'
          delay: 1h
          status: DISABLED
          units: bps
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS OUT raw OQLA01 NT-b1: '+value);
                  return value;
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS OUT after change per second: '+value);
                  return value;
            -
              type: MULTIPLIER
              parameters:
                - '8'
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS OUT after multiplying by 8: '+value);
                  return value;
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: d161c1fcb0c948bca7afdb7feb9f19f6
          name: 'OLT NK-OQLA01_LIM LT-1/1/3 Octets Out'
          type: ZABBIX_ACTIVE
          key: 'system.run[   snmpbulkwalk -v2c  -Oqsv  -c NETMAN 10.132.0.42 1.3.6.1.2.1.31.1.1.1.10.36339712   ]'
          delay: 1h
          status: DISABLED
          units: bps
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS OUT raw OQLA01 LT-1/1/1: '+value);
                  return value;
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN after change per second: '+value);
                  return value;
            -
              type: MULTIPLIER
              parameters:
                - '8'
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(4, 'HC OCTETS IN after multiplying by 8: '+value);
                  return value;
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: f492205995fd40539089cdeee3f2f85f
          name: ssh-rt.service
          type: ZABBIX_ACTIVE
          key: 'system.run[ sudo systemctl restart ssh-rt.service ; sudo systemctl status ssh-rt.service  ]'
          delay: 5m
          history: 10d
          trends: '0'
          status: DISABLED
          value_type: TEXT
          description: |
            IP GW
            IPv4 
            IPv6
            ARP table
            Routes v4
            Routes v4
             sudo systemctl restart sshd ;  sudo systemctl status sshd
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - '172800'
        -
          uuid: 6a14e0c86ee149f185347e941d2a228b
          name: 'host system command'
          type: ZABBIX_ACTIVE
          key: 'system.run[ sudo systemctl status ssh-rt.service ]'
          delay: 3m
          history: 10d
          trends: '0'
          status: DISABLED
          value_type: TEXT
          description: |
            IP GW
            IPv4 
            IPv6
            ARP table
            Routes v4
            Routes v4
            cat /etc/systemd/system/ssh-rt.service
        -
          uuid: 4a93d4bb4a7d4c85859f25acc34d49fc
          name: 'Mongo service'
          type: ZABBIX_ACTIVE
          key: 'system.run[  systemctl is-active mongod > /dev/null  &&  echo 1|| echo 0]'
          history: 60d
          trends: 180d
          triggers:
            -
              uuid: 67bae125a6ef4d7aaf35f4f90c416bb7
              expression: 'last(/Template V Agent/system.run[  systemctl is-active mongod > /dev/null  &&  echo 1|| echo 0],#3)=0'
              name: 'on {HOST.NAME} mongo service down {EVENT.SEVERITY} ​ ​'
              priority: DISASTER
              description: 'mongod service. Check it out IMMEDIATELY!!!'
        -
          uuid: d01937c3762f40188ed3d99f63b7f3f9
          name: 'Postgres service'
          type: ZABBIX_ACTIVE
          key: 'system.run[  systemctl is-active postgresql*.service  > /dev/null &&  echo 1|| echo 0]'
          history: 60d
          trends: 180d
          triggers:
            -
              uuid: 9a84ef123895437484d335fdbdcb7865
              expression: 'last(/Template V Agent/system.run[  systemctl is-active postgresql*.service  > /dev/null &&  echo 1|| echo 0],#3)=0'
              name: 'on {HOST.NAME} postgres service down {EVENT.SEVERITY} ​'
              priority: DISASTER
              description: 'Postgres service. Check it out IMMEDIATELY!!!'
              tags:
                -
                  tag: priority
                  value: high
                -
                  tag: severity
                  value: critical
        -
          uuid: de29cb7af2ff4ea0ad55f87c21d5c516
          name: 'Disk bps'
          type: ZABBIX_ACTIVE
          key: 'system.stat[disk,bps]'
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.000001'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 81c9ca1ac42948d78c85b4f52f5ea674
          name: 'Disk tps'
          type: ZABBIX_ACTIVE
          key: 'system.stat[disk,tps]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 29d0aadeeb1a4b78ab7ea21cc7480f9a
          name: 'Disk read'
          type: ZABBIX_ACTIVE
          key: 'vfs.dev.read[]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: afcbb9db3e044087858c9de7ddb97418
          name: 'Disk write'
          type: ZABBIX_ACTIVE
          key: 'vfs.dev.write[]'
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 158a11b471b04bd4ab01c20893c856ae
          name: 'Used space /home/db/mongo'
          type: ZABBIX_ACTIVE
          key: 'vfs.dir.size[/home/db/mongo,,,disk]'
          delay: 1h
          value_type: FLOAT
          units: B
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 63bcfeddd4ad411394e1e66bc4085f3f
          name: 'Used space /home/sys'
          type: ZABBIX_ACTIVE
          key: 'vfs.dir.size[/home/sys]'
          delay: 1h
          value_type: FLOAT
          units: B
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 37066270fb684bea845f5b12f6cb3364
          name: '% Free space /'
          type: ZABBIX_ACTIVE
          key: 'vfs.fs.size[/,pfree]'
          delay: 1h
          value_type: FLOAT
          units: '%'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
          triggers:
            -
              uuid: 6fccb470005f4b199768f5823f940758
              expression: 'last(/Template V Agent/vfs.fs.size[/,pfree],#1)<10'
              name: 'on {HOST.NAME} Low space /'
              priority: HIGH
              tags:
                -
                  tag: priority
                  value: high
                -
                  tag: severity
                  value: critical
        -
          uuid: f12920f0a4ba4139b068e9910874e21a
          name: '% Used space /'
          type: ZABBIX_ACTIVE
          key: 'vfs.fs.size[/,pused]'
          delay: 1h
          value_type: FLOAT
          units: '%'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 89794bad9a8d4c2a9d21a5ca2d071b44
          name: '% Free space /home'
          type: ZABBIX_ACTIVE
          key: 'vfs.fs.size[/home,pfree]'
          delay: 1h
          value_type: FLOAT
          units: '%'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 7dc085d5f4394ac69d169ea6a58712d6
          name: '% Used space /home'
          type: ZABBIX_ACTIVE
          key: 'vfs.fs.size[/home,pused]'
          delay: 1h
          value_type: FLOAT
          units: '%'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: a94ac410bccc40c49972120351ec2a43
          name: 'Available Memory'
          type: ZABBIX_ACTIVE
          key: 'vm.memory.size[available]'
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 5911de40030d4dd3b958ff96d2a4784a
          name: 'Total Memory'
          type: ZABBIX_ACTIVE
          key: 'vm.memory.size[total]'
          delay: 5m
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
        -
          uuid: 2d35d3a61f304f8e8c35dcead9677995
          name: 'Used Memory'
          type: ZABBIX_ACTIVE
          key: 'vm.memory.size[used]'
          delay: 5m
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: 'Zabbix agent'
      discovery_rules:
        -
          uuid: 6dab2954704a40ab8d91241083416761
          name: 'interface discovery'
          type: ZABBIX_ACTIVE
          key: 'system.run[ ip -4 -o a | awk ''{print $2} '' | uniq | grep -v lo ]'
          delay: 10m
          item_prototypes:
            -
              uuid: 5ee988400131462b88a949528caa496d
              name: 'CounterIn-{#IFNAME}-bps'
              type: ZABBIX_ACTIVE
              key: 'net.if.in[{#IFNAME},bytes]'
              units: bps
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
                -
                  type: MULTIPLIER
                  parameters:
                    - '8'
            -
              uuid: e63569dde82c4aaa98b137e6521216c6
              name: 'CounterIn-{#IFNAME}-daily'
              type: ZABBIX_ACTIVE
              key: 'net.if.in[{#IFNAME}]'
              delay: 0;wd1-7h15
              units: B
            -
              uuid: 21ebac83fd4c40ee8592276ecd2593a1
              name: 'CounterOut-{#IFNAME}-bps'
              type: ZABBIX_ACTIVE
              key: 'net.if.out[{#IFNAME},bytes]'
              units: bps
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
                -
                  type: MULTIPLIER
                  parameters:
                    - '8'
            -
              uuid: 076d409e8f4044a7815b80b04121052a
              name: 'CounterOut-{#IFNAME}-daily'
              type: ZABBIX_ACTIVE
              key: 'net.if.out[{#IFNAME}]'
              delay: '1439m;1439m/1-7,00:00-23:59'
              units: B
          graph_prototypes:
            -
              uuid: 615e9a188810425fb3a45c2990111aea
              name: '{#IFNAME} Counter Traffic'
              graph_items:
                -
                  color: 199C0D
                  calc_fnc: ALL
                  item:
                    host: 'Template V Agent'
                    key: 'net.if.in[{#IFNAME},bytes]'
                -
                  sortorder: '1'
                  color: F63100
                  calc_fnc: ALL
                  item:
                    host: 'Template V Agent'
                    key: 'net.if.out[{#IFNAME},bytes]'
          lld_macro_paths:
            -
              lld_macro: '{#IFNAME}'
              path: $.ifname
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  function convertToJSON(inputString) {
                      resultArray = [];
                      interfaceArray = inputString.trim().split('\n');
                    for (i=0 ;i < interfaceArray.length ; i++  ) {
                      resultArray.push({ ifname: interfaceArray[i] });
                  
                    }
                  
                      return JSON.stringify(resultArray);
                  }
                  
                  
                  return convertToJSON(value);
        -
          uuid: dddd9b78cfd640a9ad561e0326834d85
          name: 'HW PON Octets Discovery on  10.132.0.36  PUDC06'
          type: ZABBIX_ACTIVE
          key: 'system.run[ping 127.0.0.1 -c 1 ]'
          delay: 1d
          status: DISABLED
          item_prototypes:
            -
              uuid: 2f49031a57b049c2894632c5caab4878
              name: '{#PONNAME} {#PONINDEX} In'
              type: ZABBIX_ACTIVE
              key: 'system.run[ snmpbulkwalk -Ir -v2c -c comm_rd {#OLTIP} -Oqs 1.3.6.1.2.1.31.1.1.1.6.{#PONINDEX} ]'
              delay: 10m
              units: bps
              description: '{#OLTIP}'
              preprocessing:
                -
                  type: JAVASCRIPT
                  parameters:
                    - |
                      Zabbix.log(3, 'NEW PON DISCOVERY initial value '+ value);
                      
                       v=value.split(" ")
                      Zabbix.log(3, 'NEW PON DISCOVERY value '+ v[1]);
                      return v[1]
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
                -
                  type: MULTIPLIER
                  parameters:
                    - '8'
              tags:
                -
                  tag: octet
                  value: '{#PONNAME} In'
            -
              uuid: 11c11458e30245e683df14a06a89d15f
              name: '{#PONNAME} {#PONINDEX} Out'
              type: ZABBIX_ACTIVE
              key: 'system.run[ snmpbulkwalk -Ir -v2c -c comm_rd {#OLTIP} -Oqs 1.3.6.1.2.1.31.1.1.1.10.{#PONINDEX} ]'
              delay: 10m
              units: bps
              description: '{#OLTIP}'
              preprocessing:
                -
                  type: JAVASCRIPT
                  parameters:
                    - |
                      Zabbix.log(3, 'NEW PON DISCOVERY OUT initial value '+ value);
                      
                       v=value.split(" ")
                      
                      Zabbix.log(3, 'NEW PON DISCOVERY value '+ v[1]);
                      return v[1]
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
                -
                  type: MULTIPLIER
                  parameters:
                    - '8'
              tags:
                -
                  tag: octet
                  value: '{#PONNAME} Out'
          graph_prototypes:
            -
              uuid: 8442ee0864ad4be8b0c05efe63257c3d
              name: 'PON {#PONNAME} Traffic'
              graph_items:
                -
                  color: 199C0D
                  calc_fnc: ALL
                  item:
                    host: 'Template V Agent'
                    key: 'system.run[ snmpbulkwalk -Ir -v2c -c comm_rd {#OLTIP} -Oqs 1.3.6.1.2.1.31.1.1.1.6.{#PONINDEX} ]'
                -
                  sortorder: '1'
                  color: F63100
                  calc_fnc: ALL
                  item:
                    host: 'Template V Agent'
                    key: 'system.run[ snmpbulkwalk -Ir -v2c -c comm_rd {#OLTIP} -Oqs 1.3.6.1.2.1.31.1.1.1.10.{#PONINDEX} ]'
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  oltIP="10.132.0.36"
                  
                  Zabbix.log(4, ' PON DISCOVERY on '+ oltIP +  " place holder values"+ value );
                  
                  PONS=["4194313472-GPON 0/4/4","4194338048-GPON 0/4/5",
                  "4194411520-GPON 0/13/4", "4194411776-GPON 0/13/5"]
                  
                  //Zabbix.log(3, ' PON DISCOVERY on '+ oltIP +  " PONS:"+ PONS );
                  
                  OBJ=[]
                  
                  l=PONS
                  
                  for (i= 0; i < l.length; ++i) {
                  // Zabbix.log(3, '  PON DISCOVERY on '+ oltIP + ' pon: '+ l[i] );
                   v=l[i].split("-")
                  
                   ponIdx=v[0]
                   ponName=v[1]
                  
                   Zabbix.log(3, '  PON DISCOVERY on '+ oltIP + ' val '+ v );
                  // Zabbix.log(3, 'line '+ l[i]);
                  // Zabbix.log(3, 'name '+ name );
                  // Zabbix.log(3, 'index '+ index);
                  
                   obj={
                  '{#OLTIP}': oltIp,
                  '{#PONINDEX}':ponIdx,
                  '{#PONNAME}': ponName
                  }
                  OBJ.push(obj)
                  
                  
                  }
                  
                  Zabbix.log(3, ' PON DISCOVERY on '+ oltIP + " "+ JSON.stringify(OBJ ) );
                  
                  return  JSON.stringify(OBJ );
        -
          uuid: 11403ca0a1764fe5addee992a960abb4
          name: 'HW ONT IP Discovery on PUDC06'
          type: ZABBIX_ACTIVE
          key: 'system.run[  python3 /home/sys/os/txm_get_cluster_detail.py 14123  ]'
          delay: 1d
          status: DISABLED
          item_prototypes:
            -
              uuid: e7ab4c5f2c1b46f5bd980c7346e409b4
              name: '{#ONT.MOD} {#ONT.DESC} In'
              type: DEPENDENT
              key: 'sshInBytes[{#ONT.IP},{#ONT.DESC}]'
              delay: '0'
              units: bps
              description: '{#ONT.IP}'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - $.rx
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
                -
                  type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: 'system.run[  python3 /home/sys/os/ontSSHCmd.py {#ONT.IP} {#ONT.DESC}  ]'
              tags:
                -
                  tag: cluster
                  value: PUDC06
                -
                  tag: ip
                  value: '{#ONT.IP}'
                -
                  tag: ontModel
                  value: '{#ONT.MOD}'
                -
                  tag: pon
                  value: '{#PON.DESC}'
            -
              uuid: c66b13018fce4045bce90eb6eabd18b8
              name: '{#ONT.MOD} {#ONT.DESC} Out'
              type: DEPENDENT
              key: 'sshOutBytes[{#ONT.IP},{#ONT.DESC}]'
              delay: '0'
              units: bps
              description: '{#ONT.IP}'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - $.tx
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
                -
                  type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: 'system.run[  python3 /home/sys/os/ontSSHCmd.py {#ONT.IP} {#ONT.DESC}  ]'
              tags:
                -
                  tag: cluster
                  value: PUDC06
                -
                  tag: ip
                  value: '{#ONT.IP}'
                -
                  tag: ontModel
                  value: '{#ONT.MOD}'
                -
                  tag: pon
                  value: '{#PON.DESC}'
            -
              uuid: 3b1c0cfcbddd4f38a5b4c8b25ba53ca1
              name: 'ontSSH {#ONT.MOD} {#ONT.DESC} {#NAME}'
              type: ZABBIX_ACTIVE
              key: 'system.run[  python3 /home/sys/os/ontSSHCmd.py {#ONT.IP} {#ONT.DESC}  ]'
              delay: 1h
              trends: '0'
              value_type: LOG
          graph_prototypes:
            -
              uuid: 28e2b28754f14c8895c45825b7e64308
              name: '{#ONT.SN} {#ONT.IP} on {#PON.DESC}'
              graph_items:
                -
                  color: 199C0D
                  calc_fnc: ALL
                  item:
                    host: 'Template V Agent'
                    key: 'sshInBytes[{#ONT.IP},{#ONT.DESC}]'
                -
                  sortorder: '1'
                  color: F63100
                  calc_fnc: ALL
                  item:
                    host: 'Template V Agent'
                    key: 'sshOutBytes[{#ONT.IP},{#ONT.DESC}]'
        -
          uuid: a2f5b458d6e6454d9f425a01b259f375
          name: 'HW ONTs Octets PUDC06 - OECT01 GPON 0/4/4 4194313472  Discovery ( based on IN)'
          type: ZABBIX_ACTIVE
          key: 'system.run[ snmpbulkwalk -v2c -c comm_rd 10.132.0.36 -Oqs 1.3.6.1.4.1.2011.6.128.1.1.4.23.1.4.4194313472 ;   snmpwalk -v2c -c comm_rd 10.132.0.36 -Oqs 1.3.6.1.4.1.2011.6.128.1.1.4.23.1.4.4194338048 ]'
          delay: 1h
          status: DISABLED
          description: 'snmpbulkwalk -v2c -c comm_rd 10.132.0.36 -Oqs 1.3.6.1.4.1.2011.6.128.1.1.4.23.1.4.4194313472 ;   snmpwalk -v2c -c comm_rd 10.132.0.36 -Oqs 1.3.6.1.4.1.2011.6.128.1.1.4.23.1.4.4194338048'
          item_prototypes:
            -
              uuid: 2a436273a02e433180578445e01c45b1
              name: '{#PONINDEX} {#NAME} In'
              type: DEPENDENT
              key: 'hCInOctets[{#OLTIP},{#PONINDEX},{#ONTINDEX}]'
              delay: '0'
              units: bps
              description: '{#OLTIP}'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.ontIdx==''{#ONTINDEX}'' && @.ponIdx==''{#PONINDEX}'' ) ].inOctet.first()'
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
                -
                  type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: 'system.run[ snmpbulkwalk -v2c -c comm_rd 10.132.0.36 -Oqs 1.3.6.1.4.1.2011.6.128.1.1.4.23.1.4.4194313472 ;  snmpbulkwalk -v2c -c comm_rd 10.132.0.36 -Oqs 1.3.6.1.4.1.2011.6.128.1.1.4.23.1.4.4194338048 ]'
              tags:
                -
                  tag: cluster
                  value: PUDC06
                -
                  tag: octet
                  value: '{#NAME} In'
                -
                  tag: pon
                  value: '{#PONINDEX}'
            -
              uuid: 3d0f6ef2c5164bd2a65e9ce9a72d0c8b
              name: '{#PONINDEX} {#NAME} Out'
              type: DEPENDENT
              key: 'hCOutOctets[{#OLTIP},{#PONINDEX},{#ONTINDEX}]'
              delay: '0'
              units: bps
              description: '{#OLTIP}'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.ontIdx==''{#ONTINDEX}'' && @.ponIdx==''{#PONINDEX}'' ) ].outOctet.first()'
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
                -
                  type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: 'system.run[ snmpbulkwalk -v2c -c comm_rd 10.132.0.36 -Oqs  1.3.6.1.4.1.2011.6.128.1.1.4.23.1.3.4194313472  ; snmpbulkwalk -v2c -c comm_rd 10.132.0.36 -Oqs 1.3.6.1.4.1.2011.6.128.1.1.4.23.1.3.4194338048 ]'
              tags:
                -
                  tag: cluster
                  value: PUDC06
                -
                  tag: octet
                  value: '{#NAME} Out'
                -
                  tag: pon
                  value: '{#PONINDEX}'
          graph_prototypes:
            -
              uuid: 2647210d19be4b81af12ec49ee5ff442
              name: 'ONT {#NAME} on  {#PONINDEX}'
              graph_items:
                -
                  color: 199C0D
                  calc_fnc: ALL
                  item:
                    host: 'Template V Agent'
                    key: 'hCInOctets[{#OLTIP},{#PONINDEX},{#ONTINDEX}]'
                -
                  sortorder: '1'
                  color: F63100
                  calc_fnc: ALL
                  item:
                    host: 'Template V Agent'
                    key: 'hCOutOctets[{#OLTIP},{#PONINDEX},{#ONTINDEX}]'
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  Zabbix.log(3, 'ONT Discovery must be set the OLTIP when preprocessing');
                  oltIp="10.132.0.36"
                  
                  Zabbix.log(3, 'ONT Discovery  ');
                  Zabbix.log(3, 'ONT Discovery '+value);
                  
                  l=value.split(/\r?\n/);
                  OBJ=[]
                  
                  for (i= 0; i < l.length; ++i) {
                   v=l[i].split(" ")
                  
                   oid=v[0].split(".")
                  
                   Zabbix.log(3, 'oid '+ oid );
                   index=oid[oid.length -1]
                   ponIdx=oid[oid.length -2]
                   name="ONT"+index
                  // Zabbix.log(3, 'line '+ l[i]);
                  // Zabbix.log(3, 'name '+ name );
                   Zabbix.log(3, 'index '+ index);
                  
                  
                   obj={
                  '{#OLTIP}': oltIp,
                  '{#SNMPINDEX}': ponIdx+"."+index,
                  '{#ONTINDEX}':index,
                  '{#PONINDEX}':ponIdx,
                  '{#NAME}': name
                  }
                  OBJ.push(obj)
                  
                  
                  }
                   Zabbix.log(3, ' out'+  JSON.stringify(OBJ ) );
                  
                  return  JSON.stringify(OBJ );
      macros:
        -
          macro: '{$TXMDIR}'
          value: /home/sys
      dashboards:
        -
          uuid: df6acfef8c74466484fa5f14988ed888
          name: 'Host Txm dash'
          display_period: '1800'
          auto_start: 'NO'
          pages:
            -
              widgets:
                -
                  type: GRAPH_CLASSIC
                  width: '12'
                  height: '5'
                  fields:
                    -
                      type: GRAPH
                      name: graphid
                      value:
                        host: 'Template V Agent'
                        name: CPU
                -
                  type: GRAPH_CLASSIC
                  x: '12'
                  width: '12'
                  height: '5'
                  fields:
                    -
                      type: GRAPH
                      name: graphid
                      value:
                        host: 'Template V Agent'
                        name: MEM
                -
                  type: GRAPH_CLASSIC
                  'y': '5'
                  width: '12'
                  height: '5'
                  fields:
                    -
                      type: GRAPH
                      name: graphid
                      value:
                        host: 'Template V Agent'
                        name: 'Disk Space'
                -
                  type: GRAPH_PROTOTYPE
                  'y': '15'
                  width: '12'
                  height: '10'
                  fields:
                    -
                      type: INTEGER
                      name: columns
                      value: '1'
                    -
                      type: INTEGER
                      name: rows
                      value: '2'
                    -
                      type: GRAPH_PROTOTYPE
                      name: graphid
                      value:
                        host: 'Template V Agent'
                        name: '{#IFNAME} Counter Traffic'
                -
                  type: GRAPH_CLASSIC
                  x: '12'
                  'y': '5'
                  width: '12'
                  height: '5'
                  fields:
                    -
                      type: GRAPH
                      name: graphid
                      value:
                        host: 'Template V Agent'
                        name: 'CPU Linux Services'
                -
                  type: GRAPH_CLASSIC
                  x: '12'
                  'y': '10'
                  width: '12'
                  height: '5'
                  fields:
                    -
                      type: GRAPH
                      name: graphid
                      value:
                        host: 'Template V Agent'
                        name: 'CPU Txm Services'
                -
                  type: GRAPH_CLASSIC
                  'y': '10'
                  width: '12'
                  height: '5'
                  fields:
                    -
                      type: GRAPH
                      name: graphid
                      value:
                        host: 'Template V Agent'
                        name: 'Process Count'
        -
          uuid: 7e852ccb5e5445698292baed628a8262
          name: 'interfaces traffic'
          pages:
            -
              widgets:
                -
                  type: GRAPH_PROTOTYPE
                  width: '24'
                  height: '10'
                  fields:
                    -
                      type: INTEGER
                      name: rows
                      value: '4'
                    -
                      type: GRAPH_PROTOTYPE
                      name: graphid
                      value:
                        host: 'Template V Agent'
                        name: '{#IFNAME} Counter Traffic'
        -
          uuid: faa0a147067a420ea5d25bb404ed323f
          name: 'PUDC06 SNMP traffic'
          display_period: '3600'
          pages:
            -
              widgets:
                -
                  type: GRAPH_PROTOTYPE
                  width: '24'
                  height: '5'
                  fields:
                    -
                      type: INTEGER
                      name: columns
                      value: '4'
                    -
                      type: GRAPH_PROTOTYPE
                      name: graphid
                      value:
                        host: 'Template V Agent'
                        name: 'PON {#PONNAME} Traffic'
                -
                  type: GRAPH_PROTOTYPE
                  'y': '5'
                  width: '24'
                  height: '27'
                  fields:
                    -
                      type: INTEGER
                      name: columns
                      value: '4'
                    -
                      type: INTEGER
                      name: rows
                      value: '6'
                    -
                      type: GRAPH_PROTOTYPE
                      name: graphid
                      value:
                        host: 'Template V Agent'
                        name: 'ONT {#NAME} on  {#PONINDEX}'
        -
          uuid: c261a1c994fa47e998e9a731ad046cb7
          name: 'PUDC06 SSH TRAFFIC'
          display_period: '3600'
          auto_start: 'NO'
          pages:
            -
              widgets:
                -
                  type: GRAPH_PROTOTYPE
                  width: '24'
                  height: '25'
                  fields:
                    -
                      type: INTEGER
                      name: columns
                      value: '4'
                    -
                      type: INTEGER
                      name: rows
                      value: '6'
                    -
                      type: GRAPH_PROTOTYPE
                      name: graphid
                      value:
                        host: 'Template V Agent'
                        name: '{#ONT.SN} {#ONT.IP} on {#PON.DESC}'
  graphs:
    -
      uuid: edc2c3dc19e54088a00e5b2b7548dd49
      name: CPU
      show_work_period: 'NO'
      graph_items:
        -
          color: FF0000
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'system.cpu.load[all,avg1]'
        -
          sortorder: '1'
          drawtype: GRADIENT_LINE
          color: 2774A4
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'system.cpu.util[all,system,avg1]'
    -
      uuid: 6d13461d1ab84b4db26c8c7559ab3204
      name: 'CPU Linux Services'
      show_work_period: 'NO'
      graph_items:
        -
          color: 199C0D
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.cpu.util[,mongod]'
        -
          sortorder: '1'
          color: F63100
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.cpu.util[,postgres]'
        -
          sortorder: '2'
          color: F7941D
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.cpu.util[python3]'
    -
      uuid: 0f22600cdb5b4837ac95e2abd708a674
      name: 'CPU Txm Services'
      show_work_period: 'NO'
      graph_items:
        -
          color: 199C0D
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.cpu.util[python3,,user,notifier_mgr]'
        -
          sortorder: '1'
          color: F63100
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.cpu.util[,,,deletor]'
        -
          sortorder: '2'
          color: 2774A4
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.cpu.util[,,,transformer]'
        -
          sortorder: '3'
          color: F7941D
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.cpu.util[python3,,user,collector]'
        -
          sortorder: '4'
          color: FC6EA3
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.cpu.util[,,,hislog]'
        -
          sortorder: '5'
          color: 6C59DC
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.cpu.util[,,user,parser]'
        -
          sortorder: '6'
          color: C7A72D
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.cpu.util[,,user,rateservice]'
        -
          sortorder: '7'
          color: BA2A5D
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.cpu.util[,,system,rateservice]'
        -
          sortorder: '8'
          color: F230E0
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.cpu.util[,,,trapsreceptor]'
    -
      uuid: 6739c38cc39c4e3eb734d74277c1b2a7
      name: 'Disk Space'
      graph_items:
        -
          color: 1A7C11
          item:
            host: 'Template V Agent'
            key: 'vfs.fs.size[/home,pfree]'
        -
          sortorder: '1'
          color: 00FFFF
          yaxisside: RIGHT
          item:
            host: 'Template V Agent'
            key: 'vfs.dir.size[/home/db/mongo,,,disk]'
        -
          sortorder: '2'
          color: A54F10
          yaxisside: RIGHT
          item:
            host: 'Template V Agent'
            key: 'vfs.dir.size[/home/sys]'
        -
          sortorder: '3'
          color: FF0000
          item:
            host: 'Template V Agent'
            key: 'vfs.fs.size[/home,pused]'
        -
          sortorder: '4'
          color: 0040FF
          item:
            host: 'Template V Agent'
            key: 'vfs.fs.size[/,pfree]'
        -
          sortorder: '5'
          color: 199C0D
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'vfs.fs.size[/,pused]'
    -
      uuid: abeff6b0d98c4420a57b4f758cc4e603
      name: MEM
      show_work_period: 'NO'
      graph_items:
        -
          color: 00FF00
          yaxisside: RIGHT
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'vm.memory.size[available]'
        -
          sortorder: '1'
          color: FF0000
          yaxisside: RIGHT
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'vm.memory.size[used]'
        -
          sortorder: '2'
          color: BF00FF
          yaxisside: RIGHT
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'vm.memory.size[total]'
    -
      uuid: efe175f83fe14d05a33dab49e256d041
      name: 'Process Count'
      show_work_period: 'NO'
      graph_items:
        -
          color: 199C0D
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.num[python3,,all,transformer]'
        -
          sortorder: '1'
          color: F63100
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.num[python3,,all,collector]'
        -
          sortorder: '2'
          color: 2774A4
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.num[httpd]'
        -
          sortorder: '3'
          color: F7941D
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.num[python3,,all,rater]'
        -
          sortorder: '4'
          color: FC6EA3
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.num[python3,,all,parser]'
        -
          sortorder: '5'
          color: 6C59DC
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.num[,postgres]'
        -
          sortorder: '6'
          color: C7A72D
          calc_fnc: ALL
          item:
            host: 'Template V Agent'
            key: 'proc.num[python3,,all,scheduler]'
    -
      uuid: f8ce985542c6465987b62c8990bb5dcf
      name: 'Total Disk Space Pie'
      yaxismax: '0'
      show_work_period: 'NO'
      show_triggers: 'NO'
      type: PIE
      show_3d: 'YES'
      graph_items:
        -
          color: 0040FF
          item:
            host: 'Template V Agent'
            key: 'vfs.fs.size[/,pfree]'
        -
          sortorder: '1'
          color: 199C0D
          calc_fnc: MIN
          item:
            host: 'Template V Agent'
            key: 'vfs.fs.size[/,pused]'
