NSCA issues

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

NSCA issues

Postby hau361994 » Fri May 19, 2017 11:00 am

MOD EDIT: split from viewtopic.php?t=43863&start=9999#bottom

Hi,
I have one Nagios-Server IP:192.168.134.139
one Nagios-Distributed IP:192.168.134.142
I have installed on both servera NSCA plugins.
But When I run the command, the error:
1. On Nagios-Server: /usr/local/nagios/bin/nsca –c /usr/local/nagios/etc/nsca.cfg :
Incorrect command line arguments supplied
2. On Nagios-Distributed: /usr/local/nagios/libexec/send_nsca -H 192.168.134.139 -p 5667 -c /usr/local/nagios/etc/send_nsca.cfg < /tmp/nsca_test :
0 data packet(s) sent to host successfully

I use the guide from the following link :http://nagios.sourceforge.net/download/contrib/documentation/misc/NSCA_Setup.pdf http://sites.box293.com/nagios/guides/n ... core-4-0-x

Please help me fix the error.Thanks!
Last edited by dwhitfield on Fri May 19, 2017 11:23 am, edited 2 times in total.
Reason: new topics should be a new thread
hau361994
 
Posts: 10
Joined: Sun Apr 23, 2017 12:22 pm

NSCA issue

Postby hau361994 » Fri May 19, 2017 11:17 am

Hi,
I have one Nagios-Server IP:192.168.134.139 (I am using Nagios Core)
one Nagios-Distributed IP:192.168.134.142
I have installed on both server NSCA plugins.
But When I run the command, the error:
1. On Nagios-Server: /usr/local/nagios/bin/nsca –c /usr/local/nagios/etc/nsca.cfg :
Incorrect command line arguments supplied
2. On Nagios-Distributed: /usr/local/nagios/libexec/send_nsca -H 192.168.134.139 -p 5667 -c /usr/local/nagios/etc/send_nsca.cfg < /tmp/nsca_test :
0 data packet(s) sent to host successfully

I use the guide from the following link :http://nagios.sourceforge.net/download/contrib/documentation/misc/NSCA_Setup.pdf http://sites.box293.com/nagios/guides/n ... core-4-0-x

Please help me fix the error.Thanks!
hau361994
 
Posts: 10
Joined: Sun Apr 23, 2017 12:22 pm

Re: NSCA issues

Postby ssax » Fri May 19, 2017 2:35 pm

Did you create the xinetd.d file? Did you restart xinetd?

Code: Select all
service xinetd restart


These are the service settings:

Type nano /etc/xinetd.d/nsca and press Enter
You need to allow what hosts can submit results
This can be an IP Address:
10.25.254.16
It it could be a Subnet:
10.25.0.0/16
In my scenario I'm allowing the localhost AND a subnet
Change:
only_from = 127.0.0.1
To:
only_from = 127.0.0.1 10.25.0.0/16
Press Ctrl + x
Type Y
Press Enter to save changes


Taken from here:

http://sites.box293.com/nagios/guides/nsca/server/centos-6-5-and-nagios-core-4-0-x
Be sure to check out our Knowledgebase for helpful articles and solutions!
ssax
Dreams In Code
 
Posts: 2973
Joined: Wed Feb 11, 2015 12:54 pm

Re: NSCA issues

Postby hau361994 » Fri May 19, 2017 9:54 pm

Hi,
I have created the file and restart xinetd .
But still the error as above.
do you know why?
hau361994
 
Posts: 10
Joined: Sun Apr 23, 2017 12:22 pm

Re: NSCA issues

Postby hau361994 » Sat May 20, 2017 4:41 am

Can you help me?
Thanks.
hau361994
 
Posts: 10
Joined: Sun Apr 23, 2017 12:22 pm

Re: NSCA issues

Postby tgriep » Mon May 22, 2017 12:39 pm

What version of NSCA did you install on the server?
Try verifying your /etc/xinetd.d/nsca config file to the example below and see if the settings are correct.
Code: Select all
# default: on
# description: NSCA (Nagios Service Check Acceptor)
service nsca
{
        flags           = REUSE
        socket_type     = stream       
        wait            = no
        user            = nagios
        group           = nagios
        server          = /usr/local/nagios/bin/nsca
        server_args     = -c /usr/local/nagios/etc/nsca.cfg --inetd
        log_on_failure  += USERID
        disable         = no
        per_source      = 10
        instances       = 10
        only_from       = 127.0.0.1 192.168.5.0/24
}
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 6164
Joined: Thu Oct 30, 2014 9:02 am


Return to Nagios Core

Who is online

Users browsing this forum: Fess [Nagios Bot] and 6 guests