Hi All,
We have imported our AWS resources into JSM Assets (Data center). We want to monitor particular object type (VPC Links) to be monitored so that it does not reach our limit. Can we track/monitor the same and we get notification/email regarding it.
Thanks & Regards,
Dharmin Patel
Hi Dharmin,
I am not sure you can achieve that with Jira base utilities as there is no way (as far as I know) to get the count of Asset objects returned by an AQL.
You could achieve this with a Groovy script similar to the following:
import com.atlassian.jira.component.ComponentAccessor
import com.riadalabs.jira.plugins.insight.channel.external.api.facade.IQLFacade
IQLFacade iqlFacade = ComponentAccessor.getOSGiComponentInstanceOfType(IQLFacade)
String aql = "Type your AQL here"
iqlFacade.findObjects(aql).size()
As you can see the findObjects method returns a list of ObjectBean objects. So you can simply use the size method to get the number you want to have.
You would have to store the script in your instance directories so that you can refer to the script from an object scheme automation (Object Schema > Configure > Automation), set a schedule of your choice as trigger and use the Groovy script as an action.
That way it is possible for us to achieve similar things.
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.