Ad Widget

Collapse

Zabbix Synology renames ICMP ping to Template Module ICMP Ping

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jsommerville
    Junior Member
    • Feb 2024
    • 2

    #1

    Zabbix Synology renames ICMP ping to Template Module ICMP Ping

    I am running Zabbix 6.0, when importing the template_synology_diskstation it renames "ICMP ping" template to "Template Module ICMP Ping". It also links the template to Synology Diskstation.
    This breaks the ICMP ping link to other templates. This then breaks all my other dash boards.

    How do I keep this from happening?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Wonderful world of UUID-s in templates. I guess someone took "Template Module ICMP Ping", renamed it to "ICMP ping" and continued to use it... Synology template probably has links to the original "Template Module ICMP Ping" (or even comes with it). So now, when you import a template, it finds something already existing with same UUID-s and tries to overwrite those things... This is a mess.. You could rewrite all the uuid-s in the template (yaml) file before importing..:P I once wrote a little shell script for that..

    Code:
    #!/usr/bin/bash
    pat="uuid: [0-9a-z]{32}"
    IFS=''
    while read -r line
    do
    if [[ "$line" =~ $pat ]]
    then
    newuuid=`uuidgen -r | sed 's/-//g'`
    newline=`echo "$line" | sed 's/[0-9a-z]\{32\}/'$newuuid'/'`
    echo "$newline" >> template_out.yaml
    else
    echo "$line" >> template_out.yaml
    fi
    done
    Call it “script.sh < template.yaml” and it replaces all uuid-s.

    Comment

    Working...