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