Add Collector log#14309
Conversation
|
@thiagoftsm, is it easy to add an option that'll keep everything in I'm worried that from now on, we will have to check two different files in order to check for any errors during development, and we might miss some because of this change. |
|
@vkalintiris Will |
Can live with that but we'll lose ordering of events, unless we start tracking timestamps :| |
|
would having this as a config param be overkill? default to splitting but ability for anyone who might want to for whatever reason to just chose one single log. |
|
We have I guess we can use these options to redirect logs to the same file (but not sure, never tried). |
Was about to post this. Agree with @ilyam8 if we can get this to work (maybe it already works) then that would be the cleanest solution. |
We need to add a line to link the new log file as well, it can literally just copy the other lines. Other than that there should be nothing else required on the packaging side of things. |
Yes, this PR brings a new |
|
@ilyam8 and @vkalintiris I tested now a scenario where both root@hades:/home/thiago/Netdata/netdata# ls -l /var/log/netdata/
total 856
-rw-r--r-- 1 netdata netdata 2917 Jan 25 17:28 access.log
-rw-r--r-- 1 netdata netdata 0 Jan 25 17:27 debug.log
-rw-r--r-- 1 netdata netdata 863535 Jan 25 17:28 error.log
-rw-r--r-- 1 root root 5525 Jan 25 17:28 health.logAnd when I commented the root@hades:/home/thiago/Netdata/netdata# killall netdata
root@hades:/home/thiago/Netdata/netdata# vim /etc/netdata/netdata.conf
root@hades:/home/thiago/Netdata/netdata# ps aux| grep netdata
root 22214 0.0 0.0 6832 2824 pts/1 S+ 17:28 0:00 grep netdata
root@hades:/home/thiago/Netdata/netdata# rm -rf /var/log/netdata/*
root@hades:/home/thiago/Netdata/netdata# netdata
root@hades:/home/thiago/Netdata/netdata# ls -l /var/log/netdata/
total 308
-rw-r--r-- 1 netdata netdata 0 Jan 25 17:29 access.log
-rw-r--r-- 1 netdata netdata 248931 Jan 25 17:29 collector.log
-rw-r--r-- 1 netdata netdata 0 Jan 25 17:29 debug.log
-rw-r--r-- 1 root root 60989 Jan 25 17:29 error.log
-rw-r--r-- 1 root root 290 Jan 25 17:29 health.logso the necessity to have another option is not necessary, please, let me know if you have another request. |
Summary
Fixes #13823
Fixes #6038
This PR has the main goal to separate
collector logsfromerror.logsimplifying netdata debug, development, and mainly helping users to find proper issues with collectors.Some of
streaminglogs are going to be redirect for newcollector.log, this is because our stream works like a collector (it uses the same protocol to communicate), but I did not redirect everything with this PR, because I understand this is not the main goal.Test Plan
collector.log.Additional Information
This PR is moving logs from external and internal collectors to
collector.log.For users: How does this change affect me?
Describe the PR affects users: - Which area of Netdata is affected by the change? collectors - Can they see the change or is it an under the hood? If they can see it, where? Yes, they will have separated logs for collectors. - How is the user impacted by the change? Simplify search for errors. - What are there any benefits of the change? Users have separated logs to report error for us.