Ad Widget

Collapse

Widget item value and multiline

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MichaBl78
    Junior Member
    • Sep 2024
    • 2

    #1

    Widget item value and multiline

    Hi to everyone.
    I'm new to Zabbix and wanted to say, great tool.

    My question is about the widget item value and multiline support.
    I do an external check which has multiline values as result.
    My goal is to show this values on a dashboard.
    To name it: I want to show vlan ids and their names in a kind of table.

    Something like this:

    VlanID Name
    10 PCs
    20 Servers
    ...

    My first approach is to get the values by an external check and deliver them to Zabbix as text.
    If I do the check in the item definition site it shows me a a good result (There are multilines).
    Now at the dashboard site I added a widget (Item value) and placed my item value in it.
    The values show up but there is no line break. So there is only a sinle line of information.
    I guessed that I need to do someting with LF or CRLF, also tried something like <br> ... No line breaks.
    What do I do wrong?
    Also this is maybe the wrong approach. I think it would be better to return something like an array and put it in some kind of table, if possible.
    Any thoughts about this?

    Thanks
    Micha
  • swpyatt
    Junior Member
    • Jul 2024
    • 4

    #2
    Try using item history and switch it to HTML. Then you can use <br> and other HTML markups.

    Comment

    • MichaBl78
      Junior Member
      • Sep 2024
      • 2

      #3
      Thanks, good idea.

      Comment

      Working...