Hi friends. I am getting version from .exe file via check_nrpe.
My command is following
check_nrpe -H IP_ADDRESS -c check_file -a path=path/to/file pattern=file.exe "filter= (version = '1.1') or (version = '1.0')" "detail-syntax=%(filename): %(version)" "crit=version = '1.0' " "ok=version = '1.1' "
Well this is ok for me but if exe file version is 1.0 then output is
CRITICAL: 1/1 files (file.exe: 1.0)
but if exe file version is 1.1 output is
OK: All 1 files are ok
Why i don´t get same output??? In case OK: i don`t get version...but
Could be possible get one of these ouputs
CRITICAL: File.exe is version 1.0
OK: File.exe is version 1.1
Thanks and regards.
I forgot Nsclient++ version
0.4.3.143
Check_file command
Re: Check_file command
You could try altering the ok-syntax or detail-syntax of the command:
https://docs.nsclient.org/reference/win ... ail-syntax
https://docs.nsclient.org/reference/win ... _ok-syntax
This assumes you're using the check_files (plural) command for CheckDisk though. I don't recognize check_file:
https://docs.nsclient.org/reference/win ... heck_files
https://docs.nsclient.org/reference/win ... ail-syntax
https://docs.nsclient.org/reference/win ... _ok-syntax
This assumes you're using the check_files (plural) command for CheckDisk though. I don't recognize check_file:
https://docs.nsclient.org/reference/win ... heck_files
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Posts: 60
- Joined: Fri Feb 26, 2016 7:15 am
Re: Check_file command
Hi friends...
Yes check_files from CheckDisk....Sorry for my mistake...
At command
check_nrpe -H IP_ADDRESS -c check_file -a path=path/to/file pattern=file.exe "filter= (version = '1.1') or (version = '1.0')" "detail-syntax=%(filename): %(version)" "crit=version = '1.0' " "ok=version = '1.1' "
I am using "detail-syntax=%(filename): %(version)" so i will try ok-syntax and i will tell you
Yes check_files from CheckDisk....Sorry for my mistake...
At command
check_nrpe -H IP_ADDRESS -c check_file -a path=path/to/file pattern=file.exe "filter= (version = '1.1') or (version = '1.0')" "detail-syntax=%(filename): %(version)" "crit=version = '1.0' " "ok=version = '1.1' "
I am using "detail-syntax=%(filename): %(version)" so i will try ok-syntax and i will tell you
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Check_file command
Fantastic. Let us know!rambertnala wrote: i will try ok-syntax and i will tell you