I want to notify a group of people when a virtual service is stopped due to errors. Is there a way that I can achieve this?
There may be a more elegant approach, but one method is to set up a monitor in Continuous Validation Service (CVS). Your monitor could be set to run on a certain frequency - for example every 15 minutes.
Refer here: Monitor with CVS (Continuous Validation Service) - DevTest Solutions - 10.0 - CA Technologies Documentation
The monitor could be a DevTest Test Case that uses the REST Invoke API to get a list of all services deployed to a given VSE. (Refer to: REST Invoke API - DevTest Solutions - 10.0 - CA Technologies Documentation).
The resulting XML response could be iterated to examine the status of each service (state) and look at the error count.
If any of the services have errors, use the Send Email Step to send a notification message. (For Send Mail, refer here: Send Email - DevTest Solutions - 10.0 - CA Technologies Documentation)
The text of the email might identify each of the services that has an error.
A very basic flow might look like this:
The attached test case is a bit of a hack and may not address all of your requirements, but it might provide a starting point to build from. Follow the reference link above to configure an Email Asset.
Thanks Joel... I have implemented as suggested above and it is working perfectly...
Do we have any option to start the services automatically, apart from enabling "Auto-Restart" option while deploying the service?
Review the API documented here: http://localhost:1505/api/swagger/#!/VSEs
Within the API, look under VSE for this example:
I am getting following error when I start the service which is offline.
1) VSM Name: NPP-I-79_PT_EPEv0.1.vsm
2) Name given during service deployment:
3) Stopped the service on portal
4) Generated URL
5) URL used in REST step: http://localhost:1505/api/Dcm/VSEs/NPP-I-79_PT_EPEv0.1/NPP-I-79_PT_EPEv0.1/actions/start (Under Headers tab I have parameterised credentials )
<?xml version="1.0" encoding="UTF-8"?><Error xmlns="http://www.ca.com/lisa/invoke/v2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ca.com/lisa/invoke/v2.0 Error.xsd" type="application/vnd.ca.lisaInvoke.error+xml"> <Id>1709</Id> <Message>VSE name is invalid, either you type a wrong name, or the VSE is not started. VSE name:NPP-I-79_PT_EPEv0.1</Message> <AdditionalInformation>com.itko.lisa.invoke.api.exception.NotFoundException: VSE name is invalid, either you type a wrong name, or the VSE is not started. VSE name:NPP-I-79_PT_EPEv0.1 at com.itko.lisa.invoke.resource.ThrowException.throwException(ThrowException.java:21) at com.itko.lisa.invoke.resource.VseResource.startVirtualService(VseResource.java:799) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497)
Hi Joel instead of using both "Service Name" and "Virtual Service Name" in the REST URL, I have used only service name and that time I am able to stop & start the services. I found this format, when I run the query to find the services status on the portal.
What the documentation calls Service Name is really the name of the VSE.
So, in the URL: http://localhost:1505/api/Dcm/VSEs/VSE/NPP-I-79_PT_EPEv0.1/actions/stop
the Service Name is the name of the VSE or /api/Dcm/VSEs/VSE.
If you were to rename the default name for the VSE to Perf_VSE, your URL would need to be
For the same test case, I used "http GET" to invoke the services deployed in VSE . But when i run this step, I'm not getting any response.
When i checked the URL (https://localhost:1505/api/Dcm/VSEs/VSE ) in browser, I can able to get the deployed VSE's details in XML format. Please guide me to resolve this issue. narasimharao.x.lingam
Did Joel's recommendation help you out with this issue?
Thanks Reid, Yes, Joel's solution is working fine
Retrieving data ...