Ad Widget

Collapse

How to separate each SQL query item and its value into separate items?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tozamba
    Junior Member
    • Sep 2022
    • 2

    #1

    How to separate each SQL query item and its value into separate items?

    I created an item:
    type: database monitor

    And the query returned this value: [{"{#EXAMPLE}":"Transparent","{#VALUE}":"1696"}, {"{ #EXAMPLE}":"Get","{#VALUE}" :"15"},{"{#EXAMPLE}":"Ping","{#VALUE}":"4"},{"{ #EX AMPLE}":"Active","{#VALUE}":" 10"}]

    Until then return expected.

    To separate the items ( {#EXAMPLE} ), I created a discovery rule with Item dependent on this query. ( The items that the query brings back can vary, sometimes it comes 4 {#EXAMPLE} sometimes 10 or 6 ...)
    In the Item Prototype I created an item dependent on the Initial Query.
    It separately loads each Item {#EXAMPLE} from this query, with their respective names.
    However, the Last value carries the entire Query return: [{"{#EXAMPLE}":"Transparent","{#VALUE}":"1696"}, {"{ #EXAMPLE}":"Get"," {#VALUE}":"15"},{"{#EXAMPLE}":"Ping","{#VALUE}":"4 "},{"{#EXAMPLE}":"Active","{# VALUE}":"10"}]

    How could I create a discovery list, dependent on this Main query, that creates an item for each {#EXAMPLE} and returns their respective {#VALUE}?​
Working...