Another node in the AgentData.Data xml

May 12, 2015 at 3:46 PM

For background, I am still using 2.4.

I have a custom object called Products and would like to see the information for this object added to the XML of the Data column in AgentData. This would only need to be done for one plugin.

Do you have a recommendation on the cleanest way to do this?

Thank you for the great product!
May 13, 2015 at 11:45 AM this custom object "Products" - is this data/object generated from a health check plugin? If so a quick win would be to add a json (or other serialisation format) of it to the "Properties" collection of the notification that the check creates - this should then be saved down into "Data".

Let me know if that fixes it!

May 13, 2015 at 4:10 PM
Yes. The Products object and data is generated from the plugin. However, I’m not sure I understand. The Add function of Properties doesn’t take a serialized object as it’s second argument. So, I must be missing something.

See below my attempt.

HealthCheckData healthCheckData = new HealthCheckData
Identity = this.Identity,
Info = "Reports Product Details",
Result = productDetailsList.Count < 1,
ResultCount = productDetailsList.Count,
Properties = new ResultProperties()

healthCheckData.Properties.Add("Product", mySerializedProduct);