Auteur Sujet: [RESOLU] Plugin pour vérifier la taille d'un répertoire sur un disque Windows  (Lu 1918 fois)

Hors ligne ne0ca62

  • BoyScout Froggy
  • **
  • Messages: 51
  • Karma: 0
Bonjour,

J'ai regardé sur Internet s'il existait un plugin pour vérifier la taille d'un répertoire sur un disque Windows mais je n'ai rien trouvé.
J'arrive à vérifier l'espace libre sur un disque Windows en installant NSClient sur la machine Windows à superviser et utilisant la commande : check_nt -H $HOSTADDRESS$ -v USEDDISKSPACE -s "nagios" -p 12489 -l $ARG1$ -w $ARG2$ -c $ARG3$

Par exemple pour surveiller l'espace libre sur le disque E:  check_nt -H @IP_serveur -v USEDDISKSPACE -s "nagios" -p 12489 -l E -w 90 -c 95
En revanche, si je surveille le répertoire E:\test: check_nt -H @IP_serveur -v USEDDISKSPACE -s "nagios" -p 12489 -l E:\test -w 90 -c 95. Ça ne fonctionne pas, j'ai le message d'erreur: Argument -l erroné

J'ai vu qu'il existait le plugin check_file. C'est un plugin Nagios qui utilise NRPE pour faire des vérifications sur des fichiers.
Avec l'option SIZE eq, ne, gt, lt, ge, le file size in bytes , on peut vérifier la taille d'un fichier mais je n'arrive pas à vérifier la taille d'un répertoire :(

Il y a aussi le plugin check_dir_size mais je n'arrive pas à le faire fonctionner: http://nagios-fr.org/wiki/plugins/start#check_dir_size

Est-ce que vous arrivez à vérifier la taille d'un répertoire sur un disque Windows ? Si c'est la cas, comment faites vous?

Merci pour votre aide

Flipmode
« Modifié: 07 juillet, 2009, 09:53:51 am par ne0ca62 »

Hors ligne mickael94

  • Addict Froggy
  • ***
  • Messages: 107
  • Karma: 7
    • Guest Blog
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #1 le: 30 juin, 2009, 14:29:49 pm »
Salut ,

Utilise NSCLIENT pour les répertoires voir le lien ci dessous :
http://trac.nakednuns.org/nscp/wiki/CheckDriveSize

Il faudra configurer ton fichier NSC.ici , NRPE utilise le port 5666.

Bon courage  8)
NAGIOS 3.3.1
PNP4Nagios
Debian Lenny
NRPE

Hors ligne ne0ca62

  • BoyScout Froggy
  • **
  • Messages: 51
  • Karma: 0
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #2 le: 03 juillet, 2009, 16:59:37 pm »
Bonjour,

Merci pour votre réponse et votre lien.

J'ai déjà utilisé NSClient avec NRPE et le port 5666 avec différents plugins.
Le lien que vous m'avez donné avec le plugin CheckDriveSize c'est exactement ce que je veux faire mais je ne sais pas où je peux télécharger ce plugin. Dans votre lien, on ne peut pas télécharger ce plugin :(

Où est-ce que vous avez téléchargé le plugin CheckDriveSize ?
Merci pour votre aide

Flipmode
« Modifié: 03 juillet, 2009, 17:01:30 pm par ne0ca62 »

Hors ligne mickael94

  • Addict Froggy
  • ***
  • Messages: 107
  • Karma: 7
    • Guest Blog
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #3 le: 03 juillet, 2009, 17:27:56 pm »
Salut ,

Check_drive_size est un module de nsclient ce qui veut dire que tu l'as déjà.
Pour tes tests 
./check_nrpe -H 192.168.xxx.xxx -p 5666 -c CheckDriveSize -a ShowAll MinWarnFree=10% MinCritFree=5% Drive=c:\\chemin\d'accès.

Pour les paramètres il te faut voir le lien.
 ;)
NAGIOS 3.3.1
PNP4Nagios
Debian Lenny
NRPE

Hors ligne ne0ca62

  • BoyScout Froggy
  • **
  • Messages: 51
  • Karma: 0
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #4 le: 03 juillet, 2009, 17:40:21 pm »
Merci pour ta réponse et ton aide

Tu es sur qu'il ne faut pas modifier dans le NSC.ini présent sur mon serveur Windows distant ?

Quand j'execute la commande suivante sur mon serveur Nagios:
./check_nrpe -H @IP_ServeurWindowsDistant -p 5666 -c CheckDriveSize -a ShowAll MinWarnFree=10% MinCritFree=5% Drive=c:\\chemin
J'obtiens: CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

Merci pour ton aide
« Modifié: 03 juillet, 2009, 17:46:03 pm par ne0ca62 »

Hors ligne mickael94

  • Addict Froggy
  • ***
  • Messages: 107
  • Karma: 7
    • Guest Blog
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #5 le: 03 juillet, 2009, 17:51:20 pm »
oui biensur il faut quand même que ton nsclient fonctionne correctement.
Est ce que tu peux envoyer les logs dans nsclient.
NAGIOS 3.3.1
PNP4Nagios
Debian Lenny
NRPE

Hors ligne ne0ca62

  • BoyScout Froggy
  • **
  • Messages: 51
  • Karma: 0
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #6 le: 03 juillet, 2009, 17:59:43 pm »
Mon NSClient fonctionne correctement, je vérifie déjà l'espace disque c, la ram et la CPU de mon serveur Windows.

Voici mon fichier NSC.ini:
[modules]
;# NSCLIENT++ MODULES
;# A list with DLLs to load at startup.
;  You will need to enable some of these for NSClient++ to work.
; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
; *                                                               *
; * N O T I C E ! ! ! - Y O U   H A V E   T O   E D I T   T H I S *
; *                                                               *
; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll
;CheckWMI.dll
;
; RemoteConfiguration IS AN EXTREM EARLY IDEA SO DONT USE FOR PRODUCTION ENVIROMNEMTS!
;RemoteConfiguration.dll
; NSCA Agent is a new beta module use with care!
;NSCAAgent.dll
; LUA script module used to write your own "check deamon" (sort of) early beta.
;LUAScript.dll
; Script to check external scripts and/or internal aliases, early beta.
;CheckExternalScripts.dll
; Check other hosts through NRPE extreme beta and probably a bit dangerous! :)
;NRPEClient.dll



[Settings]
;# OBFUSCATED PASSWORD
;  This is the same as the password option but here you can store the password in an obfuscated manner.
;  *NOTICE* obfuscation is *NOT* the same as encryption, someone with access to this file can still figure out the
;  password. Its just a bit harder to do it at first glance.
;obfuscated_password=Jw0KAUUdXlAAUwASDAAB
;
;# PASSWORD
;  This is the password (-s) that is required to access NSClient remotely. If you leave this blank everyone will be able to access the daemon remotly.
password=nagios
;
;# ALLOWED HOST ADDRESSES
;  This is a comma-delimited list of IP address of hosts that are allowed to talk to the all daemons.
;  If leave this blank anyone can access the deamon remotly (NSClient still requires a valid password).
;  The syntax is host or ip/mask so 192.168.0.0/24 will allow anyone on that subnet access
allowed_hosts=@IP_Serveur_Nagios
;
;# USE THIS FILE
;  Use the INI file as opposed to the registry if this is 0 and the use_reg in the registry is set to 1
;  the registry will be used instead.
use_file=1

[log]
;# LOG DEBUG
;  Set to 1 if you want debug message printed in the log file (debug messages are always printed to stdout when run with -test)
;debug=1
;
;# LOG FILE
;  The file to print log statements to
;file=NSC.log
;
;# LOG DATE MASK
;  The format to for the date/time part of the log entry written to file.
;date_mask=%Y-%m-%d %H:%M:%S


[NSClient]
;# ALLOWED HOST ADDRESSES
;  This is a comma-delimited list of IP address of hosts that are allowed to talk to NSClient deamon.
;  If you leave this blank the global version will be used instead.
;allowed_hosts=
;
;# NSCLIENT PORT NUMBER
;  This is the port the NSClientListener.dll will listen to.
;port=12489
;
;# BIND TO ADDRESS
;  Allows you to bind server to a specific local address. This has to be a dotted ip adress not a hostname.
;  Leaving this blank will bind to all avalible IP adresses.
;bind_to_address=
;
;# SOCKET TIMEOUT
;  Timeout when reading packets on incoming sockets. If the data has not arrived withint this time we will bail out.
;socket_timeout=30

[NRPE]
;# NRPE PORT NUMBER
;  This is the port the NRPEListener.dll will listen to.
;port=5666
;
;# COMMAND TIMEOUT
;  This specifies the maximum number of seconds that the NRPE daemon will allow plug-ins to finish executing before killing them off.
;command_timeout=60
;
;# COMMAND ARGUMENT PROCESSING
;  This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
;allow_arguments=1
;
;# COMMAND ALLOW NASTY META CHARS
;  This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
;allow_nasty_meta_chars=0
;
;# USE SSL SOCKET
;  This option controls if SSL should be used on the socket.
;use_ssl=1
;
;# BIND TO ADDRESS
;  Allows you to bind server to a specific local address. This has to be a dotted ip adress not a hostname.
;  Leaving this blank will bind to all avalible IP adresses.
; bind_to_address=
;
;# ALLOWED HOST ADDRESSES
;  This is a comma-delimited list of IP address of hosts that are allowed to talk to NRPE deamon.
;  If you leave this blank the global version will be used instead.
;allowed_hosts=
;
;# SCRIPT DIRECTORY
;  All files in this directory will become check commands.
;  *WARNING* This is undoubtedly dangerous so use with care!
;script_dir=scripts\
;
;# SOCKET TIMEOUT
;  Timeout when reading packets on incoming sockets. If the data has not arrived withint this time we will bail out.
;socket_timeout=30

[Check System]
;# CPU BUFFER SIZE
;  Can be anything ranging from 1s (for 1 second) to 10w for 10 weeks. Notice that a larger buffer will waste memory
;  so don't use a larger buffer then you need (ie. the longest check you do +1).
;CPUBufferSize=1h
;
;# CHECK RESOLUTION
;  The resolution to check values (currently only CPU).
;  The value is entered in 1/10:th of a second and the default is 10 (which means ones every second)
;CheckResolution=10
;
;# CHECK ALL SERVICES
;  Configure how to check services when a CheckAll is performed.
;  ...=started means services in that class *has* to be running.
;  ...=stopped means services in that class has to be stopped.
;  ...=ignored means services in this class will be ignored.
;check_all_services[SERVICE_BOOT_START]=ignored
;check_all_services[SERVICE_SYSTEM_START]=ignored
;check_all_services[SERVICE_AUTO_START]=started
;check_all_services[SERVICE_DEMAND_START]=ignored
;check_all_services[SERVICE_DISABLED]=stopped

[External Script]
;# COMMAND TIMEOUT
;  This specifies the maximum number of seconds that the NRPE daemon will allow plug-ins to finish executing before killing them off.
;command_timeout=60
;
;# COMMAND ARGUMENT PROCESSING
;  This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
;allow_arguments=0
;
;# COMMAND ALLOW NASTY META CHARS
;  This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
;allow_nasty_meta_chars=0
;
;# COMMAND ALLOW NASTY META CHARS
;  This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
;script_dir=c:\my\script\dir

[External Scripts]
;check_es_long=scripts\long.bat
;check_es_ok=scripts\ok.bat
;check_es_nok=scripts\nok.bat
;check_vbs_sample=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs

[External Alias]
;alias_cpu=checkCPU warn=80 crit=90 time=5m time=1m time=30s
;alias_disk=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
;alias_service=checkServiceState CheckAll
;alias_mem=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=physical



; [includes]
;# The order when used is "reversed" thus the last included file will be "first"
;# Included files can include other files (be carefull only do basic recursive checking)
;
; myotherfile.ini
; real.ini


[NSCA Agent]
;# CHECK INTERVALL (in seconds)
;   How often we should run the checks and submit the results.
;interval=5
;
;# ENCRYPTION METHOD
;   This option determines the method by which the send_nsca client will encrypt the packets it sends
;   to the nsca daemon. The encryption method you choose will be a balance between security and
;   performance, as strong encryption methods consume more processor resources.
;   You should evaluate your security needs when choosing an encryption method.
;
; Note: The encryption method you specify here must match the decryption method the nsca daemon uses
;       (as specified in the nsca.cfg file)!!
; Values:
; 0 = None (Do NOT use this option)
; 1 = Simple XOR  (No security, just obfuscation, but very fast)
;   2 = DES
;   3 = 3DES (Triple DES)
; 4 = CAST-128
; 6 = xTEA
; 8 = BLOWFISH
; 9 = TWOFISH
; 11 = RC2
; 14 = RIJNDAEL-128 (AES)
; 20 = SERPENT
;encryption_method=14
;
;# ENCRYPTION PASSWORD
;  This is the password/passphrase that should be used to encrypt the sent packets.
;password=
;
;# BIND TO ADDRESS
;  Allows you to bind server to a specific local address. This has to be a dotted ip adress not a hostname.
;  Leaving this blank will bind to "one" local interface.
; -- not supported as of now --
;bind_to_address=
;
;# LOCAL HOST NAME
;  The name of this host (if empty "computername" will be used.
;hostname=
;
;# NAGIOS SERVER ADDRESS
;  The address to the nagios server to submit results to.
;nsca_host=192.168.0.1
;
;# NAGIOS SERVER PORT
;  The port to the nagios server to submit results to.
;nsca_port=5667
;

;# CHECK COMMAND LIST
;  The checks to run everytime we submit results back to nagios
;  Any command(alias/key) starting with a host_ is sent as HOST_COMMAND others are sent as SERVICE_COMMANDS
;  where the alias/key is used as service name.
;
[NSCA Commands]
;my_cpu_check=checkCPU warn=80 crit=90 time=20m time=10s time=4
;my_mem_check=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=page
;my_svc_check=checkServiceState CheckAll exclude=wampmysqld exclude=MpfService
;host_check=check_ok

[NRPE Handlers]
;# COMMAND DEFINITIONS
;# Command definitions that this daemon will run.
;# Can be either NRPE syntax:
;command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
;# Or simplified syntax:
;test=c:\test.bat foo $ARG1$ bar
;check_disk1=/usr/local/nagios/libexec/check_disk -w 5 -c 10
;# Or even loopback (inject) syntax (to run internal commands)
;# This is a way to run "NSClient" commands and other internal module commands such as check eventlog etc.
;check_cpu=inject checkCPU warn=80 crit=90 5 10 15
;check_eventlog=inject CheckEventLog Application warn.require.eventType=error warn.require.eventType=warning critical.require.eventType=error critical.exclude.eventType=info truncate=1024 descriptions
;check_disk_c=inject CheckFileSize ShowAll MaxWarn=1024M MaxCrit=4096M File:WIN=c:\ATI\*.*
;# But be careful:
; dont_check=inject dont_check This will "loop forever" so be careful with the inject command...
;# Check some escapings...
; check_escape=inject CheckFileSize ShowAll MaxWarn=1024M MaxCrit=4096M "File: foo \" WIN=c:\\WINDOWS\\*.*"
;# Some real world samples
;nrpe_cpu=inject checkCPU warn=80 crit=90 5 10 15
;nrpe_ok=scripts\ok.bat
;check_multi_line=scripts\multi_line.bat*
;#check_nrpe_oralog=C:\nsclient\script\check_logfiles.exe -f C:\nsclient\script\oracle_log.log
check_nrpe_oralog=C:\nsclient\script\check_logfiles.exe -f C:\nsclient\script\$ARG1$
check_file1=C:\nsclient\script\check_file.exe --target c:\nsclient\script\ --filter "name match \.log$" --critical 1
check_file2=C:\nsclient\script\check_file.exe --target c:\nsclient\script\ --filter "name match \.lig$" --critical 1
;#check_file=C:\nsclient\script\check_file.exe --target c:\nsclient\script\ --filter "name match oracle_.o." --critical 0 --verbose
;#
;# The sample scripts
;#
;check_long=scripts\long.bat
;check_ok=scripts\ok.bat
;check_nok=scripts\xlong.bat
;check_vbs=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs
check_fichier=C:\Program Files\NSClient++\scripts\fichier.bat
check_fichier1=C:\Program Files\NSClient++\scripts\fichier1.bat

;# REMOTE NRPE PROXY COMMANDS
;  A list of commands that check other hosts.
;  Used by the NRPECLient module
[NRPE Client Handlers]
check_other=-H 192.168.0.1 -p 5666 -c remote_command -a arguments

Voici le fichier de log de mon NSClient:
2009-07-03 17:32:18: error:.\NRPEListener.cpp:368: Request arguments contained illegal metachars!
2009-07-03 17:32:18: error:.\NRPEListener.cpp:330: NRPEException: Request command contained illegal metachars!
2009-07-03 17:32:28: error:.\NRPEListener.cpp:368: Request arguments contained illegal metachars!
2009-07-03 17:32:28: error:.\NRPEListener.cpp:330: NRPEException: Request command contained illegal metachars!
2009-07-03 17:51:28: message:.\FileLogger.cpp:58: Starting to log for: NSClient++ - 0.3.2.9 2008-05-17
2009-07-03 17:51:28: error:.\SysTray.cpp:40: SysTray is not installed (or it cannot interact with the desktop) SysTray won't be loaded. Run NSClient++ SysTray install to change this.
2009-07-03 17:54:23: error:.\NRPEListener.cpp:368: Request arguments contained illegal metachars!
2009-07-03 17:54:23: error:.\NRPEListener.cpp:330: NRPEException: Request command contained illegal metachars!

Merci pour votre aide
« Modifié: 03 juillet, 2009, 18:01:28 pm par ne0ca62 »

Hors ligne mickael94

  • Addict Froggy
  • ***
  • Messages: 107
  • Karma: 7
    • Guest Blog
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #7 le: 03 juillet, 2009, 18:10:27 pm »
oki je vois étant donné que tu utilises des caractères spéciaux dans ta commandes il faut changer dans la conf NRPE le paramètres suivants :

[NRPE]
allow_nasty_meta_chars=1
NAGIOS 3.3.1
PNP4Nagios
Debian Lenny
NRPE

Hors ligne david.guenault

  • Equipe Monitoring-fr.org
  • Mentor Froggy
  • *
  • Messages: 342
  • Karma: 15
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #8 le: 05 juillet, 2009, 18:24:52 pm »
salut,
j'ai écrit le plugin check_dir_size (en fait je l'ai écrit en 2h00 .... et je n'ai pas eu le temps de le peaufiner comme je le voulais). Peut tu me dire ce qui ne fonctionne pas ?

Hors ligne ne0ca62

  • BoyScout Froggy
  • **
  • Messages: 51
  • Karma: 0
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #9 le: 06 juillet, 2009, 09:48:26 am »
Merci pour vos réponses et votre aide

En autorisant les caractères spéciaux (allow_nasty_meta_chars=1), quand je tape la commande :
./check_nrpe -H @IP_ServeurWindowsDistant -p 5666 -c CheckDriveSize -a ShowAll MinCritFree=1G Drive=c:\\nom_repertoire
J'obtiens: OK: c:\nom_repertoire: 17.3G|c:\nom_repertoire=17.32G;31548608.00;1;

Avec la commande que j'ai utilisé, je ne vérifie pas la taille de mon répertoire c:\nom_repertoire mais je vérifie juste la taille du disque c:\ :(
En fait, j'aimerais vérifier que la taille du répertoire ne dépasse pas 1Go mais je ne suis pas sur des options que j'ai utilisé.

Merci pour votre aide

Flipmode
« Modifié: 06 juillet, 2009, 13:51:15 pm par ne0ca62 »

Hors ligne david.guenault

  • Equipe Monitoring-fr.org
  • Mentor Froggy
  • *
  • Messages: 342
  • Karma: 15
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #10 le: 06 juillet, 2009, 10:45:45 am »
tu peux poster (en message privé) le contenu de ton nsclient.ini ?
merci

Hors ligne frankb

  • Modérateur Global
  • Mentor Froggy
  • *****
  • Messages: 476
  • Karma: 32
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #11 le: 06 juillet, 2009, 14:33:40 pm »
Extrait de la documentation de nsclient++ ->http://nsclient.org/nscp/wiki/CheckFileSize

CheckFileSize ShowAll MaxWarn=1024M MaxCrit=4096M File:WIN=c:\WINDOWS\*.*
WARNING: WIN: 2G (2325339822B)|WIN=2325339822;1073741824;4294967296
define command {
  command_name CheckFileSize
  command_line check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckFileSize -a ShowAll MaxWarn=$ARG1$ MaxCrit=$ARG2$ File:$ARG3$=$ARG4$
}
check_command CheckFileSize!1024M!4096M!WIN!c:\WINDOWS\*.*

à adapter selon tes besoins
--> Merci de préciser si vos problèmes sont résolus pour que l'équipe du forum puisse passer vos topics en [RESOLU].

Hors ligne ne0ca62

  • BoyScout Froggy
  • **
  • Messages: 51
  • Karma: 0
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #12 le: 06 juillet, 2009, 17:11:49 pm »
Merci pour vos réponses

J'ai utilisé CheckFileSize au lieu de CheckDriveSize .
Pour vérifier que la taille du répertoire ne dépasse pas 1Go, j'ai exécuté la commande suivante sur mon serveur Nagios :
check_nrpe -H @IP_Serveur  -p 5666 -c CheckFileSize -a ShowAll MaxCrit=1G File:Win=c:\\nom_repertoire\\sous_repertoire J'obtiens : CRITICAL: Win 1.04G > critical|'Win'=1118177603B;0;1073741824
Donc ça fonctionne correctement, la taille de mon répertoire est supérieure à 1Go donc l'état du service est CRITIQUE

Ensuite, j'utilise Centreon pour configurer ce service dans Nagios, j'ai créé une nouvelle commande :
Nom de la Commande : CheckFileSize
Ligne de Commande : $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckFileSize -a ShowAll MaxCrit=$ARG1$ File:$ARG2$=$ARG3$

Puis j'ai créé un nouveau service en utilisant la commande CheckFileSize et avec les arguments suivants: !1G!Win!c:\nom_repertoire\sous_repertoire

L'état de ce service dans l'interface Centreon est :
Information sur le status OK: Win: 0B
Données de Performance   Win: 0B'Win'=0B;0;1073741824;

Donc ça ne fonctionne pas car la taille de mon répertoire n'est pas de 0B mais elle est supérieure à 1Go

Je ne comprends pas pourquoi j'ai cette erreur alors que ça marchait quand je tapais la commande sur le serveur Nagios.

Merci pour votre aide

Flipmode
« Modifié: 06 juillet, 2009, 17:57:50 pm par ne0ca62 »

Hors ligne Romuald

  • Administrateur
  • Super Froggy
  • *
  • Messages: 1 583
  • Karma: 73
Re : Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #13 le: 06 juillet, 2009, 18:54:32 pm »
Citer
Puis j'ai créé un nouveau service en utilisant la commande CheckFileSize et avec les arguments suivants: !1G!Win!c:\nom_repertoire\sous_repertoire

essaie avec soit :

!1G!Win!"c:\nom_repertoire\sous_repertoire"

ou ça

!1G!Win!'c:\nom_repertoire\sous_repertoire'
Fronteau Romuald / Administrateur Forum


--> Merci de préciser si vos problèmes sont résolus pour que l'équipe du forum puisse passer vos topics en [RESOLU].

Hors ligne ne0ca62

  • BoyScout Froggy
  • **
  • Messages: 51
  • Karma: 0
[RESOLU] Re:Plugin pour vérifier la taille d'un répertoire sur un disque Windows
« Réponse #14 le: 07 juillet, 2009, 09:49:58 am »
Merci pour votre aide.

En fait, la bonne solution c'est : !1G!Win!"c:\\nom_repertoire\\sous_repertoire"
Mon problème est donc résolu  ;D

Encore un grand merci pour votre aide.

Flipmode
« Modifié: 07 juillet, 2009, 09:52:39 am par ne0ca62 »