14.1 API Agent
What does the API Agent do?
Basically, the API Agent (spapiagent) is the routing process for ServiceOptimizer API clients. It connects API clients to the correct FRU process and collates results back from multiple FRUs.
System Parameters
The following Database sp083_system_parameters apply specifically to the configuration of the API Agent and control how it manages the various aspects of its behaviour:
Communicating with the FRU processes
Parameter | Description |
---|---|
apia_spuserid | When the API Agent logs on to the FRU processes it needs to supply a username and password. A special user name should be set up in sp085_users (see 14.1 Access Control) for this purpose and this user name must then be added into the sp083_system_parameters table entry apia_spuserid . Failure to set this up will mean the APIAgent will be unable to communicate with the FRUs. |
apia_cfru | Number of connections made by API Agent to each FRU Process. This must be set to the number of API clients, up to a maximum of database sp409_component_ports.<listener_count>(GR) . If you have a very large setting here you will use a lot of socket connections (especially if you have a lot of FRUs). Set too low and the requests will be queued in the API agent. This setting depends to some extent on the degree of geographical overlap - if every request goes to all FRUs at once then it needs to be larger than if each request goes only to one FRU. |
Note that all these parameters are installed in the database but no default value is supplied for apia_spuserid. A valid value must be supplied for this parameter to run ServiceOptimizer - the system will not start up without one.
Note, also, that an associated password is also required, to allow authentication as described in 14.1 Access Control. There are no specific requirements as to the format of this password.
Managing the dispatch processes
Parameter | Description |
---|---|
disa_nwt | Specifies how many Dispatch Agent Worker Threads should be used. You will need help from a consultant to set this up. It is critical to the running of the system and incorrect settings can result in performance degradation, system instability or hitting operating system limits. |
disp_inactivity_timeout | Specifies the maximum time (in seconds) allowed between dispatch client requests, before the API Agent disconnects the dispatch client. See also notes below this table. If you have a firewall (or similar) between your dispatch clients and the API Agent that closes network connections after a period of inactivity, then the 'disp_inactivity_timeout' parameter can be used to prevent this. In this case, you need to ensure that the value of the 'disp_inactivity_timeout' parameter is less than the firewall timeout period. |
disp_request_timeout | Specifies the maximum time that the API Agent will wait for dispatched jobs (per dispatch client) before returning with return code SP_OK_DISPATCH_REQUEST_TIMEOUT. See also notes below this table. If you want to the API Agent to detect dispatch clients that are not reachable (for instance because of network problems or because the dispatch client has crashed), then set both the 'disp_inactivity_timeout' and 'disp_request_timeout' parameters' to non-NULL values. In this case the values of these two parameters must both be less than the time in which you want to detect unreachable dispatch clients. |
Managing the Jeopardy Reports
Parameter | Description |
---|---|
jeopa_nwt | Specifies how many Jeopardy Agent Worker Threads should be used. You will need help from a consultant to set this up. It is critical to the running of the system and incorrect settings can result in performance degradation, system instability or hitting operating system limits. |
Logfiles
The API Agent l;ogfiles are very important for use when diagnosing faults and for helping to answer questions about why the system has behaved as it has. As such, it is wise to set these up such that they can hold a complete day's worth of tracing within a single file. 14.1 Application Logfiles gives more details.