Ad Widget

Collapse

Getting item's value into another item's name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dzoky
    Junior Member
    • Aug 2020
    • 4

    #1

    Getting item's value into another item's name

    Hi everyone! I hope you're having a good day.

    I began using Zabbix only a few weeks ago and I am using it for printer monitoring through SNMP OIDs. I managed to get all of my values, but there is one thing that I just can't get through. So here's what I need help with:

    Each host (printer) has two items:
    • Name2 (cartridge model);
    • Level%Now2 (current level).
    I am trying to somehow get Name1 value into the name of LevelNow1 so that I could fit everything into one graph with value as the graph and cartridge name in the legend.
    I can't rename Name2 to a static value because the actual model differs between devices.

    What I have:

    Click image for larger version

Name:	what_I_have.PNG
Views:	1706
Size:	63.6 KB
ID:	406270

    What I want:

    Click image for larger version

Name:	what_I_want.PNG
Views:	1656
Size:	37.9 KB
ID:	406271

    Has anyone had a situation like this and, maybe, could share what they know?
  • dzoky
    Junior Member
    • Aug 2020
    • 4

    #2
    Originally posted by splitek
    You are using template? I'm right?
    The only way to have dynamic names on hosts is to use LLD. The LLD can get the "kit name" and then build a item name from it.

    And some link about LLD: https://www.youtube.com/watch?v=CkQSUCw40KI
    Thank you! I managed to get LLDs and automated item creation working - very helpful and time saving things these are.

    But now I'm in another pickle - some values (part names) that I get come in HEX format instead of a readable string. I did some preprocessing and got them to a readable state but then I noticed that the received STRING values were just the half of the full names. It seems that LLD discovery rule process read just the part of the name - that's probably since HEX values are outputed, it would seem, in a few lines:

    Click image for larger version  Name:	mib.PNG Views:	0 Size:	36.6 KB ID:	406366
    And the discovery process would only grab the first line.
    Can I somehow force Zabbix to take the full value or maybe do some configuration with how Ubuntu (20.04) sees OID values?

    Running Ubuntu 20.04 and Zabbix 5.0

    Comment

    Working...