-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3280 from arunans23/diagnostics
Include Runtime diagnostics tool into the server
- Loading branch information
Showing
7 changed files
with
433 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
143 changes: 143 additions & 0 deletions
143
distribution/src/resources/config-tool/templates/diagnostics-tool/conf/config.toml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
# | ||
# Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. | ||
# | ||
# WSO2 LLC. licenses this file to you under the Apache License, | ||
# Version 2.0 (the "License"); you may not use this file except | ||
# in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
# | ||
############################################## | ||
# | ||
# WARNING: Don't edit the file manually unless you are not using the deployment.toml file. | ||
# | ||
############################################## | ||
|
||
## This file contains the configuration parameters used by the Diagnostic tool | ||
|
||
# Server Configurations | ||
[server_configuration] | ||
deployment_toml_path = "{{server_configuration.deployment_toml_path}}" | ||
logs_directory = "{{server_configuration.logs_directory}}" | ||
updates_config_path = "{{server_configuration.updates_config_path}}" | ||
diagnostic_log_file_path = "{{server_configuration.diagnostic_log_file_path}}" | ||
carbon_log_file_path = "{{server_configuration.carbon_log_file_path}}" | ||
process_id_path = "{{server_configuration.process_id_path}}" | ||
server_name = "@product.name@" | ||
server_version = "@product.version@" | ||
|
||
## Action Executor Configurations | ||
|
||
# Example | ||
#[[action_executor_configuration]] | ||
#executor = "ActionExecutor" | ||
#reload_time = "180" # in seconds | ||
|
||
[[action_executor_configuration]] | ||
executor = "MemoryDumper" | ||
reload_time = "180" | ||
|
||
[[action_executor_configuration]] | ||
executor = "ThreadDumper" | ||
count = "5" | ||
delay = "2000" | ||
|
||
[[action_executor_configuration]] | ||
executor = "OpenFileFinder" | ||
|
||
[[action_executor_configuration]] | ||
executor = "Netstat" | ||
command = "netstat -alt" | ||
|
||
[[action_executor_configuration]] | ||
executor = "ServerInfo" | ||
|
||
[[action_executor_configuration]] | ||
executor = "MetricsSnapshot" | ||
|
||
{%for action in action_executor_configuration %} | ||
[[action_executor_configuration]] | ||
executor = "{{action.executor}}" | ||
{% endfor %} | ||
|
||
# Watcher Configurations | ||
[cpu_watcher] | ||
enabled = "{{cpu_watcher.enabled}}" | ||
threshold = "{{cpu_watcher.threshold}}" | ||
retry_count = "{{cpu_watcher.retry_count}}" | ||
interval = "{{cpu_watcher.interval}}" | ||
action_executors = "{{cpu_watcher.action_executors}}" | ||
|
||
[memory_watcher] | ||
enabled = "{{memory_watcher.enabled}}" | ||
threshold = "{{memory_watcher.threshold}}" | ||
retry_count = "{{memory_watcher.retry_count}}" | ||
interval = "{{memory_watcher.interval}}" | ||
action_executors = "{{memory_watcher.action_executors}}" | ||
|
||
[log_watcher] | ||
enabled = "{{log_watcher.enabled}}" | ||
interval = {{log_watcher.interval}} | ||
|
||
# Traffic Analyzer Configurations | ||
[traffic_analyzer] | ||
last_second_requests_enabled = "{{traffic_analyzer.last_second_requests_enabled}}" | ||
last_second_requests_windows_size = "{{traffic_analyzer.last_second_requests_windows_size}}" | ||
last_second_requests_delay = "{{traffic_analyzer.last_second_requests_delay}}" | ||
last_second_requests_interval = "{{traffic_analyzer.last_second_requests_interval}}" | ||
last_fifteen_seconds_requests_enabled = "{{traffic_analyzer.last_fifteen_seconds_requests_enabled}}" | ||
last_fifteen_seconds_requests_window_size = "{{traffic_analyzer.last_fifteen_seconds_requests_window_size}}" | ||
last_fifteen_seconds_requests_delay = "{{traffic_analyzer.last_fifteen_seconds_requests_delay}}" | ||
last_fifteen_seconds_requests_interval = "{{traffic_analyzer.last_fifteen_seconds_requests_interval}}" | ||
last_minutes_requests_enabled = "{{traffic_analyzer.last_minutes_requests_enabled}}" | ||
last_minutes_requests_window_size = "{{traffic_analyzer.last_minutes_requests_window_size}}" | ||
last_minutes_requests_delay = "{{traffic_analyzer.last_minutes_requests_delay}}" | ||
last_minutes_requests_interval = "{{traffic_analyzer.last_minutes_requests_interval}}" | ||
notify_interval = "{{traffic_analyzer.notify_interval}}" | ||
|
||
# Output data zip configurations | ||
[zip_file_configuration] | ||
output_directory = "{{zip_file_configuration.output_directory}}" | ||
max_count = "{{zip_file_configuration.max_count}}" | ||
|
||
# Error regex patterns and diagnosis | ||
{%for pattern in log_pattern.patterns %} | ||
[[log_pattern]] | ||
regex = "{{pattern.pattern.regex}}" | ||
executors = "{{pattern.pattern.executors}}" | ||
reload_time = "{{pattern.pattern.reload_time}}" | ||
|
||
{% endfor %} | ||
|
||
{% if ftp_uploader is defined %} | ||
## FTP Uploader configurations | ||
[ftp_uploader] | ||
enabled = "{{ftp_uploader.enabled}}" | ||
host = "{{ftp_uploader.host}}" | ||
port = "{{ftp_uploader.port}}" | ||
username = "{{ftp_uploader.username}}" | ||
password = "{{ftp_uploader.password}}" | ||
directory = "{{ftp_uploader.directory}}" | ||
{% endif %} | ||
|
||
{% if sftp_uploader is defined %} | ||
## SFTP Uploader configurations | ||
[sftp_uploader] | ||
enabled = "{{sftp_uploader.enabled}}" | ||
host = "{{sftp_uploader.host}}" | ||
port = "{{sftp_uploader.port}}" | ||
username = "{{sftp_uploader.username}}" | ||
password = "{{sftp_uploader.password}}" | ||
directory = "{{sftp_uploader.directory}}" | ||
known_hosts_path = "{{sftp_uploader.known_hosts_path}}" | ||
strict_host_key_checking = "{{sftp_uploader.strict_host_key_checking}}" | ||
{% endif %} |
Oops, something went wrong.