I want information related to broker utilization. Using Broker Java APIs, I am getting almost all information till Total Storage whose session URL is qs:///appl/webMethods/v6/IS/brokerdata/default/Broker.qss. Inside that there is 3 more .stor file which uses the max available storage of total storage.
My question is that, Using Java APIs of Broker how could i get all those information related to .stor files. ie
Storage /appl/webMethods/v6/IS/brokerdata/default/Broker.qs.stor
Max. Available
Used and Reserved
Can you provide me the ways or keywords for that, how can i loop over these storage files to get all information of .stor files. All information is coming from getStats and getUsageStats. But i don’t know how to get these informations.
For others coming upon this thread, Aashish is referring to the BrokerServerClient:getUsageStats method. This class is described in the webMethods Broker Administration Java API Programmer’s Guide.
The object returned by getUsageStats is a BrokerEvent, which is described in the webMethods Broker Client Java API Programmer’s Guide. You use the BrokerEvent methods to retrieve the fields from the event. For example, to get the value for the max available that you note above, you’d call:
BrokerEvent evt;
BrokerServerClient serverClient;
//… code to establish a connection and such…
evt = serverClient.getUsageStats();
long guaranteedDiskSize = evt.getLongField(“guaranteedDiskSize”);
The event structure may have changed or have different fields in it so you’ll want to investigate to see what is in the event object.
I am getting all information from getUsageStats() like guranteed disk space and others. I need API’s to get information related to .qs.stor storage and reserve space information.
Because of getUsageStats() i am getting CPU,Persistent Storage and Guranteed Storage Information but not getting .qs.stor information. If you run a service called getServerList inside WmBrokerAdmin: server it will show you all statistics and inside one structure it will show statistics of .qs.stor files. So, how could i retrieve information related to that using Broker Java API’s.
The getStorageStats method may not be a published method (I cannot find any docs that refer to it) so future versions might break any code that relies on it.
Can I get a little insight of how to display the information that we get in BrokerEvent. Basically, how to convert this BrokerEvent array to documentlist, if I use this code as Java Service …
It helped me write the Java service (attached) that provided Broker store usage stats - (published courtesy my employer, Corporate Express Australia and Kolappan, CE Integration lead). I’ve also uploaded this file to the wmuser shareware section.
This code uses a slightly different approach – BrokerEvent.getField() parses the BrokerEvent, instead of getStructSeqFieldAsEvents().
Just a comment to Software AG – ‘My webMethods Server’ (MWS) already reports the broker store utilization information (MWS > Servers > Broker Server Details > Utilization Tab). As a webservices company, why does Software AG not simply allow programmatic quering of MWS data via webservice calls. I mean, MWS already reports it - to have to create a new Java broker client seems wasteful. (Or maybe this is possible ? Java Utility Service for Broker Store Usage Monitoring.txt (7.68 KB)
I am getting below error. Can you please help me out?
getBrokerStorageStats.java:28: Method getStorageStats() not found in class COM.activesw.API.client.BrokerServerClient.
brokerStats = brokerClient.getStorageStats();
^