dpc-sdp/tide_logs
Composer 安装命令:
composer require dpc-sdp/tide_logs
包简介
Log forwarder for SumoLogic OTel collector.
README 文档
README
Provides a SumoLogic handler for Monolog.
Requirements
There is also a soft dependency on the following modules
- admin audit trail - auditable events are sent to the Drupal logs
Activation
- The module requires a working Sumo Logic OTEL Collector to which it can send logs.
- A helm chart has been created here for easy installation on Kubernetes clusters.
- To test locally, in a test project:
- Create a file at
.docker/sumologic-otel/config.yamlwith the following content:extensions: sumologic: # Get from https://service.au.sumologic.com/ui/#/security/installation-tokens install_token: <collector-install-token> # Highly recommend adding a unique suffix, otherwise you might run into conflicts with other collector instances. collector_name: SDP Syslog - OTEL - <random-suffix> clobber: true receivers: udplog: listen_address: "0.0.0.0:514" attributes: source_name: "foobar/otel/test" operators: - type: json_parser - type: metadata id: metadata/source_host if: '"source_host" in $$body' attributes: source_host: 'EXPR($$body.source_host)' - type: metadata id: metadata/source_category if: '"source_category" in $$body' attributes: source_category: 'EXPR($$body.source_category)' processors: {} exporters: logging: loglevel: debug sumologic: auth: authenticator: sumologic source_category: "%{source_category}" source_name: "%{source_name}" source_host: "%{source_host}" metadata_attributes: - source.* service: extensions: [sumologic] pipelines: logs: receivers: [udplog] exporters: [sumologic]
- Add a service to
docker-compose.ymlas follows:sumo-otel: image: "public.ecr.aws/sumologic/sumologic-otel-collector:${SUMO_OTEL_RELEASE_VERSION:-0.47.0-sumo-0}" volumes: - .docker/sumologic-otel:/etc/otel ports: - 514 networks: - amazeeio-network - default labels: lagoon.type: none
- Running
ahoy upwill register the instance with Sumo Logic; it's now ready to start collecting logs. Rundocker-compose logs -f sumo-otelto make sure there were no errors. The last line should be something likeEverything is ready. Begin running and processing data.
- Create a file at
- Enable the Tide Logs module. Go to
/admin/config/development/tide_logsand ensureUDPlog hostandUDPlog portcorrespond to the service's name and the port in theconfig.yamlrespectively, if running with docker-compose. The module's default isudp://logger.default.svc:5514(see the default config here). SUMOLOGIC_CATEGORYcan also be set if a different category from the default (sdp/dev/tide) is required.- The following search query can then be used in SumoLogic to view the logs:
_collector="SDP Syslog - OTEL - <random-suffix>" and _sourceCategory="sdp/dev/tide"
Debug
Some very basic debug messages can be printed locally (or remotely if you have drush access) by setting the following config variable:
drush config:set tide_logs.settings debug 1
dpc-sdp/tide_logs 适用场景与选型建议
dpc-sdp/tide_logs 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 35.74k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 08 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 dpc-sdp/tide_logs 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dpc-sdp/tide_logs 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 35.74k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2022-08-23