Ad Widget

Collapse

Loadable Module History: zbx_module_history_write_cbs array items from same host?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jsteph
    Junior Member
    • Feb 2021
    • 1

    #1

    Loadable Module History: zbx_module_history_write_cbs array items from same host?

    Working on a module to push history data to an external service for additional processing.

    Is it guaranteed that all items within the history array relate to the same host, or is it possible that an item in the array is part of a different host?

    The difference would be the data structure i generate from the history array being something like this if all items in array are for the same host
    {
    "hostId:123,
    "values":{
    "<item_key>":<item_value>,
    "<item_key_2>":<item_value_2>
    }
    }
    vs

    [
    {
    "host_id":123,
    "item_key":<item_key_1>
    "value":<item_value_1>,
    },
    {
    "host_id":456,
    ....
    }
    ...
    ]
Working...