#How can I pull my custom logs and display them in the netdata dashboard logs tab?

1 messages · Page 1 of 1 (latest)

humble goblet
#

I have a log like this

{"@timestamp":"2024-06-04T08:48:25.584462+00:00","log.level":"INFO","message":"schedulerSendTwitterDMv2 work!","ecs.version":"1.2.0","log":{"logger":"Gearboy"},"pid":4060,"host":"ed3b5004b512"}
{"@timestamp":"2024-06-04T08:48:25.601604+00:00","log.level":"INFO","message":"sender started!","ecs.version":"1.2.0","log":{"logger":"Gearboy"},"pid":4020,"host":"ed3b5004b512"}
{"@timestamp":"2024-06-04T08:48:25.608351+00:00","log.level":"INFO","message":"receiver started!","ecs.version":"1.2.0","log":{"logger":"Gearboy"},"pid":4072,"host":"ed3b5004b512"}
{"@timestamp":"2024-06-04T08:48:25.609987+00:00","log.level":"DEBUG","message":"send added with instrumentApm","ecs.version":"1.2.0","log":{"logger":"Gearboy"},"pid":4020,"host":"ed3b5004b512"}

with the netdata web_log plugin config like this

Config web_log

  # Temp Onecloud
  - name: test_custom_logs
    path: /tmp/test_log.log
    log_type: json
    update_every: 1
    json_config:
      mapping:
       '@timestamp': time
       ecs.version: version
       host: host
       log.level: level
       log.logger: logger
       message: msg
       pid: pid

I want the log to be pulled by netdata and can be displayed on the netdata dashboard logs tab.
I have tried but the error is as in the following capture
thanks

heavy pumice
#

Hi. That is not possible using web log. The logs tab only for journald logs. So if you send your logs to journald you will be able to see them