🎄 Happy Holidays! 🥳

Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.

Happy Holidays!

Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.

SEMP v2- get if any one of the condition (where parameter) is true

Manikanta
Manikanta Member Posts: 17

http://applianceIP/SEMP/v2/monitor/msgVpns?where=eventConnectionCountThreshold.clearPercent!=40,eventIngressMsgRateThreshold.clearValue==300,enabled==true&select=msgVpnName
In the above example, i am getting the results if all conditions are true/satisfied. But is there any way to get if any one or more conditions are true?

Comments

  • Manikanta
    Manikanta Member Posts: 17

    Another question, Just to confirm PATCH call will only update what we passing right? It won't reset/change other attributes to default values right?

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 644 admin

    Hi @Manikanta..! I'm sure you've seen this page, yes? https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/monitor/index.html

    So yeah, using the , comma separator is the only (currently only) way to chain multiple conditions together for the where clause. It's an interesting idea, I'll pass it along internally for consideration.

    BUT, you could build the result yourself by just running 3 separate queries, and then de-duping on the Message VPN name. Not too hard, but not as simple as a single command.

    For your 2nd question (two in one thread!), I'll point you to the config schema: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/config/index.html It does list out all the supported HTTP methods, and their behaviour. But yes, your thinking about PATCH is correct.

  • Manikanta
    Manikanta Member Posts: 17

    Yes, have seen the swagger document. Thank you
    Yes we can do separate queries, but we have more numbers of Vpns and need to check multiples attributes with multiple conditions, So the number of hits we will make at a time will be higher.
    The best option we were thinking is GET all the properties of VPN, parse and compare through a custom script.

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 644 admin

    The best option we were thinking is GET all the properties of VPN, parse and compare through a custom script.

    Agreed, probably easier. The filtering capabilities provided by the SEMPv2 engine are decent, but if you want more advanced Boolean expressions or whatnot, probably much better to fetch everything locally, and then run your query there. Plus, allows you to run multiple queries on your "static" dataset without having to query SEMP repeatedly.