I can reach my goal. Anyway, if I want to use a more flexible syntax like this one (since I am not sure that SMTP service will be forever at position 4):
JSON body did not match 1 expressions or conditions 'rule 'Check Sendgrid SMTP status'($.components[?(@.name=="SMTP")].status == "operational") not matched
Can you explain me the reason?
Furthermore, if I use the following code just to check if SMTP object exists, it works:
Hi @rschirin - sorry we failed to get back to you promptly on this. I actually did pull down the same API last week and do a PoC. I was able to write an expression that worked well with the latest version of the library Heartbeat uses for processing JSON with this feature, but my expression didn't work for the version of the lib Heartbeat requires. I apologize that I failed to reply back here with a status update.
In any case, I'm glad you were able to solve the issue and I'll mention the case to my team that perhaps we can enhance the documentation around this feature.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.