Page 1 of 2

monitoreo carpetas de windows.

Posted: Tue Mar 19, 2019 2:12 pm
by fgaadmin
Good morning,

I have a server with shared folders for all the users of the company.

I wish to monitor the carp and the space available and occupied since they have size restriction.

I searched and I have not obtained information and the tests I have done in NagiosXI have not been executed.

I am attentive to your comments.

Re: monitoreo carpetas de windows.

Posted: Wed Mar 20, 2019 10:58 am
by benjaminsmith
Hi @fgaadmin,

What agent are you using to monitor windows - NSClient or NCPA?

We have a check library on our knowledge base with examples for setting up folder, file and disk checks using different agents. Please look at the documentation and let me know if you have any specific questions.

Documentation
File and Folder Checks
Disk Space Checks
How to Manage Plugins in Nagios XI

Re: monitoreo carpetas de windows.

Posted: Wed Mar 20, 2019 2:46 pm
by fgaadmin
review the documentation but I did not find the way to do with NRPE the folder monitoring.

Giving it a size limit and it appears with porcentage as in the disk check.

Re: monitoreo carpetas de windows.

Posted: Wed Mar 20, 2019 3:00 pm
by fgaadmin
example

D:/FGD/President 26% size max 5 GB warding 80% critico 90%


It is possible to have a similar folder monitoring.

Re: monitoreo carpetas de windows.

Posted: Thu Mar 21, 2019 2:52 pm
by benjaminsmith
Hello @fgaadmin,
review the documentation but I did not find the way to do with NRPE the folder monitoring.
My understanding is that you are trying to monitor Windows. Is this correct?

If so, you can only use either NCPA or NSClient++ on Windows systems.

Re: monitoreo carpetas de windows.

Posted: Tue Apr 02, 2019 1:52 pm
by fgaadmin
if I'm trying to monitorial windows.

And some particular folders that have a limit of space to store files.

for that reason I want to know if the folders of form cimilar like the disks can be monitorial of some form.

It has NRPE in windows.

Re: monitoreo carpetas de windows.

Posted: Wed Apr 03, 2019 11:36 am
by npolovenko
@fgaadmin, You just want to monitor the windows folder size through NRPE, right?
If so, please:
1. Download the VBS script from here:
https://exchange.nagios.org/directory/P ... bs/details

And place it in the following folder on the windows server.
C:\Program Files\NSClient++\scripts
Add the following command to the nsclient.ini file, in the [/settings/external scripts/scripts] section.
check_foldersize = cscript.exe //T:30 //NoLogo scripts\\check_folder_size.vbs C:\Logs 50 70
Restart the NSclient service on the windows server from the windows services menu.

On the nagios xi server run the following command to make sure the plugin is working:
/usr/local/nagios/libexec/check_nrpe -H 192.168.3.145 -c check_foldersize
Where 192.168.3.145 is the IP address of the monitored windows server.

Re: monitoreo carpetas de windows.

Posted: Wed Apr 10, 2019 11:52 am
by fgaadmin
Suggested implementation is just what I need :) . but I have a problem when I try with some folders in the permissions.
:?:
In this event, it works correctly for me.

./check_nrpe -H 192.168.30.99 -c check_foldersize -a "c:\program files\nsclient++" 50 78
WARNING:120,7 MB


But when I try on another carp of unit D, I do not fucniona.

./check_nrpe -H 192.168.30.99 -c check_foldersize -a "c:\program files" 50 78
d:\FGA\check_folder_size.vbs(31, 3) Error de Microsoft VBScript en tiempo de ejecuci▒n: Permiso denegado


I share NRPE configuration file.


# If you want to fill this file with all available options run the following command:
# nscp settings --generate --add-defaults --load-all
# If you want to activate a module and bring in all its options use:
# nscp settings --activate-module <MODULE NAME> --add-defaults
# For details run: nscp settings --help


; in flight - TODO
[/settings/default]

; Undocumented key
password =
; Undocumented key
allowed hosts = X.X.X.X/32


; in flight - TODO
[/settings/NRPE/server]
;use ssl = false
performance data = true
allow arguments = true
allow nasty characters = true
;port = 5666

; Undocumented key
verify mode = none

; Undocumented key
insecure = true

[/settings/external scripts]
allow arguments = true
allow nasty characters = true


[/settings/external scripts/scripts]

; my script
;check_foldersize = cscript.exe //T:30 //NoLogo scripts\check_folder_size.vbs d:\FGA 50 78
;check_folder_size = cscript.exe //T:30 //NoLogo scripts\\check_folder_size.vbs "$ARG1$" "$ARG2$" "$ARG3$"
;Funciona
;check_foldersize=C:\windows\System32\cscript.exe //NoLogo //T:30 "c:\program files\nsclient++\scripts\check_folder_size.vbs" "$ARG1$" 50 78
check_foldersize=C:\windows\System32\cscript.exe //NoLogo //T:30 "C:\Program Files\NSClient++\scripts\check_folder_size.vbs" "$ARG1$" "$ARG2$" "$ARG3$"

[/settings/external scripts/alias]

;check_folder_size.vbs=check_foldersize

; in flight - TODO
[/modules]

; Undocumented key
CheckExternalScripts = enabled

; Undocumented key
CheckHelpers = enabled

; Undocumented key
CheckEventLog = enabled

; Undocumented key
CheckNSCP = enabled

; Undocumented key
CheckDisk = enabled

; Undocumented key
CheckSystem = enabled

; Undocumented key
NSClientServer = enabled

; Undocumented key
NRPEServer = enabled


What I need so that you can monitor the folders of Unit D: \

Re: monitoreo carpetas de windows.

Posted: Wed Apr 10, 2019 12:25 pm
by npolovenko
@fgaadmin, Looks like the VBS script doesn't have permissions to access the folder on the drive D. I'd check the permissions on the folder in drive D and compare them to the permissions of the folder in drive C. Click on the folder, select "properties" and go to the "Security" tab.

Re: monitoreo carpetas de windows.

Posted: Wed Apr 10, 2019 4:51 pm
by fgaadmin
I find that they have the same permissions but it still does not work.

What else would you check?