Logread missing

Hey so I was trying to send logs to a promtail instance and I installed syslog-ng and then rsyslog to try to get this working however in the process it seems that one of these packages removed logread was and it's no longer in /sbin or /usr/bin and so i cant even see my logs in LUCI - is there anyway I can get it back? I see from documentation it's part of ubox package but I cant seem to re install that package and I've been banging my head against the wall for a while now and need help.

Thanks you

/sbin/logread is a symlink to /usr/libexec/logread-ubox on 24.10. Do you still have that file? Otherwise it seems to be a part of logd package. Either way, it should be in your /rom, unless something else is messed up.

1 Like

Cince there is no standard location for logread log m use something like

#!cat /var/log/system

instead

Thank you!! I do still have that. However in the mean time I got rsyslog working and now i'm worried if I create that symlink to /usr/libexec it will break something in rsyslog? Is this a valid concern?

If all you need is to send logs from the OpenWrt device to a syslog-ng server, then you do not need to install anything; just configure the remote server at "/etc/config/system".

I should have mentioned I tried that but it didn't seem to work. I also have a couple requirements and the documentation is well not up to par - I need to use TCP and not what I assume to be the default UDP (no mention of this option or what it uses in the /etc/config/system method) and the logs need to be sent over in RFC5424 format so I couldn't really figure out how to do this using the /etc/config/system method, if you could help I would appreciate it.

Regardless I have already installed rsyslog, which I assume to be the culprit, and at this point I want to restore the viewing logs in LUCI functionality.

EDIT: So i looked back at documentation and i was wrong TCP is an option but I forget exactly why i abandoned this method I know requiring RFC5424 was 1 reason but there were additional reasons I dont recall at the moment. Regardless what's done is done my question is how to get logread back.

When I tried cat /var/log/system i just received a No such file or directory error so maybe there is something obvious i'm missing here? Or I have corrupted even more than I originally assumed?

Please look at the documentation and set the path for the log files.
logread reads from logd and you replaced that with syslog ng or rsyslog.

There is no such file in the default OpenWrt. The log is a round-robin buffer inside the log daemon, in ram.

1 Like

Ok so i just symlinked /etc/logread to /usr/libexec/logread-ubox and it seems to be working.

Anyway Now I would like to send logs using RFC5424 using /etc/config/system as mentioned here and documentation however the logs dont seem to be sent so again this is why I originally tried rsyslog and syslog-ng , any help would be appreciated.

I added the following lines to /etc/config/system

	option log_ip '192.156.30.43'
	option log_port '1514'                           # yes this is the correct port
	option log_proto 'tcp'

then used /etc/init.d/system reload to reload the config .... and nothing.

I'm afk but there is also a service like ulogd or something... Please check it out...

Edit and most often a restart is better then just a reload.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.