Ad Widget

Collapse

Wordwrap or regex on item name for honeycomb widget

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brambo
    Senior Member
    • Jul 2023
    • 245

    #1

    Wordwrap or regex on item name for honeycomb widget

    Is it possible to regex on the {ITEM.NAME} to for example show only the text after x amount of characters? or maybe word-wrap the {item.name} this last part is already a existing jira ticket https://support.zabbix.com/si/jira.i...ZBX-24480.html
    The use case for regex is that the items I want to show in the honeycombs all start with the same first 10 characters and not very helpful in visualizing the item name. (the name is coming from LLD rule and that name is also use in the jsonpath to gather the value)
    However if something is possible in the discovery rule that would be workable as well.
  • Brambo
    Senior Member
    • Jul 2023
    • 245

    #2
    Ok just found out that zabbix 7.0.4 has support for
    Code:
    {{ITEM.NAME}.regrepl("text1","replacement1")}
    and this works for me.
    For those interested: https://www.zabbix.com/documentation...ctions#regrepl

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #3
      "regsub" might be better. Just taking part of your item value, no need to replace anything

      Comment

      Working...