Dynatrace / Dynatrace-AppMon-Chef

Installs the Dynatrace Application Monitoring solution using Chef.
MIT License
12 stars 15 forks source link

automate system profile configuration (agent groups, sensor configuration, incidents, ...) #30

Open jkleinlercher opened 7 years ago

jkleinlercher commented 7 years ago

I would like to automate also the system profile creation and configuration. I didn't find any idempotent API (rest, cli, ..) I can use for this. Did I miss something or is that simply not possible now? Are there plans to provide an API for that? I would certainly participate in this project if I was able to use such an API.

best regards, Johannes

reinhard-brandstaedter commented 7 years ago

Hi Johannes, there is limited support on the system profile administration via REST (very limited tbh). Take a look at the server REST interfaces, you will find a few things like copying profile templates and agent groups but nothing beyond that, like creating sensors, BTs, measures etc. I've been pushing and asking for a "config management" API to automate these things for years but not much happened. I can definitely see the need for that and if you are a customer I can only advise to work through feature requests via Dynatrace's product management.

On the other hand I came up with some workarounds through what's called a "fastpack". It's basically a plugin that contains a profile (as XML), dashboards, etc.. These fastpacks can be deployed via REST. The drawback is that it will always overwrite the server side profile, so maintenance of the profile (settings, sensors, BTs, ...) is done completely offline. For a fully automated pipeline this could work: 1) maintain the profile in a dev env (changes via DT Client) 2) fetch the profile from dev env (the XML file) 3) modify the profile (prod settings, agent patterns, etc.) 4) build fastpack 5) deploy it to the (otherwise) unmodifyable DT server via fastpack/REST

If you need a starting point how to build a fastpack you can take a look at my integration for SAP Hybris.

Hope that helps a bit, Reinhard

jkleinlercher commented 7 years ago

Hi Reinhard,

thanks for the interesting idea with the fastpack. Although I am not sure if we can implement all our requirements with it. Let me shortly explain what we want to do:

I think these things can be implementend in the chef server cookbook. However, there are other configurations which are more dynamic and change with every environment or application/agent that gets monitored. We add a system profile for every specific application environment and maybe also agent groups, Incidents, Measures, Dashboards for every specific application.

Our vision is that with the deployment of any new or existing application in our WildFly/WebSphere/Whatever environment those configuration gets automatically added to the dynatrace server. We have everything automated in our application platform, but for every application someone needs to do some clicks in the dynatrace server to get the application monitored, which is simply not state of the art anymore. And I think those things can't be done with the pipeline you mentioned. What do you think?

reinhard-brandstaedter commented 7 years ago

Hi Johannes, you speak of exactly what I was thinking and requesting way back, a true config management API! Unfortunately it's non-existent to that extend. I really suggest to file a RFE with Dynatrace, either via the forums - there should be a very old post on this topic from myself somewhere but I can't find it anymore - or directly via product management/your corporate contact person.

Too bad I can't help any further :-(

Reinhard

reinhard-brandstaedter commented 7 years ago

btw. sensor packs can be deployed via fastpacks as well, so those are global changes to the server that can be pipelined that way.