Fileinfo / Fileinfo.groups

  • Hello.


    We are currently setting up our new nagios system with OMD / check_mk Raw 1.2p18 ..


    For some of our servers we need to monitor the filecount of different folders.

    E.g. -> error folders ; with incoming *.xml files ; if the filecount is more than 1 or 5 -> we need an alert.


    In the check_mk.ini on the server i edited [fileinfo],

    and the filepath -> path = C:\Programme\.......\BackupDirectory\*.xml


    WATO config:


    Parameters for discovered services -> Size, age and count of file groups -> made an rule,

    condition: Host name is xxxxxxx

    File Group Name begins with ErrorTest

    Value Maximal file count: 3, 10


    also made an manual check.. for Size, age and count of file groups

    condition: hostname is xxxxxx

    fileinfo.groups, ErrorTest,

    Maximal file count: 2, 5


    and also made a rule for File Grouping Pattern ->

    condition: hostname is xxxxxx

    Name of group: ErrorTest

    Include pattern: "C:\Programme\.......\BackupDirectory\*.xml"

    (tried different variants with "" & without ; *.* ...



    The problem is the fileGroup check always tell us - everything allright..

    "OK - age_oldest is 0 sec, age_newest is 0 sec, count is 0, size is 0 B"


    I made an new service discovery for the host, suddenly all files appeared as single service each.

    so the check itself is working, but i cannot group them somehow.



    can you help us / tell us if we forgot something or maybe give an "how-to tutorial" for this check?

    i ´ve checked google for hours, found some hints, even with the same problem.. but not the final solution


    thank you in advance !!

    André

  • check_mk Raw 1.2p18

    That is not the correct cmk version or maybe a typo. Please re-check your version in the top left corner of your Web-GUI.


    and also made a rule for File Grouping Pattern ->

    condition: hostname is xxxxxx

    Name of group: ErrorTest

    Include pattern: "C:\Programme\.......\BackupDirectory\*.xml"

    In your file group patter nWATO rule, try to use regex this way:


    C:\\temp\\test\.txt


    Drop the double quotes and add a backslash in front of backslashes and dots to escape them:


    C:\\Programme\\your\\folder\\hierarchy\\BackupDirectory\\*\.xml


    Also, you do not need the manual check rule if you defined the files in your check_mk.ini.


    Edit:


    Forget the struck stuff above. I had a look into the check plugin. You have to define the pattern like this:


    C:\your\directory\hierarchy\*.xml


    Please post the output of the following command, so we can make sure what to enter as pattern in the rule:


    # cmk -d HOST | grep -A10 fileinfo

  • back from holiday.

    thank you for your answer.

    yup the version was a typo, it ´s 1.2.8p18 :)


    i´m going to test this now..

  • After you created a site, there is a user with the same name as the site you created. Please login with that user and retry.

    the site is called "nagios" with that user i cannot login.

    user for the omd gui -> "omdadmin" -> cannot login

    then i have the 2 linux users "nagiosadmin" & "root" -> login possible, no cmk installed prompt.

  • As root, try # su - nagios on the cmd line, then execute the cmk command.

    thanks. it worked. but prompt is this:


    oroot@NAGIX2:~# su - nagios

    OMD[nagios]:~$ cmk -d hostname.dom.local | grep -A10 fileinfo

    Network error: [Errno -2] Name or service not known


    OMD[nagios]:~$ cmk -d hostname | grep -A10 fileinfo

    Network error: [Errno -2] Name or service not known

    OMD[nagios]:~$

  • ###

    <<<fileinfo:sep(124)>>>
    1507895662

    C:\Programme\Folder\Folder\BackupDirectory\TestVonAg\thefilexy.xml|3821|1483398727

    ###


    ok i get prompted every file i put in my testfolder

  • That looks fine. You have to input C:\Programme\Folder\Folder\BackupDirectory\TestVonAg\*.xml in the file grouping patterns rule.

  • it worked !!! thank you guys !!! :) 

    was so close actually ^^


    ps: das feierabendbier geht virtuell heut auf mich :P