NSClient++ Help (#1) - NSClient Log File Size (#952) - Message List
I'm using Build 153 right now, 64bit, and I'm having some problems configuring NSClient. I would like to be able to restrict the size of the log file that NSClient writes to, and I've seen other tickets of people having similar situations and there being a max size variable that allows the to put the maximum desired size for these log files. However, I can't find this in the .ini in the install directory which is strange because I'm using the same version as the person who had that problem. Could someone help me with this please?
Thanks
-
Message #2517
clean ini file:
nscp settings --generate settings --add-defaults
Adds (among other things):
; Configure log file properties. [/settings/log/file] ; MAXIMUM FILE SIZE - When file size reaches this it will be truncated to 50% if set to 0 (default) truncation will be disabled max size = 0
Which I think is what you are looking for.
But why is the log growing? Also you might want to consider trying check_nscp as it can in some cases "remove the need for logging"...
Michael Medin
mickem04/12/12 22:58:47 (13 months ago)-
Message #2518
Where do I type
nscp settings --generate settings --add-defaults
into? Command prompt? Sorry I'm new to this, new IT technician working with NSCLient++ and Nagios for the first time.
Thanks for your help so far though
peterb904/12/12 23:07:01 (13 months ago)-
Message #2519
Command prompt and folder of NSClient++.
But it is not really required if you are using "new ini files" (ie. nsclient.ini) you can just add the chunk I pasted...
nscp is the program... you can run:
nscp help
To get help on how to use it.
Michael Medin
mickem04/12/12 23:11:17 (13 months ago)-
Message #2520
Awesome thank you so much. Would doing this
; Configure log file properties. [/settings/log/file] ; MAXIMUM FILE SIZE - When file size reaches this it will be truncated to 50% if set to 0 (default) truncation will be disabled MAXIMUM FILE SIZE = 2048 max size = 0
for MAXIMUM FILE SIZE be correct syntax? I don't want the log files to get over 2 megabytes.
peterb904/12/12 23:16:27 (13 months ago)-
Message #2522
Uhmm...no...
[/settings/log/file] ; MAXIMUM FILE SIZE - When file size reaches this it will be truncated to 50% if set to 0 (default) truncation will be disabled max size = 2048000
First off 2048 would mean 2048 bytes which is not much... so you probably want 2048000 or some such... Secondly the key name is max size (default value was 0 so thats what was in the ini files)...
Michael Medin
mickem04/12/12 23:19:36 (13 months ago)
-
-
-
-








