Skip to content

[Bug]: Go plugins emit logs to stderr instead of journal when running under a terminal #22153

@vkalintiris

Description

@vkalintiris

Bug description

NETDATA_PIPENAME="/tmp/sjr-tree8.pipe" NETDATA_LOG_FORMAT=journal NETDATA_LOG_LEVEL=debug "/home/vk/o
pt/sjr-tree8/netdata/usr/sbin/netdata" -D -p 20000 -W set logs daemon journal -W set logs collector journal -W keepopenfds

time=2026-04-07T11:29:22.851+03:00 comm=netdata source=daemon level=info errno="2, No such file or directory" tid=207737  msg="CONFIG: cannot load user config
'/home/vk/opt/sjr-tree8/netdata/etc/netdata/netdata.conf'. Will try the stock version."
time=2026-04-07T11:29:22.852+03:00 comm=netdata source=daemon level=error errno="2, No such file or directory" tid=207737  msg="CLAIM: cannot load cloud config
 '/home/vk/opt/sjr-tree8/netdata/var/lib/netdata/cloud.d/cloud.conf'. Running with internal defaults."
DBG scriptsdplugin/main.go:89 plugin: name=scripts.d, version=v2.9.0-315-gb976f84abd go_version=go1.26.0 user_config_dir=/home/vk/opt/sjr-tree8/netdata/etc/net
data stock_config_dir=/home/vk/opt/sjr-tree8/netdata/usr/lib/netdata/conf.d plugins_dir=/home/vk/opt/sjr-tree8/netdata/usr/libexec/netdata/plugins.d netdata_bi
n_dir=/home/vk/opt/sjr-tree8/netdata/usr/sbin component=agent
DBG scriptsdplugin/main.go:91 current user: name=vk, uid=1000 component=agent
INF scriptsdplugin/main.go:95 env proxy settings: HTTP_PROXY set=false, HTTPS_PROXY set=false component=agent
INF scriptsdplugin/main.go:97 directories → config: [/home/vk/opt/sjr-tree8/netdata/etc/netdata /home/vk/opt/sjr-tree8/netdata/usr/lib/netdata/conf.d] | collec
tors: [/home/vk/opt/sjr-tree8/netdata/etc/netdata/scripts.d /home/vk/opt/sjr-tree8/netdata/usr/lib/netdata/conf.d/scripts.d] | varlib: /home/vk/opt/sjr-tree8/n
etdata/var/lib/netdata component=agent
INF agent/agent.go:202 instance is started component=agent
INF agent/setup.go:20 loading config file component=agent
DBG agent/setup.go:28 looking for 'scripts.d.conf' in [/home/vk/opt/sjr-tree8/netdata/etc/netdata /home/vk/opt/sjr-tree8/netdata/usr/lib/netdata/conf.d] compon
ent=agent
INF agent/setup.go:35 found '/home/vk/opt/sjr-tree8/netdata/usr/lib/netdata/conf.d/scripts.d.conf component=agent
INF agent/setup.go:42 config successfully loaded component=agent
INF agent/agent.go:206 using config: enabled 'true', default_run 'true', max_procs '0' component=agent
INF agent/setup.go:47 loading modules component=agent
INF agent/setup.go:69 enabled/registered modules: 1/1 component=agent
INF agent/setup.go:75 building discovery config component=agent
DBG agent/setup.go:138 looking for 'nagios.conf' in [/home/vk/opt/sjr-tree8/netdata/etc/netdata/scripts.d /home/vk/opt/sjr-tree8/netdata/usr/lib/netdata/conf.d
/scripts.d] component=agent

Expected behavior

Use systemd's journal for logging, instead of the terminal.

Steps to reproduce

  • Enable a Go plugin when building the agent.
  • Start the agent from the terminal with journal log target for collectors.

Installation method

from git

System info

N/A.

Netdata build info

N/A.

Additional info

No response

Metadata

Metadata

Assignees

Labels

bugpriority/lowA 'nice to have' not critical issue

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions