NSClient++ Help (#1) - need help with scheduled monitors (#929) - Message List
Hello. I'm not sure if I am doing something wrong in my config, or if there may be an unexpected feature in nscp.
This is my config for the scheduler.
[/modules] CheckDisk = 1 CheckHelpers = 1 CheckSystem = 1 Scheduler = 1 [/settings/NSCA/client] hostname = server1 [/settings/NSCA/client/targets/default] host = 1.1.1.1 encryption = aes password = Password [/settings/scheduler/schedules/Memory Usage] alias = Memory Usage channel = NSCA command = CheckMEM MaxWarn=90% MaxCrit=95% ShowAll=long type=physical interval = 5m report = all [/settings/scheduler/schedules/Disk Usage] alias = Disk Usage channel = NSCA command = CheckDriveSize ShowAll=long MinWarnFree=10% MinCritFree=5% Drive=c:\\ interval = 5m report = all [/settings/scheduler/schedules/w3svc Service] alias = w3svc Service channel = NSCA command = CheckServiceState ShowAll=long w3svc interval = 5m report = all
When I run this in nscp test, I get the following.
d ..\..\..\trunk\service\NSClient++.cpp:699 booting::loading plugins
d ..\..\..\trunk\service\NSClient++.cpp:404 Found: CheckDisk
d ..\..\..\trunk\service\NSClient++.cpp:404 Found: CheckHelpers
d ..\..\..\trunk\service\NSClient++.cpp:404 Found: CheckSystem
d ..\..\..\trunk\service\NSClient++.cpp:404 Found: Scheduler
d ..\..\..\trunk\service\NSClient++.cpp:710 Processing plugin: CheckDisk.dll
d ..\..\..\trunk\service\NSClient++.cpp:1034 addPlugin(C:/Program Files/NSClient++//modules/CheckDisk.dll as )
d ..\..\..\trunk\service\NSClient++.cpp:710 Processing plugin: CheckHelpers.dll
d ..\..\..\trunk\service\NSClient++.cpp:1034 addPlugin(C:/Program Files/NSClient++//modules/CheckHelpers.dll as )
d ..\..\..\trunk\service\NSClient++.cpp:710 Processing plugin: CheckSystem.dll
d ..\..\..\trunk\service\NSClient++.cpp:1034 addPlugin(C:/Program Files/NSClient++//modules/CheckSystem.dll as )
d ..\..\..\trunk\service\NSClient++.cpp:710 Processing plugin: Scheduler.dll
d ..\..\..\trunk\service\NSClient++.cpp:1034 addPlugin(C:/Program Files/NSClient++//modules/Scheduler.dll as )
d ..\..\..\trunk\service\NSClient++.cpp:1010 Loading plugin: CheckDisk
d ..\..\..\trunk\service\NSClient++.cpp:1010 Loading plugin: Helper function
d ..\..\..\trunk\service\NSClient++.cpp:1010 Loading plugin: CheckSystem
d ..\..\..\trunk\service\NSClient++.cpp:1010 Loading plugin: Scheduler
d ude\settings/settings_interface_impl.hpp:391 Get sections for: /settings/scheduler/schedules
d ..\trunk\modules\Scheduler\Scheduler.cpp:64 Adding scheduled item: Disk Usage[0] = {alias: Disk Usage, command: CheckDriveSize, channel: NSCA, target_id: , duration: 300}
d ..\trunk\modules\Scheduler\Scheduler.cpp:64 Adding scheduled item: Memory Usage[0] = {alias: Memory Usage, command: CheckMEM, channel: NSCA, target_id: , duration: 300}
d ..\trunk\modules\Scheduler\Scheduler.cpp:64 Adding scheduled item: default[0] = {alias: default, command: , channel: NSCA, target_id: , duration: 300}
d ..\trunk\modules\Scheduler\Scheduler.cpp:64 Adding scheduled item: w3svc Service[0] = {alias: w3svc Service, command: CheckServiceState, channel: NSCA, target_id: , duration: 300}
d ..\trunk\modules\Scheduler\Scheduler.cpp:79 Thread count: 5
d ..\..\..\trunk\service\NSClient++.cpp:767 NSClient++ - 0,4,0,144 2012-03-15 Started!
? rce\nscp\trunk\service\simple_client.hpp:33 Enter command to inject or exit to terminate...
d unk\modules\CheckSystem\PDHCollector.cpp:91 Loading counters...
d unk\modules\CheckSystem\PDHCollector.cpp:94 Loading counter: cpu = \238(_total)\6
d unk\modules\CheckSystem\PDHCollector.cpp:94 Loading counter: memory commit bytes = \4\26
d unk\modules\CheckSystem\PDHCollector.cpp:94 Loading counter: memory commit limit = \4\30
d unk\modules\CheckSystem\PDHCollector.cpp:94 Loading counter: uptime = \2\674
NOT FOUND
d ..\..\..\trunk\service\NSClient++.cpp:1128 Injecting: ...
e ..\..\..\trunk\service\NSClient++.cpp:1148 No handler for command: avalible commands: commands {, check_ok, checkalwayscritical, checkalwaysok, checkalwayswarning, checkcounter, checkcpu, checkcritical, checkdrivesize, checkfile2, checkfiles, checkfilesize, checkmem, checkmultiple, checkok, ch
eckprocstate, checkservicestate, checksingleregentry, checkuptime, checkversion, checkwarning, listcounterinstances}, plugins {, 0, 1, 2}
e k\include\nscapi\nscapi_core_wrapper.cpp:181 No handler for command ''.
e ..\trunk\modules\Scheduler\Scheduler.cpp:122 Command was not found:
e ..\..\..\trunk\service\NSClient++.cpp:1416 No one listens for events from: NSCA (NSCA)
d ..\..\..\trunk\service\NSClient++.cpp:1128 Injecting: checkdrivesize...
d ..\..\..\trunk\service\NSClient++.cpp:1152 Result checkdrivesize: WARNING
e ..\..\..\trunk\service\NSClient++.cpp:1416 No one listens for events from: NSCA (NSCA)
d ..\..\..\trunk\service\NSClient++.cpp:1128 Injecting: checkservicestate...
d ..\..\..\trunk\service\NSClient++.cpp:1152 Result checkservicestate: OK
e ..\..\..\trunk\service\NSClient++.cpp:1416 No one listens for events from: NSCA (NSCA)
d ..\..\..\trunk\service\NSClient++.cpp:1128 Injecting: checkmem...
d ..\..\..\trunk\service\NSClient++.cpp:1152 Result checkmem: OK
e ..\..\..\trunk\service\NSClient++.cpp:1416 No one listens for events from: NSCA (NSCA)
I'm specifically interested in the line.
d ..\trunk\modules\Scheduler\Scheduler.cpp:64 Adding scheduled item: default[0] = {alias: default, command: , channel: NSCA, target_id: , duration: 300}
I believe it is leading to this error.
NOT FOUND
d ..\..\..\trunk\service\NSClient++.cpp:1128 Injecting: ...
e ..\..\..\trunk\service\NSClient++.cpp:1148 No handler for command: avalible commands: commands {, check_ok, checkalwayscritical, checkalwaysok, checkalwayswarning, checkcounter, checkcpu, checkcritical, checkdrivesize, checkfile2, checkfiles, checkfilesize, checkmem, checkmultiple, checkok, ch
eckprocstate, checkservicestate, checksingleregentry, checkuptime, checkversion, checkwarning, listcounterinstances}, plugins {, 0, 1, 2}
e k\include\nscapi\nscapi_core_wrapper.cpp:181 No handler for command ''.
e ..\trunk\modules\Scheduler\Scheduler.cpp:122 Command was not found:
Am I doing something wrong in my config file, or does this "default" schedule, with a blank command, get inserted anytime you enable the scheduler?
Thanks.
mikep
-
Message #2445
Schedules should only inherit "undefined" variables from default. Meaning if you dont override the command you might get one from default so that is not a problem really..
Also default is defined "as a template" so should never be executed (you can also define things as a template by setting a flag BTW).
In your case I would probably change it look like so:
[/settings/scheduler/schedules/default] channel = NSCA interval = 5m report = all [/settings/scheduler/schedules/Memory Usage] alias = Memory Usage command = CheckMEM MaxWarn=90% MaxCrit=95% ShowAll=long type=physical [/settings/scheduler/schedules/Disk Usage] alias = Disk Usage command = CheckDriveSize ShowAll=long MinWarnFree=10% MinCritFree=5% Drive=c:\\ [/settings/scheduler/schedules/w3svc Service] alias = w3svc Service command = CheckServiceState ShowAll=long w3svc
Mainly to save myself some typing but both should work. I shall verify this over the weekend to make sure it works as expected.
Michael Medin
mickem03/16/12 11:24:10 (14 months ago) -
Message #2448
Seems to have been a bug (which I have fixed in the next RC out in a bit)
Michael Medin
mickem03/18/12 22:20:04 (14 months ago)








