Hi,
on our Linux systems, I am using fileinfo to check the /lost+found
directory, to be notified in case there are orphaned inodes from an fsck run (possibly automatic). This has worked fine in 1.5, but after updating the Linux agent (from 1.5.0p25 to 1.6.0p24), the fileinfo output for this directory is missing. Other paths are still there.
Here’s the contents of my /etc/check_mk/fileinfo.cfg
with different pathnames and quotes added for testing:
/lost+found/*
/lost+found/.
/lost+found
/lost?found
/lost*found
/lost+found/
/lost\+found
/lost\\+found
'/lost+found'
"/lost+found"
/var/spool/mail/root
/run/reboot-required
And here’s the relevant part of the 1.6 agent output:
<<<check_mk>>>
Version: 1.6.0p24
AgentOS: linux
[...]
<<<fileinfo:sep(124)>>>
1623419642
[[[header]]]
name|status|size|time
[[[content]]]
/lost\+found|missing
'/lost+found'|missing
"/lost+found"|missing
/var/spool/mail/root|missing
/run/reboot-required|missing
<<<job>>>
[...]
No occurence at all for the real /lost+found
directory. Which does exist, of course:
deb10:~$ sudo ls -la /lost+found
total 20
drwx------ 2 root root 16384 Jul 17 2019 .
drwxr-xr-x 18 root root 4096 Apr 1 11:29 ..
deb10:~$
(Debian 10 Buster, in case that matters)
In comparison, here’s the good output from the 1.5 agent (just reinstalled it on the same system, same fileinfo.cfg):
<<<check_mk>>>
Version: 1.5.0p25
AgentOS: linux
[...]
<<<fileinfo:sep(124)>>>
1623420168
/lost+found/*|missing|1623420168
/lost+found/.|16384|1563346155
/lost+found|16384|1563346155
/lost+found|16384|1563346155
/lost+found|16384|1563346155
/lost+found/|16384|1563346155
/lost+found|16384|1563346155
/lost\\+found|missing|1623420168
/var/spool/mail/root|missing|1623420168
/run/reboot-required|missing|1623420168
<<<job>>>
[...]
I assume the plus character causes the trouble here, but I’m afraid my Perl skills are rather weak.
Probably related to werk #12363: fileinfo: files with special characters not discovered
I can’t find the 1.6.0p22 werk it refers to. There must have been changes to the handling of special characters, so the fix from #12363 probably needs to be extended to cover the plus sign as well, not only umlauts.
Can someone confirm this?
Thanks
Martin