Hello,
I have a template item JSON_item that outputs a JSON like below.
My goal is to create graph(s) that take in that JSON, and output some calculations based on details of each user in that JSON. This means that I need to create dependent items for each user so that they can be added to the graph. Now, it is not feasible to create multiple items manually since the users are a lot. I've been looking into discovery rules to get the items created for each user. This is what I have so far.
I created a discovery rule for the same template, created it as 'dependent item' to JSON_item. Added an entry to LLD Macros as shown below.

This JSONPath should return a list like this:
(I'm having trouble finding a way to get the unique values from the list too but that's a question for another post I guess)
Now, I've created an item prototype for the discovery rule. It is also set as 'dependent item' for JSON_item (which I find weird because I thought that item prototype would automatically be a dependent item of discovery rule. But I had to set it as a dependent item and the discovery rule wasn't an option for parent items). I set the same JSONPath to pre-processing of item prototype because it is dependent of JSON_item.

Now I expect that an item for each user would be created in the template but I don't see any items being created. I clearly don't understand discovery rules enough so any help is appreciated. Thanks,
I have a template item JSON_item that outputs a JSON like below.
[
{
"User": "user1",
"Start": "2023-02-02T17:19:17",
"End": "2023-02-02T17:19:17",
},
{
"User": "user1",
"Start": "2023-02-02T17:19:17",
"End": "Unknown",
},
{
"User": "user2",
"Start": "2023-02-02T17:19:17",
"End": "Unknown",
},
{
"User": "user2",
"Start": "2023-02-02T17:19:17",
"End": "2023-02-02T17:19:17",
}
]
{
"User": "user1",
"Start": "2023-02-02T17:19:17",
"End": "2023-02-02T17:19:17",
},
{
"User": "user1",
"Start": "2023-02-02T17:19:17",
"End": "Unknown",
},
{
"User": "user2",
"Start": "2023-02-02T17:19:17",
"End": "Unknown",
},
{
"User": "user2",
"Start": "2023-02-02T17:19:17",
"End": "2023-02-02T17:19:17",
}
]
I created a discovery rule for the same template, created it as 'dependent item' to JSON_item. Added an entry to LLD Macros as shown below.
This JSONPath should return a list like this:
["user1","user1","user1","user2","user2"]
(I'm having trouble finding a way to get the unique values from the list too but that's a question for another post I guess)
Now, I've created an item prototype for the discovery rule. It is also set as 'dependent item' for JSON_item (which I find weird because I thought that item prototype would automatically be a dependent item of discovery rule. But I had to set it as a dependent item and the discovery rule wasn't an option for parent items). I set the same JSONPath to pre-processing of item prototype because it is dependent of JSON_item.
Now I expect that an item for each user would be created in the template but I don't see any items being created. I clearly don't understand discovery rules enough so any help is appreciated. Thanks,