NSClient++ Help (#1) - CheckFile2 - ShowAll (#771) - Message List
First, I'm not speaking english fluently so please, tell me if you dont understand something :/
So, here is my problem. I started using NSClient some days ago and today, I have a problem when creating a check on a file.
I want NSClient to send me a critical when a file (test.dmp):
=> have a size <700mo
=> haven't been updated the day before the check
So, I created this (In the External Alias section):
This check is fully operational. I mean, it returns a "critical" when either conditions is not satisfied.
But when everything is "Ok", well, it only returns me "CheckFile Ok". The problem is that I would like NSClient returns me more details about the file who is "Ok". I would like something like the syntax part (with filename, size...) and the "Ok" state.
With some check_nt commands, there was no problem.I used the command "ShowAll " to send me information even when everything was "ok". But with check_nrpe and the command CheckFile2, I dont find a way to get information about a "Ok" state.
So my question is: is there a way to get information on a status "OK"? (because ShowAll isn't a valid command)
(Feel free to tell me if part of my message is incomprehensible)
You can look a bit into CheckFiles for that it is much improved with syntax options for showing information. One thing though all of these commands are built to check "multiple files" so you will not get what you want.
The idea is to follow up checkfiles with a checkfile (notice the lack of plural s) which will handle your scenario.
Right now if you need the size for graphing or some such I would write a script...
Michael Medinmickem04/27/11 12:28:07 (2 years ago)
Thanks for the answer.
When my command returns an error, NSClient sends me a nice message that uses the option "syntax" (my error message looks like: test.rar: 719M - Sunday, April 11, 2010, found files:1 > critical).
But I do not find a way to get this same message when there is no error. Ideally, a message that looks like "test.rar: 719M - Sunday, April 11, 2010, found files:1 > ok"
I dont want to use the size of the file for graphing.The purpose of this command is to verify that a backup file is created each day and has a normal size (sometimes he dont have)
I read that these commands are built to check more than one file but this is the only way I find to verify that my backup files are created :/
If it is not possible or if I missed something in your answer, do not hesitate to tell me x)Doji04/27/11 15:08:55 (2 years ago)