Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create health check for size of the log files #35 #36

Draft
wants to merge 85 commits into
base: main
Choose a base branch
from

Conversation

ChiuchiuSorin
Copy link
Collaborator

Create a new health check to verify if the server log files exceed a certain size.

  • Need to set some metrics for the minimum acceptable logs size and an interval for warning.

Created the pom structure of the project
# Conflicts:
#	application-admintools-default/pom.xml
#	application-admintools-default/src/main/resources/META-INF/components.txt
- Created an interface and abstract class DataProvider for better generalization and  future extension of the components that provide data.
- Created templates for data gathering components.
Rewrited some of the comments and corrected some typos.
- Removed the download logs endpoint
- Added an endpoint for downloading a multiple files archive
- Added function for data providers to return info json
- Added script function to retrieve the context path
- added logs viewer endpoint
- merged with config-info
* Modified files exception handling
* Modified exception handling
* Added comments
* Created a page to run the job
* Created a page to access job progress
* Created a page to display useful links
* Modified jobFinishedMessage macro to adapt to healthCheck messages style
* Created JS for handling job start request, page refresh, job restart and status display on refresh when the job is finnished
* Created dashboard item to display job progress, log, start button and link to help page.
* Integrated JobRunner in JS
* Refactored JS
* Refactored HeallthCheck dashboard code
* Refactored HealthCheckResources code
* Modified comments
* Modified Exception and logger messages
* Code refactoring for filters handling
# Conflicts:
#	application-admintools-api/src/main/java/com/xwiki/admintools/ServerIdentifier.java
#	application-admintools-default/src/main/java/com/xwiki/admintools/internal/data/ConfigurationDataProvider.java
#	application-admintools-default/src/main/java/com/xwiki/admintools/internal/data/identifiers/TomcatIdentifier.java
#	application-admintools-default/src/main/resources/META-INF/components.txt
#	application-admintools-default/src/main/resources/templates/configurationTemplate.vm
#	application-admintools-default/src/test/java/com/xwiki/admintools/internal/data/ConfigurationDataProviderTest.java
…-check

# Conflicts:
#	application-admintools-ui/src/main/resources/AdminTools/Code/AdminToolsJS.xml
* Added translations
* Integrated transaltions in Java
* Added MemoryHealthCheck
* Modified translations
* Added unit tests
* Added comments
# Conflicts:
#	application-admintools-api/pom.xml
#	application-admintools-default/src/main/java/com/xwiki/admintools/script/AdminToolsScriptService.java
#	application-admintools-default/src/main/resources/META-INF/components.txt
#	application-admintools-ui/src/main/resources/AdminTools/Code/AdminToolsJS.xml
#	application-admintools-ui/src/main/resources/AdminTools/Code/Macros.xml
#	application-admintools-ui/src/main/resources/AdminTools/Code/Translations.xml
#	application-admintools-ui/src/main/resources/AdminTools/WebHome.xml
* Refactored JavaScript, Macros, job resource and dashboard
* Moved the code for health check inside a macro
* Created tests for HealthCheckJob
* Modified translations
* Added comments in default POM
# Conflicts:
#	application-admintools-ui/src/main/resources/AdminTools/Code/Macros.xml
#	application-admintools-ui/src/main/resources/AdminTools/Code/Translations.xml
* Refactored the way a component is found in the entire project
* Refactored tests
* Merged the security health checks
* Added translations
* Refactored Help links page
* Replaced hidden inputs for data comunication between server and client with attributes
* JS refactoring
* job velocity refactoring
* Replaced OperatingSystemMXBean for finding physical memory with JVM independent com.github.oshi
* Removed the script for creating a request. The client will now only access the job runner script and will send the ID that will be used
* Other minor modifications
# Conflicts:
#	application-admintools-default/src/main/resources/templates/configurationTemplate.vm
#	application-admintools-default/src/main/resources/templates/filesSectionTemplate.vm
#	application-admintools-default/src/main/resources/templates/securityTemplate.vm
#	application-admintools-ui/src/main/resources/AdminTools/Code/AdminToolsJS.xml
#	application-admintools-ui/src/main/resources/AdminTools/Code/Configuration.xml
#	application-admintools-ui/src/main/resources/AdminTools/Code/ConfigurationClass.xml
#	application-admintools-ui/src/main/resources/AdminTools/Code/Macros.xml
#	application-admintools-ui/src/main/resources/AdminTools/Code/Translations.xml
#	application-admintools-ui/src/main/resources/AdminTools/WebHome.xml
* Modified the test structure
* Adpated health checks to the usage of HealthCheckResult
* Added tests to be able to return a result for every tested data
* Created HealthCheckMacros
* Created macro for generating job status info
* Created macros for displaying the HealthCheckresults in the UI
* Added the posibility to extend a result in the UI to see a more detailed explanation or suggestion
* Added coments
* Addded and modified translations
* Adapted tests and added new tests for the new classes
* Other small modification in JS and backend
* Adapted the request for job.js in AdminToolsJs to be initialized only once
* Added grouping for the job
* Created function to generate the job id inside the script service
*  Refactored the help links
* Refactored the HealthCheckMacros and HealthCheckResources
* Fixed missing CSS class selector
* Created a check for verifying the size of the logs folder
@ChiuchiuSorin ChiuchiuSorin self-assigned this Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant