Schedules and multiple NSCA targets


#1

I’ve been trying to get a server to report to two Nagios servers through NSCA. Everything works fine with one but I can’t seem to figure out the correct NSClient configuration to add the second NSCA target.

I found an earlier related thread http://nsclient.org/nscp/discussion/topic/910 and tried to use that as the starting point which means I added these config lines:

  
[/settings/NSCA/client/targets/server1]  
address=192.168.1.2  

[/settings/NSCA/client/targets/server2]  
address=192.168.3.4  

(plus encryption and password entries for each)  

and added multiple scheduled jobs like this:

  
[/settings/scheduler/schedules/cpu1]  
alias=CPU Load  
command=alias_cpu  
target=server1  

[/settings/scheduler/schedules/cpu2]  
alias=CPU Load  
command=alias_cpu  
target=server2  

I tested this configuration and it looks like NSCP ignores the cpu1 job completely, probably because both jobs share the same alias.
Since NSCP seems to pick the reported Service Description from the alias and both NSCA targets should get the same result, I can’t really give those jobs different aliases either.

I noticed this entry in the changelog file:

  
2012-10-15 MickeM  
 * Added support for lists in targets/destination (passive checks/channels)  

I assume this means I could solve the problem by just using a single scheduled job and entering multiple targets for it?
If that’s what it means then what is the correct syntax for these kind of lists?

Allowed hosts seems to use a comma separated list so I tried this:

  
[/settings/scheduler/schedules/cpu]  
alias=CPU Load  
command=alias_cpu  
target=server1,server2  

But it didn’t seem to work.

So, what is the correct way to solve this?

I’m using version 0.4.1.101.


#2

It is what it should mean, but I dont recall the details off the top of my head. In the pressentation from last OSMC (see the wiki) there are example of it though.

Buuut that is real-time not scheduled…

I’ll try to look into it over the weekend, but my backlog is rather long currently so cant promise anything…

// Michael Medin


#3

Was this ever resolved? I have a similar problem with multiple targets involving NRDP.