File Info not working on linux?

Hello all,

I’m currently facing a problem with the File Info check on a Linux machine (agent version 1.6.0p22).
I’ve added my paths to the fileinfo.cfg, but these paths are only visible in WATO if there are files in there in the moment of the scan from CheckMK.

fileinfo.cfg:

/path/to/my/files/A/*
/path/to/my/files/B/*

cmk -d output linux:

<<fileinfo:sep(124)>>
1615277604
[[[header]]]
name|status|size|time
[[[content]]]

Doing the same on Windows shows at least the empty folders.

check_mk.user

fileinfo:
# enabled: yes
# below are possible examples
path:
# - ‘c:\a\a’ # generates missing| string
# - ‘c:\Users\Public*.log’ # real string to process
# - “this\is\not\recommended\” # double quoating uses escape sequences
# - ‘c:\Users\Public*\Desktop.ini’ works, 8 files to control
# - 'c:\Windows\Resources*
\aero\aero*.’ works too, you will get two files in 'c:\Windows\Resources\Themes\aero'
# - 'c:\dev\shared_public*.
’ # typical test folder, provided during development
# - ‘’ # empty strings will be ignored
# - ‘–’ # all string without "C:" or “\” at start will be ignored too for security reason
- ‘C:\path\to\my\files*’

cmk -d output windows:

<<fileinfo:sep(124)>>
1615278652
C:\path\to\my\files\*|missing|1615278652

Why is the linux version working different?

Regards
CheckMan

Is there a problem in your setup with the different output?
I would say we have two different systems and with this comes also a little different output.

Do you mean that you only see this as inventoried checks if there is the empty path or?

I only see inventoried checks if there is a file in the folder(s) which I specified in the filinfo.cfg on a Linux system.

On Windows I see also inventoried checks if there are 0 files in the specified folder(s).

Ok, you are right.
The problem is the Perl function handling the fileinfo check inside the agent.
It produces only an output if you have an empty folder is there, but not an empty list of files.

So thats a bug?
Do you know any workaround?

If it is a bug or working as intended, i don’t know.
My perl knowledge is not so good that i can fix this.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.