Here’s what I tried:
-Went
to “Parameters for Inventorized Checks” Filesystem
grouping patterns
-Created
a new file group named ‘XYZ’ with pattern
/opt/user/folder/*.js.� Specified the host name.
-Went
to “Parameters for Inventorized Checks” and “Size age and
count of file groups” in the “Storage Filesystems and Files”
section.
-Created
a new item and filled in: �File group name ‘XYZ’, Maximal
file count: �Warning > 50, Critical > 100
-Update
changes
-Nothing
happens.
I
also tried a similar process with the ‘Manual checks’ and
after updating I got a pending ‘File group XYZ’ but with an
error or warning message.�
I
can provide more information if needed, but it may be easier
if someone just walks me through a successful process.
_______________________________________________
checkmk-en mailing list
We�ll meet in Munich for the 2nd Check_MK Conference!
Book your place now and be part of it.
October 18th-20th, 2015
Thanks Jam, I am a beginner here and using OMD so some of these instructions I don’t really understand. So, it seems I cannot do this from within OMD, I need to go to the server at which I want to check the file count and modify a file **/etc/check_mk/fileinfo.cfg. **Is this correct? This is unlike other checks where I can configure this directly within OMD.
you’re right, this is different to some (not all) other checks. Fact is you cannot send any commands from external to the agent, so how should the agent know which files/folders you want to monitor - the agent cannot send information for every found file because this could be veeeeery much data and last very long.
You should read “cmk -M fileinfo” and “cmk -M fileinfo.groups” (both executed as omd site user) for information about file monitoring.
HTH,
Marcel
···
Seth Williams sethwill@gmail.com schrieb am Di., 30. Juni 2015 um 19:17 Uhr:
Thanks Jam, I am a beginner here and using OMD so some of these instructions I don’t really understand. So, it seems I cannot do this from within OMD, I need to go to the server at which I want to check the file count and modify a file **/etc/check_mk/fileinfo.cfg. **Is this correct? This is unlike other checks where I can configure this directly within OMD.
Thank you Marcel, like I mentioned I am new to OMD and check_mk. But you asked how the agent would know which files/folders you want to monitor. Well, in OMD, there is a way to specify the file group in "Parameters for Inventorized Checks"Filesystem grouping patterns. This is how I imagined the agent would know what folder/files to check. Also, in the section “Parameters for Inventorized Checks” and “Size age and count of file groups” in the “Storage Filesystems and Files” section, you can specify the file counts for warning and critical. This feels strange that I need to edit a file and specify them in the fileinfo.cfg file, since there is a place to specify them in the OMD interface. What are these settings used for in OMD if not for file monitoring? Were they set up, but not finished, so they aren’t working?
In any case, I have read and will continue to read the fileinfo documentation, and work my way through this. I don’t have a $MK_CONFDIR so I guess I will just try /etc/check_mk/fileinfo.cfg first and see what happens.
you’re right, this is different to some (not all) other checks. Fact is you cannot send any commands from external to the agent, so how should the agent know which files/folders you want to monitor - the agent cannot send information for every found file because this could be veeeeery much data and last very long.
You should read “cmk -M fileinfo” and “cmk -M fileinfo.groups” (both executed as omd site user) for information about file monitoring.
HTH,
Marcel
Seth Williams sethwill@gmail.com schrieb am Di., 30. Juni 2015 um 19:17 Uhr:
Thanks Jam, I am a beginner here and using OMD so some of these instructions I don’t really understand. So, it seems I cannot do this from within OMD, I need to go to the server at which I want to check the file count and modify a file **/etc/check_mk/fileinfo.cfg. **Is this correct? This is unlike other checks where I can configure this directly within OMD.
Yes, It would not be practical for the client to send over a list of
every file on the system every 60 seconds, so you have to
configure the client so it know which files you are interested in.
see: There is not much info there, just:
some of these instructions I don’t really understand. So, it
seems I cannot do this from within OMD, I need to go to the
server at which I want to check the file count and modify a
file ** /etc/check_mk/fileinfo.cfg.
** Is
this correct? This is unlike other checks where I can
configure this directly within OMD.
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
[http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en](http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en)
Well meet in Munich for the 2nd Check_MK Conference!
Book your place now and be part of it.
October 18th-20th, 2015
[http://mathias-kettner.com/conference](http://mathias-kettner.com/conference)
MK_CONFDIR is set in the agent itself. You can open the agent (usually /usr/bin/check_mk_agent) in an editor of your choice and search for several variables set at the beginning of the script: MK_LIBDIR, MK_CONFDIR, etc…
Regards,
Marcel
···
Seth Williams sethwill@gmail.com schrieb am Di., 30. Juni 2015 um 20:02 Uhr:
Thank you Marcel, like I mentioned I am new to OMD and check_mk. But you asked how the agent would know which files/folders you want to monitor. Well, in OMD, there is a way to specify the file group in "Parameters for Inventorized Checks"Filesystem grouping patterns. This is how I imagined the agent would know what folder/files to check. Also, in the section “Parameters for Inventorized Checks” and “Size age and count of file groups” in the “Storage Filesystems and Files” section, you can specify the file counts for warning and critical. This feels strange that I need to edit a file and specify them in the fileinfo.cfg file, since there is a place to specify them in the OMD interface. What are these settings used for in OMD if not for file monitoring? Were they set up, but not finished, so they aren’t working?
In any case, I have read and will continue to read the fileinfo documentation, and work my way through this. I don’t have a $MK_CONFDIR so I guess I will just try /etc/check_mk/fileinfo.cfg first and see what happens.
you’re right, this is different to some (not all) other checks. Fact is you cannot send any commands from external to the agent, so how should the agent know which files/folders you want to monitor - the agent cannot send information for every found file because this could be veeeeery much data and last very long.
You should read “cmk -M fileinfo” and “cmk -M fileinfo.groups” (both executed as omd site user) for information about file monitoring.
HTH,
Marcel
Seth Williams sethwill@gmail.com schrieb am Di., 30. Juni 2015 um 19:17 Uhr:
Thanks Jam, I am a beginner here and using OMD so some of these instructions I don’t really understand. So, it seems I cannot do this from within OMD, I need to go to the server at which I want to check the file count and modify a file **/etc/check_mk/fileinfo.cfg. **Is this correct? This is unlike other checks where I can configure this directly within OMD.
Wow, thanks guys for all your help and input here. Let me chew on this, try a few things and I’ll get back to you with some questions or hopefully some SUCCESS!
MK_CONFDIR is set in the agent itself. You can open the agent (usually /usr/bin/check_mk_agent) in an editor of your choice and search for several variables set at the beginning of the script: MK_LIBDIR, MK_CONFDIR, etc…
Regards,
Marcel
Seth Williams sethwill@gmail.com schrieb am Di., 30. Juni 2015 um 20:02 Uhr:
Thank you Marcel, like I mentioned I am new to OMD and check_mk. But you asked how the agent would know which files/folders you want to monitor. Well, in OMD, there is a way to specify the file group in "Parameters for Inventorized Checks"Filesystem grouping patterns. This is how I imagined the agent would know what folder/files to check. Also, in the section “Parameters for Inventorized Checks” and “Size age and count of file groups” in the “Storage Filesystems and Files” section, you can specify the file counts for warning and critical. This feels strange that I need to edit a file and specify them in the fileinfo.cfg file, since there is a place to specify them in the OMD interface. What are these settings used for in OMD if not for file monitoring? Were they set up, but not finished, so they aren’t working?
In any case, I have read and will continue to read the fileinfo documentation, and work my way through this. I don’t have a $MK_CONFDIR so I guess I will just try /etc/check_mk/fileinfo.cfg first and see what happens.
you’re right, this is different to some (not all) other checks. Fact is you cannot send any commands from external to the agent, so how should the agent know which files/folders you want to monitor - the agent cannot send information for every found file because this could be veeeeery much data and last very long.
You should read “cmk -M fileinfo” and “cmk -M fileinfo.groups” (both executed as omd site user) for information about file monitoring.
HTH,
Marcel
Seth Williams sethwill@gmail.com schrieb am Di., 30. Juni 2015 um 19:17 Uhr:
Thanks Jam, I am a beginner here and using OMD so some of these instructions I don’t really understand. So, it seems I cannot do this from within OMD, I need to go to the server at which I want to check the file count and modify a file **/etc/check_mk/fileinfo.cfg. **Is this correct? This is unlike other checks where I can configure this directly within OMD.
Ok Jam, I see that this works for specific files. Now I have a check for every file in the folder I specified. However, I want to do something similar but with file groups. How do I create a file group on the client? I want to do the check for the # of files matching an extension in a folder. Critical if > 50 Warning if > 25 or something like that.
Is there a similar file ‘filegroup.cfg’ or something similar that I need to set up on the client? Can you give me the example syntax, like you did for fileinfo.cfg?
There is not much info there, just:
---
For Linux, FREEBSD, MACOSX and Solaris the configuration is done via
fileinfo.cfg located in the $MK_CONFDIR (usually /etc/check_mk/fileinfo.cfg ).
To add files to the check, simply add one path pattern /tmp/*.log
per line. Wildcards or patterns can be used as usual on the console.
---
So, for example, on the monitored linux host, as root, (if you are
using omd or check_mk raw)
add the following line to /etc/check_mk/fileinfo.cfg (if it
doesn’t exist, create it):
/var/log/*log
Then save the file and run:
/usr/bin/check_mk_agent | less
search for <<<fileinfo
and you should see the list of log files matching the pattern.
That is what is passed to the check_mk server. On the server
side, you have to configure WATO to tell it what to do with the
list of files....create a rule for the size, number, whatever.
You can add more lines to fileinfo.cfg to match other files and
configure rules in WATO to handle them.
On 06/30/2015 01:15 PM, Seth Williams > wrote:
Thanks Jam, I am a beginner here and using OMD so
some of these instructions I don’t really understand. So, it
seems I cannot do this from within OMD, I need to go to the
server at which I want to check the file count and modify a
file ** /etc/check_mk/fileinfo.cfg.
** Is
this correct? This is unlike other checks where I can
configure this directly within OMD.
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
[http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en](http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en)
Well meet in Munich for the 2nd Check_MK Conference!
Book your place now and be part of it.
October 18th-20th, 2015
[http://mathias-kettner.com/conference](http://mathias-kettner.com/conference)
for filegroups you do not need extra configuration on agent side. You just configure fileinfo.cfg as usual, assumed you want to monitor all *.log in folder /var/log/:
fileinfo.cfg on agent side with this content:
···
##########
/var/log/*.log
##########
…this would result in 6 discovered fileinfo services if you have 6 logfiles matching, but not if you proceed and do the following:
create a rule in WATO → manual checks (or parameters for discovered services, I don’t know) → file grouping patterns:
** group name: <chose_a_name_suitable>
** pattern: /var/log/*.log
create a rule in WATO → manual checks (or parameters for discovered services, I don’t know) → size, age and count of file groups:
** group name: <same_as_in_previous_rule>
** params as needed
…and the result (after an inventory/discovery) will be a file group service instead of the mentioned 6 fileinfo services.
HTH,
Marcel
Seth Williams sethwill@gmail.com schrieb am Mi., 1. Juli 2015 um 21:38 Uhr:
Ok Jam, I see that this works for specific files. Now I have a check for every file in the folder I specified. However, I want to do something similar but with file groups. How do I create a file group on the client? I want to do the check for the # of files matching an extension in a folder. Critical if > 50 Warning if > 25 or something like that.
Is there a similar file ‘filegroup.cfg’ or something similar that I need to set up on the client? Can you give me the example syntax, like you did for fileinfo.cfg?
There is not much info there, just:
---
For Linux, FREEBSD, MACOSX and Solaris the configuration is done via
fileinfo.cfg located in the $MK_CONFDIR (usually /etc/check_mk/fileinfo.cfg ).
To add files to the check, simply add one path pattern /tmp/*.log
per line. Wildcards or patterns can be used as usual on the console.
---
So, for example, on the monitored linux host, as root, (if you are
using omd or check_mk raw)
add the following line to /etc/check_mk/fileinfo.cfg (if it
doesn’t exist, create it):
/var/log/*log
Then save the file and run:
/usr/bin/check_mk_agent | less
search for <<<fileinfo
and you should see the list of log files matching the pattern.
That is what is passed to the check_mk server. On the server
side, you have to configure WATO to tell it what to do with the
list of files....create a rule for the size, number, whatever.
You can add more lines to fileinfo.cfg to match other files and
configure rules in WATO to handle them.
On 06/30/2015 01:15 PM, Seth Williams > > wrote:
Thanks Jam, I am a beginner here and using OMD so
some of these instructions I don’t really understand. So, it
seems I cannot do this from within OMD, I need to go to the
server at which I want to check the file count and modify a
file ** /etc/check_mk/fileinfo.cfg.
** Is
this correct? This is unlike other checks where I can
configure this directly within OMD.
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
[http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en](http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en)
Well meet in Munich for the 2nd Check_MK Conference!
Book your place now and be part of it.
October 18th-20th, 2015
[http://mathias-kettner.com/conference](http://mathias-kettner.com/conference)
for filegroups you do not need extra configuration on agent side. You just configure fileinfo.cfg as usual, assumed you want to monitor all *.log in folder /var/log/:
fileinfo.cfg on agent side with this content:
##########
/var/log/*.log
##########
…this would result in 6 discovered fileinfo services if you have 6 logfiles matching, but not if you proceed and do the following:
create a rule in WATO → manual checks (or parameters for discovered services, I don’t know) → file grouping patterns:
** group name: <chose_a_name_suitable>
** pattern: /var/log/*.log
create a rule in WATO → manual checks (or parameters for discovered services, I don’t know) → size, age and count of file groups:
** group name: <same_as_in_previous_rule>
** params as needed
…and the result (after an inventory/discovery) will be a file group service instead of the mentioned 6 fileinfo services.
HTH,
Marcel
Seth Williams sethwill@gmail.com schrieb am Mi., 1. Juli 2015 um 21:38 Uhr:
Ok Jam, I see that this works for specific files. Now I have a check for every file in the folder I specified. However, I want to do something similar but with file groups. How do I create a file group on the client? I want to do the check for the # of files matching an extension in a folder. Critical if > 50 Warning if > 25 or something like that.
Is there a similar file ‘filegroup.cfg’ or something similar that I need to set up on the client? Can you give me the example syntax, like you did for fileinfo.cfg?
There is not much info there, just:
---
For Linux, FREEBSD, MACOSX and Solaris the configuration is done via
fileinfo.cfg located in the $MK_CONFDIR (usually /etc/check_mk/fileinfo.cfg ).
To add files to the check, simply add one path pattern /tmp/*.log
per line. Wildcards or patterns can be used as usual on the console.
---
So, for example, on the monitored linux host, as root, (if you are
using omd or check_mk raw)
add the following line to /etc/check_mk/fileinfo.cfg (if it
doesn’t exist, create it):
/var/log/*log
Then save the file and run:
/usr/bin/check_mk_agent | less
search for <<<fileinfo
and you should see the list of log files matching the pattern.
That is what is passed to the check_mk server. On the server
side, you have to configure WATO to tell it what to do with the
list of files....create a rule for the size, number, whatever.
You can add more lines to fileinfo.cfg to match other files and
configure rules in WATO to handle them.
On 06/30/2015 01:15 PM, Seth Williams > > > wrote:
Thanks Jam, I am a beginner here and using OMD so
some of these instructions I don’t really understand. So, it
seems I cannot do this from within OMD, I need to go to the
server at which I want to check the file count and modify a
file ** /etc/check_mk/fileinfo.cfg.
** Is
this correct? This is unlike other checks where I can
configure this directly within OMD.
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
[http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en](http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en)
Well meet in Munich for the 2nd Check_MK Conference!
Book your place now and be part of it.
October 18th-20th, 2015
[http://mathias-kettner.com/conference](http://mathias-kettner.com/conference)
Ok, I did this and it shows 0 .js files even though there are several .js files in the path. Here’s what I did:
Create the fileinfo.cfg with the /my/path/*.js
I created this on the system I’m monitoring.
Verified that it finds the files by running /usr/bin/check_mk_agent | less
Create a rule in WATO for file grouping pattern /my/path/*.js
Host and Service Parameters → Parameters for Inventorized Checks → Filesystem Grouping Patterns. I gave it a name like ‘NAME’ and a value like /my/path/*.js
Create a rule in WATO for size, age and count using the file group above
Host and Service Parameters → Manual Checks → Size, age and count of file groups.
I used the file group ‘NAME’ above and have tried setting max counts, or age, etc.
Bottom line is that in the ‘Services’ the check shows up but with count of 0 .js files when there are several in /my/path/
for filegroups you do not need extra configuration on agent side. You just configure fileinfo.cfg as usual, assumed you want to monitor all *.log in folder /var/log/:
fileinfo.cfg on agent side with this content:
##########
/var/log/*.log
##########
…this would result in 6 discovered fileinfo services if you have 6 logfiles matching, but not if you proceed and do the following:
create a rule in WATO → manual checks (or parameters for discovered services, I don’t know) → file grouping patterns:
** group name: <chose_a_name_suitable>
** pattern: /var/log/*.log
create a rule in WATO → manual checks (or parameters for discovered services, I don’t know) → size, age and count of file groups:
** group name: <same_as_in_previous_rule>
** params as needed
…and the result (after an inventory/discovery) will be a file group service instead of the mentioned 6 fileinfo services.
HTH,
Marcel
Seth Williams sethwill@gmail.com schrieb am Mi., 1. Juli 2015 um 21:38 Uhr:
Ok Jam, I see that this works for specific files. Now I have a check for every file in the folder I specified. However, I want to do something similar but with file groups. How do I create a file group on the client? I want to do the check for the # of files matching an extension in a folder. Critical if > 50 Warning if > 25 or something like that.
Is there a similar file ‘filegroup.cfg’ or something similar that I need to set up on the client? Can you give me the example syntax, like you did for fileinfo.cfg?
There is not much info there, just:
---
For Linux, FREEBSD, MACOSX and Solaris the configuration is done via
fileinfo.cfg located in the $MK_CONFDIR (usually /etc/check_mk/fileinfo.cfg ).
To add files to the check, simply add one path pattern /tmp/*.log
per line. Wildcards or patterns can be used as usual on the console.
---
So, for example, on the monitored linux host, as root, (if you are
using omd or check_mk raw)
add the following line to /etc/check_mk/fileinfo.cfg (if it
doesn’t exist, create it):
/var/log/*log
Then save the file and run:
/usr/bin/check_mk_agent | less
search for <<<fileinfo
and you should see the list of log files matching the pattern.
That is what is passed to the check_mk server. On the server
side, you have to configure WATO to tell it what to do with the
list of files....create a rule for the size, number, whatever.
You can add more lines to fileinfo.cfg to match other files and
configure rules in WATO to handle them.
On 06/30/2015 01:15 PM, Seth Williams > > > > wrote:
Thanks Jam, I am a beginner here and using OMD so
some of these instructions I don’t really understand. So, it
seems I cannot do this from within OMD, I need to go to the
server at which I want to check the file count and modify a
file ** /etc/check_mk/fileinfo.cfg.
** Is
this correct? This is unlike other checks where I can
configure this directly within OMD.
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
[http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en](http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en)
Well meet in Munich for the 2nd Check_MK Conference!
Book your place now and be part of it.
October 18th-20th, 2015
[http://mathias-kettner.com/conference](http://mathias-kettner.com/conference)
Hey everyone, I found my own mistake. Choose ‘File Grouping Patterns’ and not ‘Filesystem Grouping Patterns’.
Create the fileinfo.cfg with the /my/path/*.js
I created this on the system I’m monitoring.
Verified that it finds the files by running /usr/bin/check_mk_agent | less
Create a rule in WATO for file grouping pattern /my/path/*.js
Host and Service Parameters → Parameters for Inventorized Checks → File Grouping Patterns. Choose ‘File Grouping Patterns’ and not ‘Filesystem Grouping Patterns’. I gave it a name like ‘NAME’ and a value like /my/path/*.js
Create a rule in WATO for size, age and count using the file group above
Host and Service Parameters → Manual Checks → Size, age and count of file groups.
I used the file group ‘NAME’ above and have tried setting max counts, or age, etc.
Ok, I did this and it shows 0 .js files even though there are several .js files in the path. Here’s what I did:
Create the fileinfo.cfg with the /my/path/*.js
I created this on the system I’m monitoring.
Verified that it finds the files by running /usr/bin/check_mk_agent | less
Create a rule in WATO for file grouping pattern /my/path/*.js
Host and Service Parameters → Parameters for Inventorized Checks → Filesystem Grouping Patterns. I gave it a name like ‘NAME’ and a value like /my/path/*.js
Create a rule in WATO for size, age and count using the file group above
Host and Service Parameters → Manual Checks → Size, age and count of file groups.
I used the file group ‘NAME’ above and have tried setting max counts, or age, etc.
Bottom line is that in the ‘Services’ the check shows up but with count of 0 .js files when there are several in /my/path/
for filegroups you do not need extra configuration on agent side. You just configure fileinfo.cfg as usual, assumed you want to monitor all *.log in folder /var/log/:
fileinfo.cfg on agent side with this content:
##########
/var/log/*.log
##########
…this would result in 6 discovered fileinfo services if you have 6 logfiles matching, but not if you proceed and do the following:
create a rule in WATO → manual checks (or parameters for discovered services, I don’t know) → file grouping patterns:
** group name: <chose_a_name_suitable>
** pattern: /var/log/*.log
create a rule in WATO → manual checks (or parameters for discovered services, I don’t know) → size, age and count of file groups:
** group name: <same_as_in_previous_rule>
** params as needed
…and the result (after an inventory/discovery) will be a file group service instead of the mentioned 6 fileinfo services.
HTH,
Marcel
Seth Williams sethwill@gmail.com schrieb am Mi., 1. Juli 2015 um 21:38 Uhr:
Ok Jam, I see that this works for specific files. Now I have a check for every file in the folder I specified. However, I want to do something similar but with file groups. How do I create a file group on the client? I want to do the check for the # of files matching an extension in a folder. Critical if > 50 Warning if > 25 or something like that.
Is there a similar file ‘filegroup.cfg’ or something similar that I need to set up on the client? Can you give me the example syntax, like you did for fileinfo.cfg?
There is not much info there, just:
---
For Linux, FREEBSD, MACOSX and Solaris the configuration is done via
fileinfo.cfg located in the $MK_CONFDIR (usually /etc/check_mk/fileinfo.cfg ).
To add files to the check, simply add one path pattern /tmp/*.log
per line. Wildcards or patterns can be used as usual on the console.
---
So, for example, on the monitored linux host, as root, (if you are
using omd or check_mk raw)
add the following line to /etc/check_mk/fileinfo.cfg (if it
doesn’t exist, create it):
/var/log/*log
Then save the file and run:
/usr/bin/check_mk_agent | less
search for <<<fileinfo
and you should see the list of log files matching the pattern.
That is what is passed to the check_mk server. On the server
side, you have to configure WATO to tell it what to do with the
list of files....create a rule for the size, number, whatever.
You can add more lines to fileinfo.cfg to match other files and
configure rules in WATO to handle them.
On 06/30/2015 01:15 PM, Seth Williams > > > > > wrote:
Thanks Jam, I am a beginner here and using OMD so
some of these instructions I don’t really understand. So, it
seems I cannot do this from within OMD, I need to go to the
server at which I want to check the file count and modify a
file ** /etc/check_mk/fileinfo.cfg.
** Is
this correct? This is unlike other checks where I can
configure this directly within OMD.
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
[http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en](http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en)
Well meet in Munich for the 2nd Check_MK Conference!
Book your place now and be part of it.
October 18th-20th, 2015
[http://mathias-kettner.com/conference](http://mathias-kettner.com/conference)
The error lies in step 2 because you should create a rule in “file grouping patterns”, not “filesystem grouping patterns” - you want to count files, not summarize filesystems
HTH,
Marcel
···
Seth Williams sethwill@gmail.com schrieb am Di., 7. Juli 2015 um 21:47 Uhr: > Ok, I did this and it shows 0 .js files even though there are several .js files in the path. Here’s what I did:
Create the fileinfo.cfg with the /my/path/*.js
I created this on the system I’m monitoring.
Verified that it finds the files by running /usr/bin/check_mk_agent | less
Create a rule in WATO for file grouping pattern /my/path/*.js
Host and Service Parameters → Parameters for Inventorized Checks → Filesystem Grouping Patterns. I gave it a name like ‘NAME’ and a value like /my/path/*.js
Create a rule in WATO for size, age and count using the file group above
Host and Service Parameters → Manual Checks → Size, age and count of file groups.
I used the file group ‘NAME’ above and have tried setting max counts, or age, etc.
Bottom line is that in the ‘Services’ the check shows up but with count of 0 .js files when there are several in /my/path/
for filegroups you do not need extra configuration on agent side. You just configure fileinfo.cfg as usual, assumed you want to monitor all *.log in folder /var/log/:
fileinfo.cfg on agent side with this content:
##########
/var/log/*.log
##########
…this would result in 6 discovered fileinfo services if you have 6 logfiles matching, but not if you proceed and do the following:
create a rule in WATO → manual checks (or parameters for discovered services, I don’t know) → file grouping patterns:
** group name: <chose_a_name_suitable>
** pattern: /var/log/*.log
create a rule in WATO → manual checks (or parameters for discovered services, I don’t know) → size, age and count of file groups:
** group name: <same_as_in_previous_rule>
** params as needed
…and the result (after an inventory/discovery) will be a file group service instead of the mentioned 6 fileinfo services.
HTH,
Marcel
Seth Williams sethwill@gmail.com schrieb am Mi., 1. Juli 2015 um 21:38 Uhr:
Ok Jam, I see that this works for specific files. Now I have a check for every file in the folder I specified. However, I want to do something similar but with file groups. How do I create a file group on the client? I want to do the check for the # of files matching an extension in a folder. Critical if > 50 Warning if > 25 or something like that.
Is there a similar file ‘filegroup.cfg’ or something similar that I need to set up on the client? Can you give me the example syntax, like you did for fileinfo.cfg?
There is not much info there, just:
---
For Linux, FREEBSD, MACOSX and Solaris the configuration is done via
fileinfo.cfg located in the $MK_CONFDIR (usually /etc/check_mk/fileinfo.cfg ).
To add files to the check, simply add one path pattern /tmp/*.log
per line. Wildcards or patterns can be used as usual on the console.
---
So, for example, on the monitored linux host, as root, (if you are
using omd or check_mk raw)
add the following line to /etc/check_mk/fileinfo.cfg (if it
doesn’t exist, create it):
/var/log/*log
Then save the file and run:
/usr/bin/check_mk_agent | less
search for <<<fileinfo
and you should see the list of log files matching the pattern.
That is what is passed to the check_mk server. On the server
side, you have to configure WATO to tell it what to do with the
list of files....create a rule for the size, number, whatever.
You can add more lines to fileinfo.cfg to match other files and
configure rules in WATO to handle them.
On 06/30/2015 01:15 PM, Seth Williams > > > > > wrote:
Thanks Jam, I am a beginner here and using OMD so
some of these instructions I don’t really understand. So, it
seems I cannot do this from within OMD, I need to go to the
server at which I want to check the file count and modify a
file ** /etc/check_mk/fileinfo.cfg.
** Is
this correct? This is unlike other checks where I can
configure this directly within OMD.
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
[http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en](http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en)
Well meet in Munich for the 2nd Check_MK Conference!
Book your place now and be part of it.
October 18th-20th, 2015
[http://mathias-kettner.com/conference](http://mathias-kettner.com/conference)
The error lies in step 2 because you should create a rule in “file grouping patterns”, not “filesystem grouping patterns” - you want to count files, not summarize filesystems
HTH,
Marcel
Seth Williams sethwill@gmail.com schrieb am Di., 7. Juli 2015 um 21:47 Uhr: > > Ok, I did this and it shows 0 .js files even though there are several .js files in the path. Here’s what I did:
Create the fileinfo.cfg with the /my/path/*.js
I created this on the system I’m monitoring.
Verified that it finds the files by running /usr/bin/check_mk_agent | less
Create a rule in WATO for file grouping pattern /my/path/*.js
Host and Service Parameters → Parameters for Inventorized Checks → Filesystem Grouping Patterns. I gave it a name like ‘NAME’ and a value like /my/path/*.js
Create a rule in WATO for size, age and count using the file group above
Host and Service Parameters → Manual Checks → Size, age and count of file groups.
I used the file group ‘NAME’ above and have tried setting max counts, or age, etc.
Bottom line is that in the ‘Services’ the check shows up but with count of 0 .js files when there are several in /my/path/
for filegroups you do not need extra configuration on agent side. You just configure fileinfo.cfg as usual, assumed you want to monitor all *.log in folder /var/log/:
fileinfo.cfg on agent side with this content:
##########
/var/log/*.log
##########
…this would result in 6 discovered fileinfo services if you have 6 logfiles matching, but not if you proceed and do the following:
create a rule in WATO → manual checks (or parameters for discovered services, I don’t know) → file grouping patterns:
** group name: <chose_a_name_suitable>
** pattern: /var/log/*.log
create a rule in WATO → manual checks (or parameters for discovered services, I don’t know) → size, age and count of file groups:
** group name: <same_as_in_previous_rule>
** params as needed
…and the result (after an inventory/discovery) will be a file group service instead of the mentioned 6 fileinfo services.
HTH,
Marcel
Seth Williams sethwill@gmail.com schrieb am Mi., 1. Juli 2015 um 21:38 Uhr:
Ok Jam, I see that this works for specific files. Now I have a check for every file in the folder I specified. However, I want to do something similar but with file groups. How do I create a file group on the client? I want to do the check for the # of files matching an extension in a folder. Critical if > 50 Warning if > 25 or something like that.
Is there a similar file ‘filegroup.cfg’ or something similar that I need to set up on the client? Can you give me the example syntax, like you did for fileinfo.cfg?
There is not much info there, just:
---
For Linux, FREEBSD, MACOSX and Solaris the configuration is done via
fileinfo.cfg located in the $MK_CONFDIR (usually /etc/check_mk/fileinfo.cfg ).
To add files to the check, simply add one path pattern /tmp/*.log
per line. Wildcards or patterns can be used as usual on the console.
---
So, for example, on the monitored linux host, as root, (if you are
using omd or check_mk raw)
add the following line to /etc/check_mk/fileinfo.cfg (if it
doesn’t exist, create it):
/var/log/*log
Then save the file and run:
/usr/bin/check_mk_agent | less
search for <<<fileinfo
and you should see the list of log files matching the pattern.
That is what is passed to the check_mk server. On the server
side, you have to configure WATO to tell it what to do with the
list of files....create a rule for the size, number, whatever.
You can add more lines to fileinfo.cfg to match other files and
configure rules in WATO to handle them.
On 06/30/2015 01:15 PM, Seth Williams > > > > > > wrote:
Thanks Jam, I am a beginner here and using OMD so
some of these instructions I don’t really understand. So, it
seems I cannot do this from within OMD, I need to go to the
server at which I want to check the file count and modify a
file ** /etc/check_mk/fileinfo.cfg.
** Is
this correct? This is unlike other checks where I can
configure this directly within OMD.
On Thu, Jun 25, 2015 at 6:18 PM Jam Mulch <spammagnet10@gmail.com > > > > > > > > wrote:
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
[http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en](http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en)
Well meet in Munich for the 2nd Check_MK Conference!
Book your place now and be part of it.
October 18th-20th, 2015
[http://mathias-kettner.com/conference](http://mathias-kettner.com/conference)