This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

automating annotation creation in DPA when objects are changed in SQL

I would like to have an annotation automatically created when objects (stored procedures, indexes, etc.) are created or changed.

Does anyone already have a script to do that? Or, just point me to the DPA table(s) I will need to insert, and I can do it myself.

Parents
  • If you have already created a script to do this with the table needed.  It would be awesome if you could share. I was about to dig into it and create a script.

  • In order to create annotations automatically and from external scripts or processes, it is risky and you should avoid direct, manual updating of DPA repository tables via SQL. Instead, DPA supports automated annotation management via provided REST APIs created specifically for that purpose and include GET, POST, and DELETE actions.

    Example: When upgrading to new releases of software for an application using a database analyzed by DPA or upgrading the database's software version itself, it may be very useful to have your CI/CD or maintenance processes and scripts to add an annotation in DPA to track that point in time. Doing so allows you to readily see if sudden monitored metric value changes correlate closely in time to the software upgrade. 

    The DPA Administration guide provides a section "Automate tasks with the DPA REST API" that gives a general explanation of how to use and leverage the DPA REST APIs. In the Options page of the DPA browser UI, the "Management API Documentation" link within the Support->Utilities section not only further documents the DPA REST APIs but also provides an interactive Swagger interface for exploring the available API endpoints and try out API calls.  

    You can use scripts to call the API outside of the Swagger interface. See examples of Python and PowerShell scripts that call the DPA API. 

Reply
  • In order to create annotations automatically and from external scripts or processes, it is risky and you should avoid direct, manual updating of DPA repository tables via SQL. Instead, DPA supports automated annotation management via provided REST APIs created specifically for that purpose and include GET, POST, and DELETE actions.

    Example: When upgrading to new releases of software for an application using a database analyzed by DPA or upgrading the database's software version itself, it may be very useful to have your CI/CD or maintenance processes and scripts to add an annotation in DPA to track that point in time. Doing so allows you to readily see if sudden monitored metric value changes correlate closely in time to the software upgrade. 

    The DPA Administration guide provides a section "Automate tasks with the DPA REST API" that gives a general explanation of how to use and leverage the DPA REST APIs. In the Options page of the DPA browser UI, the "Management API Documentation" link within the Support->Utilities section not only further documents the DPA REST APIs but also provides an interactive Swagger interface for exploring the available API endpoints and try out API calls.  

    You can use scripts to call the API outside of the Swagger interface. See examples of Python and PowerShell scripts that call the DPA API. 

Children
No Data