[ZBX-20992] Same words are repeated 2 times consecutively in templates text Created: 2022 May 04  Updated: 2024 Apr 10  Resolved: 2022 Aug 06

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: 6.2.0beta1
Fix Version/s: 5.0.27rc1, 6.0.8rc1, 6.2.2rc1, 6.4.0alpha1, 6.4 (plan)

Type: Problem report Priority: Trivial
Reporter: Artjoms Rimdjonoks Assignee: Denis Rasikhov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team INT
Sprint: Sprint 88 (May 2022), Sprint 89 (Jun 2022), Sprint 90 (Jul 2022)
Story Points: 0.125

 Description   

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


 Comments   
Comment by Denis Rasikhov [ 2022 Jul 29 ]

Fixed in:

Generated at Fri Apr 18 08:54:13 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.