Thursday, March 13, 2008

How to fetch realtime data for an agent?

Do you need access to the latest real-time data for an agent? It is a reasonable requirement. For example, you may want to find out the latest diskusage for an NT managed system in your automation scripts before deploying an application. This article explains how to fetch such a real-time data from ITM.

To fetch real-time data, all you have to do is to use a simple CT_Get SOAP call. For example, if you want to fetch a Disk related attributes for an Windows OS agent, the following SOAP call will do.

<CT_Get><userid>sysadmin</userid><password></password><object>NT_Logical_Disk</object><target>Primary:MYHOST:NT</target></CT_Get>

This will fetch the real time data from the OS agent running on MYHOST.

Remember the above query gets all the information for NT_Logical_Disk attribute group,not just disk usage and it is your responsibility to filter out what you need.

The attributes fetched during the above SOAP calls are,

  • Avg_Disk_msRead

  • Disk_BytesSec

  • Disk_Name

  • Disk_Queue_Length

  • Disk_Read_BytesSec

  • Disk_Read_Time

  • Disk_ReadsSec

  • Disk_Time

  • Disk_TransfersSec

  • Disk_Write_BytesSec

  • Disk_Write_Time

  • Disk_WritesSec

  • Free

  • Free_Megabytes

  • Total_Size

  • Used


  • Of course, if you're not a fan of XML parsing and want to issue the above SOAP call from your scripts, you could use gbscmd to fetch the information.

    gbscmd CT_Get --server --object NT_Logical_Disk --target Primary:MYHOST:NT

    Hope you find this information useful.

    No comments: