-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
#10-log-download
- Loading branch information
Showing
65 changed files
with
1,950 additions
and
509 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,5 @@ | |
|
||
memo.txt | ||
log-samples/ | ||
/dist/deploy/ | ||
/dist/deploy-*/ | ||
application.log |
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
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
Binary file not shown.
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,44 @@ | ||
# Настройки подключения конечных пользователей: | ||
server: | ||
port: 8080 # - этот порт должен быть указан в браузере; | ||
address: mycompany.com # - имя/адрес хоста не обязательны; по умолчанию 0.0.0.0 | ||
|
||
# Список узлов, из которых состоит кластер АнаЛога (в том числе, если в нем всего один узел - текущий): | ||
nodes: | ||
- name: primary # читабельное имя узла (для удобства обращения) | ||
host: mycompany.com # хост узла (без порта) | ||
agentPort: 7801 # порт агента | ||
serverPort: 9090 # порт сервера (тот же, что и server.port этого узла) | ||
myself: true # признак того, что этот узел является сервером (см. выше); | ||
# такой признак должен присутствовать только у одного (серверного) узла | ||
- name: backup-node # читабельное имя второго узла | ||
host: backup.mycompany.com # хост второго узла (число узлов не ограничено) | ||
agentPort: 7801 # порт агента | ||
# serverPort: 8080 # если порт удаленного сервера равен server.port текущего, можно опустить | ||
|
||
|
||
# Варианты выбора логов из UI: | ||
choices: | ||
- group: MT # название группы вариантов (число групп не ограничено) | ||
pathBase: C:\lang\analog\log-samples\ # базовый путь логов в этой группе (добавляется к началу других путей) | ||
plainLogs: # список простых (одинарных) логов группы | ||
- core.log as "static $f - $g" | ||
# формат элемента списка: <fileNameOrPath>[ as "<alias>"[ (selected)]] | ||
# , где <fileNameOrPath> - полный либо относительный путь к файлу лога (в зависимости от наличия pathBase), | ||
# <alias> - отображаемое в UI имя лога в любом формате; поддерживаются подстановочные переменные: | ||
# $f - имя и расширение файла лога, $g - имя группы (пример алиаса: "Тестовый $f - $g") | ||
# (selected) - статичный признак, указывающая на то, что данный вариант лога будет выбран по умолчанию | ||
- pppinfo.log as "$f - $g" (selected) | ||
- generated\core.log as "$f - $g aka generated" | ||
compositeLogs: # список композитных (составных) логов группы | ||
- path: generated\bankplus.log # полный либо относительный путь к файлу лога (в зависимости от pathBase), | ||
timestamp: dd.MM.yy HH:mm:ss,SSS # формат временной метки | ||
node: primary # имя узла, где лежит лог (по умолчанию: узел с myself=true) | ||
title: $f - $g # имя лога (формат см. выше) | ||
# selected: true # признак выбора по умолчанию (должен быть лишь один на все варианты) | ||
includes: # список других логов, входящих в состав композита | ||
- node: backup-node # путь к включаемому логу (только абсолютный!) | ||
path: /pub/home/me/logs/backup.log # имя узла с логом (по умолчанию: узел с myself=true) | ||
timestamp: dd/MM/yy HH:mm:ss.SSS # формат временной метки | ||
scanDir: C:\lang\analog\log-samples\to-scan # полный путь к директории, все файлы которой должны автоматически | ||
# стать вариантами выбора логов (не включая поддиректории) |
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,53 @@ | ||
# v0.10 - 'Download current log' feature | ||
|
||
This release of AnaLog is aimed to shorten the gap between browser capabilities and real users' demands - while | ||
AnaLog was deliberately designed with certain browser restrictions in mind, it is quite obvious that ability to work | ||
with whole (usually big) log files is essential for day-to-day tasks. That is why AnaLog introduces this new | ||
feature - log file | ||
downloading directly from browser. | ||
|
||
There are several changes to highlight: | ||
|
||
* **Download current log** button is now available for any log (not plains only) and click on it does not trigger | ||
downloading immediately anymore - instead a new 'Control Check' dialog is shown where: | ||
* Current log's node, path, size and last modified timestamp are displayed; | ||
* Download button is located along with its variants for downloading just last part of the log (50KB, 500KB, 5MB, | ||
50MB, 200MB - depending of current log size); | ||
* Dropdown select is displayed to choose a specific member of composite log (in case of latter only); | ||
* Last error (if any) occurred while fetching log details (e.g. _HTTP 404 Not Found_, _HTTP 503 Unavailable_ etc). | ||
|
||
* Host and ports of cluster properties are now set separately. There are 2 kind of ports to specify: | ||
1. Agent port - a port to use by AnaLog server instance to support remote log monitoring; | ||
2. Server port - a port to use by user browser and by other servers for downloading log files from agent | ||
instances. | ||
This port is not required and by default equals to `server.port` of current AnaLog instance. | ||
|
||
* `clusterNodes` param has been renamed to `nodes` as well as its `address` property has been renamed to `host` as it doesn't contain port number anymore. | ||
For example, if your configuration looks like: | ||
```yaml | ||
clusterNodes: | ||
- name: alpha | ||
address: alpha.example.com:7801 | ||
``` | ||
then it should be rewritten as: | ||
```yaml | ||
nodes: | ||
- name: alpha | ||
host: alpha.example.com | ||
agentPort: 7801 | ||
serverPort: 8080 # may be omitted optional if equals to server.port | ||
``` | ||
* Added `/download` resource to AnaLog's server HTTP API: | ||
* `HEAD /download` returns content length and last modified timestamp of specified file even if it resides on | ||
remote node; | ||
* `GET /download` returns the specified file itself (as an attachment in order to facilitate streaming | ||
downloading). This also works transparently even for files on remote nodes of AnaLog. | ||
|
||
The new resource is designed to be used in various ways: | ||
* By web client application (in browser) to start file downloading via dedicated button on the control panel; | ||
* By other servers to retrieve files from agents in previous scenario; | ||
* **By end users themselves** to download frequently used files (e.g. by making a browser bookmark). | ||
|
||
* Every log choice is now provided with label containing its 'type' (local, remote, composite) and list of its nodes. | ||
This is a groundwork for future support of remote plain logs and composite log configuration refactoring. |
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
Oops, something went wrong.