Guidelines for Monitoring Setup on CA DevTest

Document ID : KB000010629
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

This document give you the option to use DevTest features  as a monitoring tool for DevTest services.  

Background:

Customer faced issues where some of the services stopped suddenly (Coordinator, Simulator, etc..) and would not be aware they were no longer running.  They had to login to the server machines and manually check the services to see the issue. They would like to set up a monitoring tool or Test case where they can get the notification when the services are down.

Environment:
All Support DevTest releases.
Instructions:

There are a couple of Options within the DevTest tool that can be used.

 

Option1: Use the ServiceManger command-line tool.  This utility lets you perform various actions on a Registry, Coordinator, Simulator, or VSE server.  The ServiceManager is included under the DevTest_Home/bin folder. 

 

Usage: 
ServiceManager -u <username> -p <password> -m <registry-spec> -s all 

-u <username> -p <password>  are DevTest credentials 

<registry-spec> is your registry connection specification 

-s all - Status 

So, for example 

ServiceManager -u admin -p admin -m tcp://ABC.net:2010/Registry -s all 

This command will attempt to connect to your Registry using admin/admin as credentials and provide you the status of the components connected to that Registry. 

You could have a bash script that runs this command every so often and check for the status. 

Option 2: Using the REST Invoke API 


Here is the documentation: 

https://docops.ca.com/devtest-solutions/9-5/en/reference/rest-invoke-api/explore-the-rest-invoke-api-from-the-web-interface 


Steps to Follow for Invoke API 

1. In a browser enter the URL : http://Registryhost:1505/api/swagger/ or http://localhost:1505/api/Dcm/api-docs 

This will give you the list of API commands you can use. 

2. Click on say Coordinator Server 
GET /CoordinatorServers - Gets the list of Coordinator resources registered with the Registry. 

 

You could use the Request URL as : http://localhost:1505/api/Dcm/CoordinatorServers 

 

The response I get back will contain : 
<?xml version="1.0" encoding="UTF-8"?> 
<CoordinatorServer xmlns="
http://www.ca.com/lisa/invoke/v2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Coordinator" xsi:schemaLocation="http://www.ca.com/lisa/invoke/v2.0 CoordinatorServer.xsd" href="http://localhost:1505/api/Dcm/CoordinatorServers/Coordinator" type="application/vnd.ca.lisaInvoke.coordinatorServer+xml"> 
<ConsoleURL>
http://localhost:1505</ConsoleURL> 
<HostAddress>localhost</HostAddress> 
<Status>OK: 0 Coordinators running. Memory used 131mb, allocated 271mb, max 683mb (19%) Our cpu usage 0%, system cpu used 28%</Status> 
<TestList href="
http://localhost:1505/api/Dcm/CoordinatorServers/Coordinator/Tests" type="application/vnd.ca.lisaInvoke.testList+xml" /> 
<Link href="
http://localhost:1505/api/Dcm/CoordinatorServers/Coordinator/actions" rel="actions" /> 
<Link href="
http://localhost:1505/api/Dcm/CoordinatorServers/Coordinator/actions/deployMar" rel="deployMar" /> 
</CoordinatorServer> 

 

 

3. Create a Test Case and add an HTTP step or a Rest Step
Give the URL :  
http://localhost:1505/api/Dcm/CoordinatorServers 

You could assert on the Step response for "Coordinator Running" or  "Status  OK" and if Assertion Fails then Go To- > an Email Step. This  step can send email to a recipient when the step fails. 

Do the same for Simulators / VSE etc... 

Http://localhost:1505/ should give you a response that shows that the Registry's Web console is up... 
http://localhost:1507/devtest/ - would show that the portal is up.. 

Create Monitor Marinfo file and deploy them to the CVS monitor. Configure the Monitors so that it runs every 2 hours for a period of time.

Additional Information:

Look under "REST Invoke API "   and "Use the ServiceManager" sections of our documentations for reference.