Ad Widget

Collapse

Item JSON schema

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HeavyRaider
    Junior Member
    • Mar 2025
    • 1

    #1

    Item JSON schema

    Hi Folks.

    Is there a way to see/know the item json data or schema that is returned by a discovery? For example, how does one configure an item using per_counter_en on Windows without knowing which json fields are available or returned? Likewise for adding an LLD macro where one needs to know what is available for $.path.to.node in order to configure JSONPath. This issue is wider than just this case and applies to configuring any item key. One needs to know that values are available before they can be configured. A similar issue applies to the built in discovery macros as this information is not consistently published (some are avaible in the Discovery section of the documentation, but not all ..)

    Thanks in advance.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4806

    #2

    I dont think ther is any more macros than mentoned #INSTANCE...
    you can run also zabbix_get with that discovery key to get the data ..
    Code:
    zabbix_get -s host -k perf_instance_en.discovery[Processor]
    [{"{#INSTANCE}":"0"},{"{#INSTANCE}":"1"},{"{#INSTANCE}":"2"},{"{#INSTANCE}":"3"},{"{#INSTANCE}":"4"},{"{#INSTANCE}":"5"},{"{#INSTANCE}":"6"},{"{#INSTANCE}":"7"},{"{#INSTANCE}":"_Total"}]
    WIth custom LLD, you probably have a example json? Then you can already see "the path"...

    Comment

    Working...