Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.
AppDynamics customers and established members should click the sign in button to authenticate.
I've created a custom metric that populates the events tab in database visibility with data from a query, is it possible to create an action that matches these to send them via email, HTTP request, etc?
I assume the other option is to pull them via the API but I'd rather not have to write something specifically to do this.
Solved! Go to Solution.
If the custom events are being populated, you can just create a new policy and select the Custom Events from the options
Which you can then add actions to send email etc. once those events are picked up
The Type needs to be set to the customevent type that you set for the custom events you are sending to AppDynamics
e.g if you set the customeventtype=mydbevents, you need to set that as the value for the type
If you look at the above documentation, you can set additional propertynames:propertyvalues, that you can use in the Policies, which you can't see in the UI, however, they are used in the Health rule policies to be used to filter different subtypes of Events.
Simple use case, you are sending both Oracle & MSSQL Events to AppDynamics
You can set the following in your script or tool that is sending the events to AppD.
Then set the following values depending on which DB Type the event is for(propertynames:propertyvalues)
dbtype:MSSQL or dbtype:ORACLE
That way you can create separate policies for MSSQL & Oracle by using the parameter values
I hope I am making sense:)
Completely misunderstood the initial request:)
Can you please provide more info on the following
I've created a custom metric that populates the events tab in database visibility with data from a query
Can you advise what you did here, created a custom metrics query? This in itself will not create events in the events tab, so I assume you created a health rule on the returned values. Which then populated the events tab correct?
, is it possible to create an action that matches these to send them via email, HTTP request, etc?
Yes, since you created the health rule, all you have to do, is create an action, e.g send an email to whomever. And the create a policy, which you then select the health rules, and the action that needs to happen when they are triggered
Ahhh so I went to Databases -> Configuration -> Custom Metrics and set the Custom Query Metric Type to be Event Data.
Put in my SQL query and selected the DBs to run it against and it creates events in Databases -> Events.
Ah ok, that makes things clear.
All you do, is create the action, e.g send email. And then you create policy, and in the custom event tab(add Custom Event Type attribute), you use the name you used when creating the custom database query.
So if your custom query was named - Query_1, you would set the Custom Event Type value in the Policy to that. Without adding any additional properties etc.
Hope this clears it up
Thanks for this, It helped me too. May I know if we can use the Properties to apply this policy only for specific events or make this policy applicable only for certain DB's in the cluster? If yes, How do we reference the Custom DB event fields?
Or is it possible to provide conditions on the DB Event Details which will have the query output?