Add parameter and explanation of ManagedStats return to OpenSimDefaults.ini.
Add 'callback' query parameter to managed stats return to return function form of JSON data.0.7.6-extended
parent
c67c55e0fc
commit
d9bd6e6b5b
|
@ -281,6 +281,12 @@ namespace OpenSim.Framework.Monitoring
|
|||
|
||||
string strOut = StatsManager.GetStatsAsOSDMap(pCategoryName, pContainerName, pStatName).ToString();
|
||||
|
||||
// If requestor wants it as a callback function, build response as a function rather than just the JSON string.
|
||||
if (request.ContainsKey("callback"))
|
||||
{
|
||||
strOut = request["callback"].ToString() + "(" + strOut + ");";
|
||||
}
|
||||
|
||||
// m_log.DebugFormat("{0} StatFetch: uri={1}, cat={2}, cont={3}, stat={4}, resp={5}",
|
||||
// LogHeader, regpath, pCategoryName, pContainerName, pStatName, strOut);
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ namespace OpenSim
|
|||
{
|
||||
string urlBase = String.Format("/{0}/", managedStatsURI);
|
||||
MainServer.Instance.AddHTTPHandler(urlBase, StatsManager.HandleStatsRequest);
|
||||
m_log.WarnFormat("[OPENSIM] Enabling remote managed stats fetch. URL = {0}", urlBase);
|
||||
m_log.InfoFormat("[OPENSIM] Enabling remote managed stats fetch. URL = {0}", urlBase);
|
||||
}
|
||||
|
||||
if (m_console is RemoteConsole)
|
||||
|
|
|
@ -264,8 +264,15 @@
|
|||
|
||||
; Simulator Stats URI
|
||||
; Enable JSON simulator data by setting a URI name (case sensitive)
|
||||
; Returns regular sim stats (SimFPS, ...)
|
||||
; Stats_URI = "jsonSimStats"
|
||||
|
||||
; Simulator StatsManager URI
|
||||
; Enable fetch of StatsManager registered stats. Fetch is query which can optionally
|
||||
; specify category, container and stat to fetch. If not selected, returns all of that type.
|
||||
; http://simulatorHTTPport/ManagedStats/?cat=Category&cont=Container&stat=Statistic
|
||||
; ManagedStatsRemoteFetchURI = "ManagedStats"
|
||||
|
||||
; Make OpenSim start all regions woth logins disabled. They will need
|
||||
; to be enabled from the console if this is set
|
||||
; StartDisabled = false
|
||||
|
|
Loading…
Reference in New Issue