Nagios NSCA

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
srikanthjonnada
Posts: 4
Joined: Thu Jun 20, 2013 6:47 pm

Nagios NSCA

Post by srikanthjonnada »

I have been using NSCA for sending passive checks from Client Nagios to Master Nagios. I see that NSCA establishes a TCP connection from Client to Master for transferring service check information and closes the connection once it is done with transferring the information. Where can i see this functionality programmed among NSCA files? Can i modify the NSCA files to make the TCP connection stay up forever instead of closing the connection after transferring information is done? If yes, could you please guide me through the process.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios NSCA

Post by slansing »

I'm not sure you would want to do this, typically an open socket like that would be labeled as a vulnerability and could cause conflicting once a new passive result is submitted, especially on the nagios server where you could be receiving multiple results from different NSCA clients on the same port. What would be the end goal here and for what reason?
srikanthjonnada
Posts: 4
Joined: Thu Jun 20, 2013 6:47 pm

Re: Nagios NSCA

Post by srikanthjonnada »

Thanks alot for your reply Slansing. My end goal is to create or modify configuration files on Client Nagios remotely from Master Nagios, i thought of implementing a TCP connection which could stay forever and manage the config files through a SSH session.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios NSCA

Post by slansing »

I suppose you could try this, though it would take a lot of work and trial and error and keeping a connection over 5667 open to one system would cause confliction beyond the shadow of a doubt. I would recommend using a tool like Puppet to push the configuration changes.
srikanthjonnada
Posts: 4
Joined: Thu Jun 20, 2013 6:47 pm

Re: Nagios NSCA

Post by srikanthjonnada »

Sure, certainly i would try that, seems like a promising solution. Just eager to know, I know that the NSCA Client is requesting the TCP connection, but when i looked into send_nsca file i do not find any code related to TCP connection request, if not send_nsca who is requesting the TCP connection from NSCA Client?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios NSCA

Post by slansing »

Nothing is requesting the connection to the client, NSCA sends checks passively so the client is what initiates the connection to wherever the NSCA server IP is pointed. Does this answer your question?
srikanthjonnada
Posts: 4
Joined: Thu Jun 20, 2013 6:47 pm

Re: Nagios NSCA

Post by srikanthjonnada »

Thanks for your reply Slansing, this is what i am looking at, we know that client nagios is initiating a TCP connection to Master Nagios through NSCA but what part of NSCA on client nagios is initiating the connection? We found an answer to this, 'send_nsca.c' is doing this.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios NSCA

Post by abrist »

Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked