I would like to propose the following xmlrpc interface to address
http://track.sipfoundry.org/browse/XECS-1857 and
http://track.sipfoundry.org/browse/XECS-1795 (return list of unsatisfied
resources or other messages back to sipxconfig):

ProcMgmtRpc.getStatusMessages(host, processAlias)

returns a list of strings for the specified processAlias, which would
show whatever supervisor knows about its current status: versions if
they mismatch; resources if they are missing; configtest results if it
failed; stdout/stderr (to some max) if it's running or failed.

The strings would have a format "<type>: msg" such as:

version.mismatch: software '3.11.8' != config '3.11.7'

resource.missing: file
'/home/cbeeton/commit/out/main/etc/sipxpbx/sipxpage.properties.in'
(The resources format their own missing resource description.  Possible
types are "file", "imdb", "process", "SQL database").

stderr.msg-18: java.io.FileNotFoundException: /sipxconfig-logins.log
(Permission denied)
stderr.msg-19:   at java.io.FileOutputStream.openAppend(Native Method)
(I have limited the maximum number of messages to 100, as some processes
might be very wordy.  To show this, I have added an index number.  What
do people think about a limit?)

This allows a single xmlrpc primitive to be used to get the most
information, while allowing the output to be parsed and processed
specially if desired (e.g. sipXconfig could replicate a missing
file...).  Is a simple vector-of-strings implementation satisfactory?
It is much simpler to implement than a structure of some sort.
Currently we only support a structure for HashMap, which requires a
unique key, and does not preserve order.

The idea is that the Status field on the Servers/Services page could be
clickable, and would display these messages.

Please let me know if this sounds like a good direction to proceed in.

Thanks,
Carolyn
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to