Check_file with path containing accented letters


#1

Hello everyone.

I need to check the presence of files in a directory which name contains accented letters. It fails to find them with File was NOT found! Invalid file specified: D:/DepotInterface/Reintégrer/ message in the log.

I have the same result when running the command in the NSClient web UI.

When I clone the ‘Reintégrer’ directory with the ‘Reintegrer’ name, check works OK, it returns the correct number of files found.

Following advice found here on a similar problem, I set encoding = utf8, but that doesn’t solve the problem.

Any idea?

Thanks in advance.

Config :

  • NSClient++ 0.5.2.35-x64 on Windows 2008 R2
  • Centreon 2.7 on CentOS 6.1
  • command used : check_files “path=D:/DepotInterface/Reintégrer/” “max-depth=1” “filter=creation < 10s” “top-syntax=%(status): %(count) fichiers” “warn=count > 1” “critical=count > 1”

#2

Up ?


#3

fichier ou service, je ne m’en suis tiré qu’avec des “filter” et “description like …” de chaque côté du caractère qui pose problème.

(commande maison basée sur la commande standard)

define command{ command_name check_nrpe_service_desc command_line $USER1$/check_nrpe -t 60 -H $HOSTADDRESS$ -c check_service -a filter="$ARG1$"
top-syntax=’${list}’
detail-syntax=’"${desc}" ${state} ${}’ }

(puis mise en œuvre)

define service{ use generic-service host_name MYHOST service_description Hyper-V - gestion des images check_command check_nrpe_service_desc!desc like ‘Service de gestion d’ and desc like ‘images Microsoft Hyper-V’ }

sois créatif :wink: !


#4

Merci jmluce ! Je vais essayer de comprendre ta suggestion pour l’appliquer à mon cas. Pour info, j’ai ouvert un incident