Page 1 of 1

Difficulty configuring CIFS monitoring

Posted: Wed Feb 27, 2019 7:06 pm
by dlukinski
Hello Nagios support

We are trying to monitor filesize for the file, located on the CIFS volume

- with this kind of path:
\\XYZ-cifs01-biz\XYZ-FS-PROD\XYZ\In Production\Apps\Service Management Reporting\Asset Analytics\

------------------------------------------------------------------------------------------------------------------------

CIFS Wizard does not work:

check_mountpoint!\XYZ-FS-PROD\XYZ\In Production\Apps\Service Management Reporting\Asset Analytics -i

Usage: check_mountpoints.sh [-m FILE] $mountpoint [$mountpoint2 ...]
Usage: check_mountpoints.sh -h,--help
Options:
-m FILE Use this mtab instead (default: /proc/mounts)
-f FILE Use this fstab instead (default: /etc/fstab)
-N NUMBER FS Field number in fstab (default: 3)
-M NUMBER Mount Field number in fstab (default: 2)
-T SECONDS Responsetime at which an NFS is declared as staled (default: 3)
-L Allow softlinks to be accepted instead of mount points
-i Ignore fstab. Do not fail just because mount is not in fstab. (default: unset)
-a Autoselect mounts from fstab (default: unset)
-A Autoselect from fstab. Return OK if no mounts found. (default: unset)
-w Writetest. Touch file $mountpoint/.mount_test_from_$(hostname) (default: unset)
MOUNTPOINTS list of mountpoints to check. Ignored when -a is given

-------------------------------------------------------------------------------------------------------

What is best way to make this happen?

Thanks,
Dimitri

Re: Difficulty configuring CIFS monitoring

Posted: Thu Feb 28, 2019 3:18 pm
by tgriep
Try changing the path from backslashes to forward slashes like this for the check and add single quotes because of the space in the name.

Code: Select all

'/XYZ-FS-PROD/XYZ/In Production/Apps/Service Management Reporting/Asset Analytics/'
Also, is the CIF mounted on the nagios system?
The plugin checks to see if the CIF is mounted in the local system.

If it is a remote server, you may have to find another plugin.

Re: Difficulty configuring CIFS monitoring

Posted: Mon Mar 04, 2019 10:36 am
by dlukinski
tgriep wrote:Try changing the path from backslashes to forward slashes like this for the check and add single quotes because of the space in the name.

Code: Select all

'/XYZ-FS-PROD/XYZ/In Production/Apps/Service Management Reporting/Asset Analytics/'
Also, is the CIF mounted on the nagios system?
The plugin checks to see if the CIF is mounted in the local system.

If it is a remote server, you may have to find another plugin.
So if we want to monitor CIFS/NFS content, it should always be mounted to Nagios locally?

Re: Difficulty configuring CIFS monitoring

Posted: Mon Mar 04, 2019 2:30 pm
by tgriep
To use that plugin, yes it will have to be mounted on the Nagios server.
Also, that plugin does not look for a size of a file either so that plugin will not works for that either.

Re: Difficulty configuring CIFS monitoring

Posted: Mon Mar 04, 2019 3:00 pm
by dlukinski
tgriep wrote:To use that plugin, yes it will have to be mounted on the Nagios server.
Also, that plugin does not look for a size of a file either so that plugin will not works for that either.
If it does not, how could I check for File sizes and counts on CIFS / NFS shares with Nagios?

Re: Difficulty configuring CIFS monitoring

Posted: Mon Mar 04, 2019 3:48 pm
by tgriep
I found some plugins on the Exchange site that may work for you. Take a look at them to see if they will.
https://exchange.nagios.org/directory/P ... es/details
https://exchange.nagios.org/directory/P ... le/details

There might be others but those 2 look closest to what you are looking for.

Re: Difficulty configuring CIFS monitoring

Posted: Mon Mar 04, 2019 4:18 pm
by dlukinski
tgriep wrote:I found some plugins on the Exchange site that may work for you. Take a look at them to see if they will.
https://exchange.nagios.org/directory/P ... es/details
https://exchange.nagios.org/directory/P ... le/details

There might be others but those 2 look closest to what you are looking for.
Would this be a Nagios-side plugin?
- so that we still mount CIFS and use the plugin against the mounted volume?

Re: Difficulty configuring CIFS monitoring

Posted: Mon Mar 04, 2019 4:24 pm
by tgriep
I did a very quick look them and the Plugins run on the Nagios server but they do not have to be mounted on the Nagios server.