sys-API icon indicating copy to clipboard operation
sys-API copied to clipboard

Unraid - No logs from /var/log appear in app

Open Krillsson opened this issue 10 months ago • 8 comments

Another question. I don't see logs in Monitee-app on smartphone. Can I change default variable /vat/log for /mnt/user/Syslog?

Originally posted by @PrzemekSkw in #185

This is because you also need to uncomment line 38 in configuration.yml (so it looks like below)

logReader:
  files: [ ]
  directories:
  # - data # sys-API data directory. You can enable log to file in application.properties
   - /var/log # Linux log directory

The reason its commented out is because this directory only exist in Linux, not in Windows and Mac

Krillsson avatar Feb 19 '25 18:02 Krillsson

Hello, I uncomment like that but still have 0 files 0B in Logs widget in App. Nothing happen when I click that field. Regards.

PrzemekSkw avatar Feb 19 '25 19:02 PrzemekSkw

Forgot to mention. Did you restart the container after changing the config?

Krillsson avatar Feb 19 '25 19:02 Krillsson

Yes, I always stop container when I edit config files. I start it after and restart second time. Maybe it's because there's very large logs?

PrzemekSkw avatar Feb 19 '25 19:02 PrzemekSkw

Now I'm puzzled. So if you do

ls /var/log

From the unRAID terminal. Are there files?

And if you then use the command line from inside the container and do the same thing. Are the same files there?

Krillsson avatar Feb 19 '25 19:02 Krillsson

Now I'm puzzled. So if you do

ls /var/log

From the unRAID terminal. Are there files?

root@unRAID:~# ls /var/log
apcupsd.events    btmp     dmesg       lastlog   nfsd/      plugins/           removed_uninstall_scripts@  spooler   unraid-api/
apcupsd.events.1  btmp.1   docker.log  libvirt/  nginx/     preclear/          samba/                      swtpm/    vfio-pci
apcupsd.events.2  cron     faillog     maillog   packages@  pwfail/            scripts@                    syslog    vfio-pci-errors
apcupsd.events.3  debug    gitcount    mcelog    phplog     removed_packages@  secure                      syslog.1  wg-quick.log
apcupsd.events.4  dhcplog  gitflash    messages  pkgtools/  removed_scripts@   setup@                      syslog.2  wtmp

And if you then use the command line from inside the container and do the same thing. Are the same files there? From Monitee-agent container console:

# ls /var/log
apcupsd.events    apcupsd.events.4  debug       faillog   libvirt   nfsd      pkgtools  removed_packages           scripts  swtpm     unraid-api       wtmp
apcupsd.events.1  btmp              dhcplog     gitcount  maillog   nginx     plugins   removed_scripts            secure   syslog    vfio-pci
apcupsd.events.2  btmp.1            dmesg       gitflash  mcelog    packages  preclear  removed_uninstall_scripts  setup    syslog.1  vfio-pci-errors
apcupsd.events.3  cron              docker.log  lastlog   messages  phplog    pwfail    samba                      spooler  syslog.2  wg-quick.log
# 

PrzemekSkw avatar Feb 19 '25 19:02 PrzemekSkw

I have the same issue so I think I can respond as well.

Yes there are files under /var/log for example:

ls -la /var/log/
total 6744
drwxr-xr-x 12 root   root     740 Feb 19 04:40 ./
drwxr-xr-x 14 root   root     340 Aug 16  2023 ../
-rw-r--r--  1 root   root      85 Feb 17 21:16 apcupsd.events
-rw-------  1 root   root     384 Feb 19 11:19 btmp
-rw-r--r--  1 root   root       0 Apr 28  2021 cron
-rw-r--r--  1 root   root       0 Apr 28  2021 debug
-rw-r--r--  1 root   root     443 Feb 17 21:16 dhcplog
-rw-r--r--  1 root   root   78137 Feb 17 21:15 dmesg
-rw-r--r--  1 root   root   75680 Feb 19 20:38 docker.log
-rw-r--r--  1 root   root       0 Dec  5 22:48 faillog
-rw-r--r--  1 root   root     292 Feb 19 19:57 lastlog
drwxr-xr-x  4 root   root     140 Feb 17 21:17 libvirt/
-rw-r--r--  1 root   root       0 Apr 28  2021 maillog
-rw-r--r--  1 root   root       0 Feb 17 21:16 mcelog
-rw-r--r--  1 root   root       0 Apr 28  2021 messages

I have commented out the following in the configuration.yml

logReader:
  files: [ ]
  directories:
  # - data # sys-API data directory. You can enable log to file in application.properties
    - /var/log # Linux log directory

The container has mounted: Container path: /var/log Host Path: /var/log/

hndrkx avatar Feb 19 '25 19:02 hndrkx

I can show my configs to bee sure I don't have any errors:

Image

Image

configuration.yml

linux:
  journalLogs:
    enabled: true
  systemDaemonServiceManagement:
    enabled: true
logReader:
  files: [ ]
  directories:
  # - data # sys-API data directory. You can enable log to file in application.properties
   - /var/log # Linux log directory
# web interface for running queries

PrzemekSkw avatar Feb 19 '25 19:02 PrzemekSkw

Found the issue. It's related to #187. I am working on a fix for the agent.

Krillsson avatar Feb 19 '25 21:02 Krillsson

Since #187 is now resolved. The problem with Logs widget not clickable in the app should now be resolved as well after updating the agent from the unRAID UI

Krillsson avatar Feb 21 '25 06:02 Krillsson

Thank You very much. Now works great. Regards.

PrzemekSkw avatar Feb 21 '25 07:02 PrzemekSkw