NSCA issues

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
hau361994
Posts: 10
Joined: Sun Apr 23, 2017 12:22 pm

NSCA issues

Post 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!
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

Post 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!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: NSCA issues

Post 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
hau361994
Posts: 10
Joined: Sun Apr 23, 2017 12:22 pm

Re: NSCA issues

Post by hau361994 »

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

Post by hau361994 »

Can you help me?
Thanks.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NSCA issues

Post 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
}
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked