mickem / nscp

NSClient++
http://nsclient.org
GNU General Public License v2.0
233 stars 91 forks source link

NPRE check_files with latin characters in folder name #827

Open JMelek opened 4 months ago

JMelek commented 4 months ago

Hello everyone,

I need to monitor a folder in the Windows and it has a "latin character" in her name. I know that this is not a good practice and a wrong ideia, but I can not to change her name . In the NRPE Server I already tryed to use "encoding = utf8 ", and too commented this line, both without success.

Which argument, option, configuration I need to change for perform this query?

I searched in the documentation, forums, internet and do not found anything about this.

In the Windows, using shell "nscp test"

check_files path=C:\\SAR\\OpenRoad\ SAR\\Server\ Nível\ 2\\log pattern=*.log detail-syntax=%(filename): show-all
E       disk Invalid file specified: C:\SAR\OpenRoad SAR\Server N¡vel 2\log

Details

Additional Details

NSClient++ log:

2024-02-21 09:40:24: error:c:\source\0.5.2\modules\CheckDisk\file_finder.cpp:107: Invalid file specified: C:\SAR\OpenRoad SAR\Server Nível 2\log
2024-02-21 09:40:24: debug:c:\source\0.5.2\modules\CheckDisk\file_finder.cpp:112: Found a file won't do recursive scan: C:\SAR\OpenRoad SAR\Server Nível 2\log
2024-02-21 09:40:24: debug:c:\source\0.5.2\modules\CheckDisk\file_finder.cpp:112: Path is: C:\SAR\OpenRoad SAR\Server Nível 2
2024-02-21 09:40:24: error:c:\source\0.5.2\modules\CheckDisk\file_finder.cpp:107: File was NOT found!

nsclient.ini

# 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]
;encoding = utf8

; Undocumented key
password = xxxxxx

; Undocumented key
allowed hosts = 127.0.0.1,172.31.1.50,172.25.1.160

; TIMEOUT - Timeout when reading packets on incoming sockets. If the data has not arrived within this time we will bail out.
timeout = 30

; in flight - TODO
[/settings/NRPE/server]

; Undocumented key
;;;;; insecure = true
;encoding = utf8

insecure = true
certificate key = 
certificate = ${certificate-path}/certificate.pem
ssl options = 
allowed ciphers = ADH
ssl = true
use ssl = true
allow arguments = true
verify mode = none

; PORT NUMBER - Port to use for NRPE.
port = 5666

; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters = true

; EXTENDED RESPONSE - Send more then 1 return packet to allow response to go beyond payload size (requires modified client if legacy is true this defaults to false).
extended response = true

; Undocumented key
payload length = 1024

Thanks so much.