Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-20992

Same words are repeated 2 times consecutively in templates text

XMLWordPrintable

    • Sprint 88 (May 2022), Sprint 89 (Jun 2022), Sprint 90 (Jul 2022)
    • 0.125

      There are many typos in templates when the same word is repeated twice, for example:
      Numeric value of of the problem update

      1) of of sequence:

      $ grep -ri " of\( \)*of " .
      ./app/kubernetes_http/kubernetes_api_server_http/README.md:|Kubernetes API |Kubernetes API: Client certificate expiration, p1 |<p>1 percentile of of the remaining lifetime on the certificate used to authenticate a request.</p> |CALCULATED |kubernetes.api.client_certificate_expiration_p1[{#SINGLETON}]<p>**Expression**:</p>`bucket_percentile(//kubernetes.api.client_certificate_expiration_seconds_bucket[*],5m,1)` |
      ./app/kubernetes_http/kubernetes_api_server_http/template_kubernetes_api_servers.yaml:              description: '1 percentile of of the remaining lifetime on the certificate used to authenticate a request.'
      ./media/opsgenie/media_opsgenie.yaml:            // Numeric value of of the problem update status. Possible values:
      ./media/topdesk/media_topdesk.yaml:            // Numeric value of of the problem update status. Possible values:
      

      2) failures failures sequence

      $ grep -ri " failures\( \)*failures " .
      ./app/etcd_http/README.md:|Etcd |Etcd: Etcd peer {#ETCD.PEER}: Receive failures failures |<p>The number of receive failures from the peer with ID {#ETCD.PEER}.</p> |DEPENDENT |etcd.received.fail.rate[{#ETCD.PEER}]<p>**Preprocessing**:</p><p>- PROMETHEUS_PATTERN: `etcd_network_peer_received_failures_total{To="{#ETCD.PEER}"}`</p><p>⛔️ON_FAIL: `CUSTOM_VALUE -> 0`</p><p>- CHANGE_PER_SECOND</p> |
      

      3) replica replica sequence
      $ grep -ri "replica( )*replica" .

      ./db/mssql_odbc/README.md:|MSSQL |MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health |<p>Indicates the recovery health of a secondary replica replica:</p><p>0 = In progress</p><p>1 = Online</p><p>2 = Unavailable</p> |DEPENDENT |mssql.secondary_recovery_health["{#GROUP_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}')].secondary_recovery_health.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
      ./db/mssql_odbc/template_db_mssql_odbc.yaml:                Indicates the recovery health of a secondary replica replica:
      
      

      4) on on sequence

      bash-3.2$ grep -ri " on\( \)*on" .
      ./net/brocade_foundry_sw_snmp/README.md:snChasFan2Table is not supported on  on the NetIron devices.
      ./media/rocketchat/README.md:- *short* - whether the field should be short or not. If *short*, there can be several fields on one line, otherwise, the field will be placed on a separate line.
      

      Methodology

      To find such typos run the following commands in the templates directory:

      $ FILES=$(find ./ -type f -name "*.*")
      $ for i in $FILES ; do  pcregrep -M '(\b[a-zA-Z]+)\s+\1\b' *  $i ; done
      

      or

      $ FILES=$(find ./ -type f -name "*.*")
      for i in $FILES ; do  egrep "(\b[a-zA-Z]+) \1\b" $i ; done
      

            drasikhov Denis Rasikhov
            arimdjonoks Artjoms Rimdjonoks
            Team INT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: