Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Once statistics admin REST services are enabled and properly configured they can be accessed as shown below.

The admin REST service supports many of the methods in the Administration API - and the REST methods and arguments are the same.


A more detailed description of each of the methods can also be find on the link above, as this REST service simply passes through the calls to the Administration API.


The supported methods are listed below.

http://server:port/restservices/

statistics/list/status/?servers=XX,YY

Optional parameter servers – a comma separated list of servers to get status for. If no list is given, status is returned for all servers.

Description

Returns config server status texts and connection status

admin/jvmdump

No parameters

Description

Creates a JVM dump

Example URLS

http://localhost:5300/restservices/

status/configserver/
http://localhost:5300/restservices/status/configserver/?servers=configserver1,useradmin1
http://localhost:5300/restservices/statistics/list/status/

Formatted example

[2]
0:  
{
"name": "configserver1"
"alias": ""
"htlmStatus": "<p><b>Actions</b><br><!-- action="peer" title="Peers connections" resource="peer.connections" permission="read"...........”
"state": "NOT_CONNECTED"
"pingTime": 0
}
1:  
{
"name": "useradmin1"
"alias": ""
"htlmStatus": "Time: Thu May 05 17:27:44 CEST 2016<br>Number of session listeners: 0<br>SessionCtrl server connection status: NIO TCP Peer useradmin1@localhost:...........”
"state": "RUNNING"
"pingTime": 0
}

admin/jvmdump

Output example

"--------------------

JVM Dump for statisticsserver1@localhost:58213@configclient_statisticsserver

--------------------


--------------

Full JVM Dump:

Runtime Information:

--------------------

VN name: Java HotSpot(TM) 64-Bit Server VM, Vendor: Oracle Corporation, Version: 25.131-b11

JVM Started at: Mon, 26-Jun-17 16:41:45 CEST

Uptime: 24 seconds, 290 msecs\nOS Name: Windows 10, version: 10.0

CPUs: 8\nArchitecture: amd64

Boot classpath: C:\\PortalProtect\\pp\\alpn\\alpn-boot-8.1.11.v20170118.jar;D:\\java\\jdk1.8.0_131\\jre\\lib\\resources.jar;D:\\java\\jdk1.8.0_131\\jre\\lib\\rt.jar;D:\\java\\jdk1.8.0_131\\jre\\lib\\sunrsasign.jar;D:\\java\\jdk1.8.0_131\\jre\\lib\\jsse.jar;D:\\java\\jdk1.8.0_131\\jre\\lib\\jce.jar;D:\\java\\jdk1.8.0_131\\jre\\lib\\charsets.jar;D:\\java\\jdk1.8.0_131\\jre\\lib\\jfr.jar;D:\\java\\jdk1.8.0_131\\jre\\classes\nClasspath: C:\\PortalProtect\\classes;


.... and the dump continues (smile)



List servers which has available statistics (could be historical!)

Description

http://server:port/restservices/statistics/list/servers/

Optional parameter servers – a comma separated list of servers to get status for. If no list is given, status is returned for all servers.

admin/shutdown

No optional parameters

Description

Shuts down the server!

Example URLS

http://localhost:5300/restservices/statistics/list/servers/

Formatted example

[19]
0:
{
"name": "configserver1"
}
1:
{
"name": "dispatcher1"
}
2:
{
"name": "logserver"
}
3:
{
"name": "logserver1"
}
4:
{
"name": "logserver1/"
}
5:
{
.. .. .. ..
}
}

admin/shutdown

Output example

"Shutting down server!"



http://server:port/restservices/admin/reloadconfiguration

No optional parameters

Description

Tells the config server to reload all configuration

Example URLS

http://localhost:5300/restservices/admin/reloadconfiguration

Output example

"Reloading all configuration"



Returns functions with available statistics for the given servers

Description

http://server:port/restservices/statistics/list/functions?servers=XX,YY

Optional parameter servers – a comma separated list of servers to get functions for. If no list is given, status is returned for all servers.

admin/listServices

No optional parameters

Description

Lists all services known to the config server with connection and status information

Example URLS

http://localhost:5300/restservices/statistics/list/functions/

http://localhost:5300/restservices/statistics/list/functions?servers=dispatcher1

Formatted example

[2]
0:
{
"server": "dispatcher1"
"function": "Agent.newSession"
"statData":
[1]
0:
{
"startTime": 1462460536414
"endTime": 1462460536414
"total": 1005
"mean": 1005
"count": 1
"min": 1005
"max": 1005
"lower95Value": "NaN"
"upper95Value": "NaN"
}
}
1:
{
"server": "dispatcher1"
"function": "Garbage Collect"
"statData":
[1]
0:
{
"startTime": 1462460821933
"endTime": 1462463521918
"total": 1321
"mean": 132.1
"count": 10
"min": 101
"max": 175
"lower95Value": 147.97062185997203
"upper95Value": 147.97062185997203
}
}admin/listServices

Output example

[
{
"name": "axis",
"status": {
"running": false,
"connecting": false,
"notConnected": true,
"disconnecting": false,
"disconnected": true,
"connected": false,
"starting": false,
"stopping": false,
"shuttingDown": false,
"shutDown": false,
"stopped": true
},
"pingTime": -1,
"alias": null,
"routeNodeName": null,
"type": null,
"memoryFree": 0,
"memoryTotal": 0,
"memoryUsed": 0,
"memoryMax": 0,
"cpuProcess": -1,
"cpuSystem": -1,
"pingtime": -1
},
{
"name": "configserver1",
"status": {
"running": true,
"connecting": false,
"notConnected": true,
"disconnecting": false,
"disconnected": true,
"connected": false,
"starting": false,
"stopping": false,
"shuttingDown": false,
"shutDown": false,
"stopped": false
},
"pingTime": 0,
"alias": "",
"routeNodeName": "configserver1@127.0.0.1",
"type": null,
"memoryFree": 695644,
"memoryTotal": 974336,
"memoryUsed": 278692,
"memoryMax": 974336,
"cpuProcess": 0.0012769606407561649,
"cpuSystem": 0.09321413231377008,
"pingtime": 0
},

....... More services listed here

]



http://server:port/restservices/admin/startserver?server=xx

http://server:port/restservices/admin/stopserver?server=xx

Required parameter is a server.

Description

starts or stops a server with a given name

Example URLS

http://localhost:5300/restservices/admin/startserver?server=useradmin1

Output example"Starting server useradmin1"