Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
05-20-2021 05:16 PM - last edited on 06-17-2021 03:34 PM by Ryan.Paredez
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.
Thanks!
Jeremy.
Solved! Go to Solution.
05-21-2021 12:07 AM
Hi Jeremy
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
05-23-2021 02:29 PM
Thanks Mario, but I'm unsure what to put in for the type etc, any suggestions?
05-23-2021 11:53 PM - last edited on 06-17-2021 03:35 PM by Ryan.Paredez
Hi Jeremy
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.
customeventtype:mydbevents
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:)
05-24-2021 02:50 PM
Ahhhh I'm not sending them to AppD though, they are created thru the custom metrics section in the controller UI
05-25-2021 12:05 AM - last edited on 06-17-2021 03:36 PM by Ryan.Paredez
Thanks, Jeremy
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
05-26-2021 02:54 PM
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.
05-27-2021 06:22 AM
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
Ciao
05-31-2021 02:47 PM
Brilliant, that works, thanks!!
09-04-2023 03:42 AM
Hi Mario,
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?
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form