flashcatcloud / categraf

one-stop telemetry collector for nightingale
https://flashcat.cloud/docs/
MIT License
850 stars 257 forks source link

配置文件报错,但是指令检查状态正常 #1090

Open showsmall opened 4 days ago

showsmall commented 4 days ago

Relevant config.toml

配置文件异常启动后,./categraf --status 指令检查状态是running,其实没有启动成功
版本:[v0.3.82]

Logs from categraf

Nov 13 18:23:50 VM-6-3-centos systemd: Started Opensource telemetry collector.
Nov 13 18:23:50 VM-6-3-centos categraf: 2024/11/13 18:23:50 F! failed to init config: failed to load configs of dir: /Data/Categraf/categraf-v0.3.82-linux-amd64/conf err:toml: line 505 (last key "logs.items.path"): expected value but found '/' instead
Nov 13 18:23:50 VM-6-3-centos systemd: categraf.service: main process exited, code=exited, status=1/FAILURE
Nov 13 18:23:50 VM-6-3-centos systemd: Unit categraf.service entered failed state.
Nov 13 18:23:50 VM-6-3-centos systemd: categraf.service failed.
Nov 13 18:24:01 VM-6-3-centos systemd: Started Session 275794 of user root.
^C
[root@VM-6-3-centos categraf-v0.3.82-linux-amd64]# 
[root@VM-6-3-centos categraf-v0.3.82-linux-amd64]# 
[root@VM-6-3-centos categraf-v0.3.82-linux-amd64]# ./categraf --status
2024/11/13 18:24:57 I! show categraf service status: running
[root@VM-6-3-centos categraf-v0.3.82-linux-amd64]# ps -ef |grep linux
root     16996 31725  0 18:25 pts/0    00:00:00 grep --color=auto linux
root     29554     1  0 Jul11 tty1     00:00:00 /sbin/agetty --noclear tty1 linux
[root@VM-6-3-centos categraf-v0.3.82-linux-amd64]# ps -ef |grep categraf
root     17054 31725  0 18:25 pts/0    00:00:00 grep --color=auto categraf
[root@VM-6-3-centos categraf-v0.3.82-linux-amd64]# ./categraf --status
2024/11/13 18:25:42 I! show categraf service status: running
[root@VM-6-3-centos categraf-v0.3.82-linux-amd64]#

System info

v0.3.82

Docker

No response

Steps to reproduce

配置文件异常启动后,./categraf --status 指令检查状态是running,其实没有启动成功

Expected behavior

配置文件异常启动后,./categraf --status 指令检查状态是running,其实没有启动成功

Actual behavior

配置文件异常启动后,./categraf --status 指令检查状态是running,其实没有启动成功

Additional info

No response

kongfei605 commented 4 days ago

failed to init config: failed to load configs of dir: /Data/Categraf/categraf-v0.3.82-linux-amd64/conf err:toml: line 505 (last key "logs.items.path"): expected value but found '/' instead

kongfei605 commented 4 days ago

categraf --status 跟执行systemctl status categraf是一样的效果。 这种情况systemctl 会不停拉起categraf,你用systemctl status 也是一样的效果。