Size and age of single files.- three rules defined but only one services of the host and NONE in HOST parameters

CMK version:
2.0.0p22.cee
OS version:
Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-94-generic x86_64)
Error message:
NONE
Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

I have problem with detecting file missing.

Have defined it in WATO and path info and the age of the file is correctly shown BUT the alarm when the file is missing is also missing…

Trying to solve the problem I have tried three options - defined three rules:

  1. Where have defined the file I want to be monitored - alarm for file missing (not working) and alarm for minimal age of file (working)

  2. Where have defined monitoring of the file which is present if the desired file is absent (same path - different name) - alarm for maximal age (1&2 secconds - to alert when the file appears)

  3. The same as on 2, but in [Size and age of a single file (mk_filestats)]

Inspite of defining them all - I have only ONE service present in “Services of the host”:

WHY?

Also - in the properties of the check:


NO check is selected, and in the list of checks - no checks is active:

What did I do wrong?
What should i do to have reliable indication when the file (deployed) goes missing or when the replacement file (failed) is there instead of the right one?

May you share your agent output please.

I am not sure as how to do it by CLI…

You can call “cmk -d HOSTNAME” or use the file in ~/tmp/check_mk/cache/HOSTNAME

1 Like

Or on the agent side:

C:\Program Files (x86)\checkmk\service\check_mk_agent.exe test

Or in WATO/SETUP diagnostic page
Or telnet 6556 (if no encryption setup)

1 Like

Thank you all for the good will to help.

Here is what I have found in the output file:

<<<fileinfo:sep(124)>>>
1656071511
C:\Program Files\Hewlett-Packard\CSA\jboss-as\standalone\deployments\|4096|1656009808
<<<services>>>

No filenames at the end…
And part from check_mk.user.yml file:

fileinfo:
    enabled: yes
    # below are possible examples
    path:
        - 'C:\Program Files\Hewlett-Packard\CSA\jboss-as\standalone\deployments\'

please add a “*” to the end of your path to make it:

  • ‘C:\Program Files\Hewlett-Packard\CSA\jboss-as\standalone\deployments*’
    or i guess
  • ‘C:\Program Files\Hewlett-Packard\CSA\jboss-as\standalone\deployments\idm-service.war*’

would cover your use case as well

1 Like