Page 1 of 1

NSCA issues

Posted: Fri May 19, 2017 11:00 am
by hau361994
MOD EDIT: split from https://support.nagios.com/forum/viewto ... 999#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/ ... _Setup.pdf http://sites.box293.com/nagios/guides/n ... core-4-0-x

Please help me fix the error.Thanks!

NSCA issue

Posted: Fri May 19, 2017 11:17 am
by hau361994
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/ ... _Setup.pdf http://sites.box293.com/nagios/guides/n ... core-4-0-x

Please help me fix the error.Thanks!

Re: NSCA issues

Posted: Fri May 19, 2017 2:35 pm
by ssax
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/n ... core-4-0-x

Re: NSCA issues

Posted: Fri May 19, 2017 9:54 pm
by hau361994
Hi,
I have created the file and restart xinetd .
But still the error as above.
do you know why?

Re: NSCA issues

Posted: Sat May 20, 2017 4:41 am
by hau361994
Can you help me?
Thanks.

Re: NSCA issues

Posted: Mon May 22, 2017 12:39 pm
by tgriep
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
}