ITM 6.x SOAP Call Repository

The following repository is a list of discovered ITM 6 SOAP calls.

These SOAP calls may be run using the TEMS web-page “http://<TEMS_Hostname:1920///cms/soap“, the ITM command “kshsoap” or other SOAP tools. The syntax of “kshsoap” is discussed in this Knowledge Base tip.

Listing Depot Contents

<CT_Get>

<userid>$user</userid>

<password>$pw</password> <table>O4SRV.UTCTIME</table>

<sql>SELECT PRODUCT,VERSION,DESC,HOSTTYPE,HOSTVERS,PREREQ FROM KDY.KDYDEPT</sql>

</CT_Get>

Agent Status

<CT_Get>

<userid>$uid</userid>

<password>$pwd</password>

<object>ManagedSystem</object>

<attribute>Name</attribute>

<attribute>status</attribute>

<attribute>Managing_System</attribute>

<attribute>Version</attribute>

<attribute>Product</attribute>

</CT_Get>

Running Remote Commands

<CT_Get>

<userid>$user</userid>

<password>$pw</password>

<target>$agent</target>

<object>Remote_System_Command</object>

<afilter><![CDATA[Command;EQ;$command]]></afilter>

</CT_Get>
Post Fix Pack 04:

<CT_Get>

<userid>sysadmin</userid>

<password>XXX</password>

<table>O4SRV.CLACTRMT</table>

<sql><![CDATA[SELECT RESULT FROM O4SRV.CLACTRMT AT (‘AGENTS_TEMS’) WHERE ORIGINNODE=’AGENT_NAME’ AND CLCMD=’COMMAND_TO_RUN’ AND SYSTEM.PARMA(‘TIMEOUT’,’30’,2)]]></sql>

</CT_Get>

View Remote Command Log

<CT_Get>

<userid>sysadmin</userid>

<password>XXX</password>

<table>O4SRV.CLACTRMT</table>

</CT_Get>

Listing Situation Status from the OPLOG

<CT_Get>

<userid>$user</userid>

<password>$pw</password>

<table>O4SRV.LOCALTIME</table>

<sql>SELECT DATETIME, MSGTEXT FROM O4SRV.OPLOG AT(‘$mansys’) WHERE ORIGINNODE = ‘$magent’ ORDER BY DATETIME</sql>

</CT_Get>

    $mansys is the managing system (i.e. Remote TEMS name)
    $magent is the agent name

This information is also held in the .LG0 logs on the agent itself

Copying Universal Agent Files

<CT_Get>

<userid>$user</userid>

<password>$pw</password>

<table>KDY.KDYDPLY</table>

<sql>SELECT RETVAL, RETMSGID, RETMSGPARM FROM KDY.KDYDPLY WHERE TARGETMSN = ‘$agent’ AND COMMAND = ‘SETCONFIG’ AND UACONFIG = ‘$file’ AND UASCRIPT = ‘$files’ AND CONTEXT = ‘RESTART=N'</sql>

</CT_Get>

A pre-req is creating %CANDLEHOME%cmsDepotUASCRIPT and %CANDLEHOME%cmsDepotUACONFIG and copying the config and scripts you want to copy into these 2 directories

Schema of all installed objects

Note that this object has been know to fail intermittently:

<CT_Get>

<userid>sysadmin</userid>

<password>xxxx</password>

<table>SYSTEM.SYSTABLES</table>

<column>APPL_NAME</column>

<column>TABL_NAME</column>

</CT_Get>

Sending an Alert

If the situation exists and is associated with the source system, it will raise the situation as a proper ‘traffic-light’ alert. If the situation does not exist; it will be treated as a un-associated situation. I.e. write an entry to the Message Log & fire to TEC (if configured)

<CT_Alert>

<name>situation_XXX</name>

<source>Agent_Raising_Alert</source>

<data><NT_Logical_Disk.Disk_Name>C:</NT_Logical_Disk.Disk_Name></data>

<item>Display Message</item>

<userid>sysadmin</userid>

<password>xxxx</password>

</CT_Alert>
Close event must match raised event criteria name, source and item exactly:

<CT_Reset>

<name>situation_XXX</name>

<source>Agent_Closing_Alert</source>

<item>Display Message</item>

<userid>sysadmin</userid>

<password>xxx</password>

</CT_Reset>

System Search

Test if agent online/search for agents on a host – note that like clause is case sensitive when processing the agent hostname:
<CT_Get>

<userid>sysadmin</userid>

<password>XXX</password>

<table>O4SRV.UTCTIME</table>

<sql>SELECT NODE, THRUNODE, O4ONLINE

FROM O4SRV.INODESTS WHERE NODE LIKE ‘*hostname*’

</sql>

</CT_Get>

Create file on TEMS

Create a file on the TEMS in CANDLE_HOMEcmsHTML (Windows) or CANDLE_HOME/tables/HUB_TEMS_NAME/HTML (UNIX):
<CT_Export>

<filename>myfile.txt</filename>

<request>

<insert>

<insertelement>

<insertdata>My file text goes here</insertdata>

</insertelement>

</insert>

</request>

</CT_Export>

History Example

Note target tag is case sensitive:
<CT_Get>

<userid>sysadmin</userid>

<password>XXX</password>

<object>NT_Memory</object>

<history>Y</history>

<target>Primary:MY_HOST:NT</target>

</CT_Get>

Agent Details

Agent’s details: product, candlehome etc. (Note that agent must be online to appear in the results):
<CT_Get>

<userid>sysadmin</userid>

<password>XXX</password>

<table>KDY.KINAGT</table>

</CT_Get>

Standard agent data query example

NT processes for a system:
<CT_Get>

<userid>sysadmin</userid>

<password>XXX</password>

<object>NT_Process</object>

<target>Primary:MY_HOST:NT</target>

</CT_Get>

Situation Status

Current situation status (will not show up if never started, will not show running on system unless status is raised):

<CT_Get>

<userid>sysadmin</userid>

<password>orbdata</password>

<table>O4SRV.ISITSTSH</table>

<sql>SELECT GBLTMSTMP, SITNAME, DELTASTAT, NODE, ORIGINNODE FROM O4SRV.ISITSTSH</sql>

</CT_Get>

Situation History

Situation event history ordered by time

<CT_Get>

<userid>sysadmin</userid>

<password>XXX</password>

<table>O4SRV.TSITSTSH</table>

<sql>SELECT SITNAME, DELTASTAT, ATOMIZE, GBLTMSTMP

FROM O4SRV.TSITSTSH = 0 ORDER BY GBLTMSTMP</sql>

</CT_Get>

Read situation definitions

<CT_Get>

<userid>sysadmin</userid>

<password>XXX</password>

<table>O4SRV.UTCTIME</table>

<sql>SELECT ADVISE, AFFINITIES, ALERTLIST, AUTOSOPT, AUTOSTART, CMD, DESTNODE, HUB, LOCFLAG, LSTCCSID, LSTDATE, LSTRELEASE, LSTUSRPRF, NOTIFYARGS, NOTIFYOPTS, OBJECTLOCK, PDT, PRNAMES, QIBSCOPE, REEV_DAYS, REEV_TIME, REFLEXOK, SENDMSGQ, SITINFO, SITNAME, SOURCE, TEXT

FROM O4SRV.TSITDESC</sql>

</CT_Get>

View managed system lists

<CT_Get>

<userid>sysadmin</userid>

<password>XXX</password>

<table>O4SRV.UTCTIME</table>

<sql>SELECT NODELIST, NODE, NODETYPE FROM O4SRV.TNODELST WHERE NODETYPE = ‘M’ ORDER BY NODELIST</sql>

</CT_Get>

Remove an offline Agent

INSERT INTO O4SRV.TNODESTS (O4ONLINE, LSTUSRPRF, NODE, THRUNODE)
VALUES ( ‘D’, ‘cmw’, ‘<node>’, ‘<thrunode>’ )”;

Deactivate a Situation on an Agent

INSERT INTO O4SRV.KPXCOMMAND AT(<thrunode>)
(COMMAND,OBJCLASS,OBJNAME,ORIGINNODE)
VALUES( ‘E’, ‘5140’, ‘<situation>’, ‘<node>’ )

Activate a Situation on an Agent

INSERT INTO O4SRV.KPXCOMMAND AT(<thrunode>)
(COMMAND,OBJCLASS,OBJNAME,ORIGINNODE)
VALUES( ‘A’, ‘5140’, ‘<situation>’, ‘<node>’ )

Check for a New Agent

SELECT NODELIST,NODE,LSTDATE FROM O4SRV.TNODELST
WHERE LSTDATE > ‘<ts>’ AND NODETYPE=’V’

NOTE: Use the latest LSTDATE returned from this call in the WHERE clause for the subsequent call so as not to miss any.

Situation History

Situation event history ordered by time

<CT_Get>

<userid>sysadmin</userid>

<password>XXX</password>

<table>O4SRV.TSITSTSH</table>

<sql>SELECT SITNAME, DELTASTAT, ATOMIZE, GBLTMSTMP

FROM O4SRV.TSITSTSH = 0 ORDER BY GBLTMSTMP</sql>

</CT_Get>