To manage Monitors created via Synthetic monitoring, we can use @elastic/synthetics package, as per the code of @elastic/synthetics , it internally uses API to communicate with Kibana regarding monitor changes.
I want to create a separate App to manage monitors based on Java for which I need API to manage the monitors instead of through @elastic/synthetics package, but I cant find any documentation for the its APIs.
The only issue is that I have to maintain YAML file for all lightweight monitors. If I want to update a monitor, than I have to update the YAML file and push the changes.
I have to frequently update the monitors via automations, which might be during deployments or any other changes, for which it would be much better/easy to trigger it via API for a single monitor.
@Raj_Jikadra, as @tsullivan noted, there is not currently a public API for managing monitors (the solution for that right now would be using Project Monitors and the @elastic/synthetics package as you have mentioned).
The PR https://github.com/elastic/kibana/pull/169928 is for adding APIs for managing monitors. I'd suggest following that issue/PR for updates, although don't have any timescales to share on when this might be available.
@PaulB-Elastic thanks for the reply, Will follow the PR. But just one question, i.e. don't we already have APIs for them, which is used by @elastic/synthetics package internally to create/update the monitors?
@Raj_Jikadra you are right that the package does communicate with Kibana, but this is through internal Elastic (non public) APIs. Public APIs will be documented and also more carefully considered with regards to making breaking changes, so it requires design/implementation to make this happen.
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.