How to enable debugging logs? | |
Enable the debug parameter of the module. | Как включить debug-логи? |
yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: log-shipper spec: version: 1 enabled: true settings: debug: true | Включите параметр debug модуля. |
Then in logs, you will find a lot of helpful information about HTTP requests, connects reusing, detailed traces, and so on. | Пример конфигурации модуля: |
How to get aware of logs pipelines? | yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: log-shipper spec: version: 1 enabled: true settings: debug: true |
To begin with, go to the command shell of the Pod on a desired node. | После этого в логах вы найдете много полезной информации о HTTP-запросах, переиспользовании подключения, трассировку и т. д. |
bash kubectl -n d8-log-shipper get pods -o wide | grep $node kubectl -n d8-log-shipper exec $pod -it -c vector – bash | Как узнать больше о каналах передачи log’ов? |
All following commands are assumed to be executed from the Pod’s shell. | Для начала зайдите в под на желаемом узле. |
See pipelines as a graph | bash kubectl -n d8-log-shipper get pods -o wide | grep $node kubectl -n d8-log-shipper exec $pod -it -c vector – bash |
| Все следующие команды предполагается запускать из командной оболочки пода. |
Example of the graph output for a single pipeline in ASCII format: | Посмотреть каналы как graph |
text +————————————————+ | d8_cluster_source_flant-integration-d8-logs | +————————————————+ | | v +————————————————+ | d8_tf_flant-integration-d8-logs_0 | +————————————————+ | | v +————————————————+ | d8_tf_flant-integration-d8-logs_1 | +————————————————+ | | v +————————————————+ | d8_cluster_sink_flant-integration-loki-storage | +————————————————+ |
|
Investigate data processing | Пример graph’а для одного канала передачи логов в формате ASCII: |
There is the | text +————————————————+ | d8_cluster_source_flant-integration-d8-logs | +————————————————+ | | v +————————————————+ | d8_tf_flant-integration-d8-logs_0 | +————————————————+ | | v +————————————————+ | d8_tf_flant-integration-d8-logs_1 | +————————————————+ | | v +————————————————+ | d8_cluster_sink_flant-integration-loki-storage | +————————————————+ |
Example of the output: | Отладка передачи данных |
Существует команда | |
Get raw log samples | Пример вывода команды: |
You may use the | |
By using the following command, you can see the log’s before applying the transformation rules ( | Получить необработанные образцы log’ов |
bash vector tap ‘cluster_logging_config/*’ | Вы можете использовать команды |
Transformed logs that are received at the input of the next channel components in the chain: | С помощью следующей команды вы сможете увидеть логи до применения правил трансформации ( |
bash vector tap ‘transform/*’ | bash vector tap ‘cluster_logging_config/*’ |
You can then use the | Измененные логи, которые поступают на вход следующих в цепочке компонентов каналов: |
Example of a program on VRL: | bash vector tap ‘transform/*’ |
text . = {“test1”: “lynx”, “test2”: “fox”} del(.test2) . | Вы также можете использовать интерактивную консоль |
How to add a new source/sink support for log-shipper? | Пример программы с использованием VRL: |
Vector in the | text . = {“test1”: “lynx”, “test2”: “fox”} del(.test2) . |
You can see a list of all supported features by executing the | Как добавить поддержку нового source/sink для log-shipper? |
If supporting a new source/sink is required, you need to add the corresponding feature to the list of enabled features in the Dockerfile. | Vector для модуля |
Вы можете посмотреть весь список поддерживаемых функций, выполнив команду | |
Если необходимо добавить поддержку нового source/sink, сначала нужно добавить необходимую функцию в список поддерживаемых в Dockerfile. |