Class MonitoringController
- java.lang.Object
-
- org.craftercms.studio.controller.rest.v2.ManagementTokenAware
-
- org.craftercms.studio.controller.rest.v2.MonitoringController
-
@Validated @RestController @RequestMapping("/api/2") public class MonitoringController extends ManagementTokenAwareRest controller to provide monitoring information- Author:
- joseross
-
-
Field Summary
Fields Modifier and Type Field Description protected MonitorServicemonitorService-
Fields inherited from class org.craftercms.studio.controller.rest.v2.ManagementTokenAware
securityService, studioConfiguration
-
-
Constructor Summary
Constructors Constructor Description MonitoringController(StudioConfiguration studioConfiguration, SecurityService securityService, MonitorService monitorService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultOne<org.craftercms.commons.monitoring.MemoryInfo>getCurrentMemory(String token)ResultOne<org.craftercms.commons.monitoring.StatusInfo>getCurrentStatus(String token)ResultOne<org.craftercms.commons.monitoring.VersionInfo>getCurrentVersion(String token)ResultList<Map<String,Object>>getLogEvents(@javax.validation.constraints.Positive long since, String token)-
Methods inherited from class org.craftercms.studio.controller.rest.v2.ManagementTokenAware
getConfiguredToken, validateToken
-
-
-
-
Field Detail
-
monitorService
protected final MonitorService monitorService
-
-
Constructor Detail
-
MonitoringController
@ConstructorProperties({"studioConfiguration","securityService","monitorService"}) public MonitoringController(StudioConfiguration studioConfiguration, SecurityService securityService, MonitorService monitorService)
-
-
Method Detail
-
getCurrentMemory
@GetMapping("/monitoring/memory") public ResultOne<org.craftercms.commons.monitoring.MemoryInfo> getCurrentMemory(@RequestParam(name="token",required=false) String token) throws org.craftercms.commons.exceptions.InvalidManagementTokenException, InvalidParametersException- Throws:
org.craftercms.commons.exceptions.InvalidManagementTokenExceptionInvalidParametersException
-
getCurrentStatus
@GetMapping("/monitoring/status") public ResultOne<org.craftercms.commons.monitoring.StatusInfo> getCurrentStatus(@RequestParam(name="token",required=false) String token) throws org.craftercms.commons.exceptions.InvalidManagementTokenException, InvalidParametersException- Throws:
org.craftercms.commons.exceptions.InvalidManagementTokenExceptionInvalidParametersException
-
getCurrentVersion
@GetMapping("/monitoring/version") public ResultOne<org.craftercms.commons.monitoring.VersionInfo> getCurrentVersion(@RequestParam(name="token",required=false) String token) throws org.craftercms.commons.exceptions.InvalidManagementTokenException, IOException, InvalidParametersException- Throws:
org.craftercms.commons.exceptions.InvalidManagementTokenExceptionIOExceptionInvalidParametersException
-
getLogEvents
@GetMapping(value="/monitoring/log", produces="application/json") public ResultList<Map<String,Object>> getLogEvents(@Positive @RequestParam @javax.validation.constraints.Positive long since, @RequestParam(name="token",required=false) String token) throws org.craftercms.commons.exceptions.InvalidManagementTokenException, InvalidParametersException- Throws:
org.craftercms.commons.exceptions.InvalidManagementTokenExceptionInvalidParametersException
-
-