Hi
I am trying to create items using a discovery rule. The rule is a dependent rule on an HTTP Agent item that pulls the JSON from a web service.
The JSON is formatted like this:
I have created an LLD Macro #DESCRIPTION to look at $..description. I have then setup an item prototype that should be called '{#DESCRIPTION} Status' . I would expect that to create three items, with the first one being called 'Apple Status'. However, it seems to insert characters which I can't work out how to remove, for example one of my items ends up being called '["Apple"] Status' . I need the LLD Macro to contain just the text that it receives from the JSON so that I can use pre-processing on the item prototype to integrate the status object for each using the macro to filter the JSON. I'm tempted to start writing a script to do it as this shouldn't be this difficult.
Thanks in advance.
Dan
I am trying to create items using a discovery rule. The rule is a dependent rule on an HTTP Agent item that pulls the JSON from a web service.
The JSON is formatted like this:
Code:
[{
"id": "196",
"status": "fruit",
"description": "Apple"
}, {
"id": "197",
"status": "fruit",
"description": "Orange"
}, {
"id": "198",
"status": "Vegetable",
"description": "Cabbage"
}]
Thanks in advance.
Dan
Comment