Some customers may want to monitor the status of the CA SDM service to make sure it is up and running.
Some monitoring software can execute PowerShell scripts. This document provides a very basic example on how to do that.
Release 17.1 or higher
CA Service Desk Manager
This document assumes you have some knowledge of Windows PowerShell and the CA Service Desk Manager Web Services API.
Broadcom Support provides this document as an example with no guarantees. Broadcom Support will not assist you with PowerShell. However, we can assist with any queries related to the Service Desk SOAP based Web Services API.
Requirements:
http://<example SDM server>:8080/axis/services/USD_R11_WebService?wsdl
# BEGIN SCRIPT
# This line will create connection to the wsdl.
$Client = New-WebServiceProxy -Uri 'http://<SDM-SERVER>:8080/axis/services/USD_R11_WebService?wsdl'
# This line will login to SOAP Web Services
$sid = $Client.login('<USERID>','<PASSWORD>')
# This line will display the relevant SID generated for the login
"SID Value: " + $sid
# This line will run a query of all requests and display the first 5 results
$Client.doSelect($sid, 'cr', 'id > 0', 5, ('ref_num', 'summary'))
# Logout the given session
$Client.logout($sid)
# END SCRIPT
Save the file.
PS C:\PSTest> .\test-sdm.ps1
SID Value: 1566374012
<?xml version="1.0" encoding="UTF-8"?><UDSObjectList>
<UDSObject>
<Handle>cr:400001</Handle>
<Attributes>
<Attribute DataType="2002">
<AttrName>ref_num</AttrName>
<AttrValue>22</AttrValue>
</Attribute>
<Attribute DataType="2002">
<AttrName>summary</AttrName>
<AttrValue>test</AttrValue>
</Attribute>
</Attributes>
</UDSObject>
<UDSObject>
<Handle>cr:3109</Handle>
<Attributes>
<Attribute DataType="2002">
<AttrName>ref_num</AttrName>
<AttrValue>UAPM:20</AttrValue>
</Attribute>
<Attribute DataType="2002">
<AttrName>summary</AttrName>
<AttrValue>UAPM Event</AttrValue>
</Attribute>
</Attributes>
</UDSObject>
03/25 19:39:31.254 [http-nio-8080-exec-5] INFO usdsda -1 Web Services session created 1566374012; user(TESTUSER); IP(127.0.0.1); session count 10
03/25 19:39:31.254 [http-nio-8080-exec-5] INFO usdjws65 -1 Web Services session created 1566374012 from caller IP 127.0.0.1
03/25 19:39:31.274 [http-nio-8080-exec-9] INFO usdsda -1 Web Services session logout 1566374012 from caller IP 127.0.0.1
03/25 19:39:31.274 [http-nio-8080-exec-9] INFO usdjws65 -1 Web Services session ended 1566374012; user(TESTUSER); IP(127.0.0.1); session count 7
The above is only a sample script that demonstrates basic SOAP access via Powershell and is provided "as is". Broadcom Support does not warrant the above script for functionality and bears no responsibility for its usage in any environment. Please take all necessary precautions before running the above script (test in a non-prod environment).
Broadcom Support is also not permitted to advise or collaborate on the above script, including any further modifications or changes.
A counterpart document for REST Web Services and Powershell testing is available in KB Article 281217.