Page 1 of 1
Nagios/NSCA: Command file '/var/nagios/rw/nagios.cmd' does n
Posted: Thu Aug 20, 2015 1:41 pm
by phreedom68
I installed nagios on Centos and I also want to enable NSCA on the host. The client is already configured and is sending data (I can see it when I tail the logs). However, I'm seeing the following error message in the log by NSCA
Command file '/var/nagios/rw/nagios.cmd' does not exist, attempting to use alternate dump file '/var/nagios/rw/nsca.dump' for output
I browsed to /var/ and there was no "nagios" folder. So I created one. I also created a /rw/ folder. I restarted nagios but nagios.cmd wasn't created. I did a chown and chgrp to nagios on those folder but that didn't help.
First off, how come /var/nagios/rw/ was never created during the installation? Can someone think of a way make this work so nagios creates the nagios.cmd file (NSCA is looking for it to input data)?
Thanks
Re: Nagios/NSCA: Command file '/var/nagios/rw/nagios.cmd' do
Posted: Thu Aug 20, 2015 1:50 pm
by hsmith
phreedom68 wrote:I installed nagios on Centos and I also want to enable NSCA on the host. The client is already configured and is sending data (I can see it when I tail the logs). However, I'm seeing the following error message in the log by NSCA
Command file '/var/nagios/rw/nagios.cmd' does not exist, attempting to use alternate dump file '/var/nagios/rw/nsca.dump' for output
I browsed to /var/ and there was no "nagios" folder. So I created one. I also created a /rw/ folder. I restarted nagios but nagios.cmd wasn't created. I did a chown and chgrp to nagios on those folder but that didn't help.
First off, how come /var/nagios/rw/ was never created during the installation? Can someone think of a way make this work so nagios creates the nagios.cmd file (NSCA is looking for it to input data)?
Thanks
Nagios is not referring to
/var/nagios/rw
It is referring to
/usr/local/nagios/var/rw/nagios.cmd
This can just be very confusing a new user!
What version of CentOS are you using?
What version of Core are you installing?
Are you installing from source?
Are you using a guide to do this, and if so, what guide are you using?
I would just like to get these questions out of the way so we know what we are working with here.
Thanks!
Re: Nagios/NSCA: Command file '/var/nagios/rw/nagios.cmd' do
Posted: Thu Aug 20, 2015 3:03 pm
by phreedom68
Thank you for your reply. I had NSCA working on ubuntu (my test environment) but now I"m moving things into staging which is Centos on the cloud.
Here's the outputs for the questions below
[root@emswebserver2 nagios]# cat /etc/centos-release
CentOS release 6.7 (Final)
[root@emswebserver2 nagios]# uname -a
Linux emswebserver2 2.6.32-504.16.2.el6.x86_64 #1 SMP Wed Apr 22 06:48:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Yes. I"m using a guide as found here
https://www.digitalocean.com/community/ ... n-centos-6
As for the version number of nagios, I didn't specify any. I'm assuming that
"yum -y install nagios"
installs the latest one (4.x)?
On Nagios dashboard, I can see the localhost is all green (so I guess that part is working). The NSCA services that I defined are all in "Pending" state which makes since nsca.dump is not being picked up. BTW, when I created the /var/nagios/rw NSCA process started putting nsca.dump into that directory.
Please let me know if you need more info.
Thanks in advance.
Re: Nagios/NSCA: Command file '/var/nagios/rw/nagios.cmd' do
Posted: Thu Aug 20, 2015 3:16 pm
by phreedom68
I also installed the NSCA using this instruction doc.
https://wiki.gutzmann.com/confluence/pa ... d=12681387
Re: Nagios/NSCA: Command file '/var/nagios/rw/nagios.cmd' do
Posted: Thu Aug 20, 2015 3:30 pm
by phreedom68
The actual path to the nagios.cmd is /var/spool/nagios/. I change the path in the nsca.cfg to the new directory and the dashboard is lighting up with data and it looks like it's working.
Re: Nagios/NSCA: Command file '/var/nagios/rw/nagios.cmd' do
Posted: Thu Aug 20, 2015 4:20 pm
by hsmith
phreedom68 wrote:The actual path to the nagios.cmd is /var/spool/nagios/. I change the path in the nsca.cfg to the new directory and the dashboard is lighting up with data and it looks like it's working.
Interesting. I'm glad to hear you have it working! If you're curious for whatever reason
here is our official document on NSCA. The one you linked looks pretty good too.
Is there anything else we can do to help you out, or am I all right to close this one?
Re: Nagios/NSCA: Command file '/var/nagios/rw/nagios.cmd' do
Posted: Thu Aug 20, 2015 5:39 pm
by phreedom68
Yes sir. Thank you! I have another question but I will open a new thread on that one.
Thanks again!
Re: Nagios/NSCA: Command file '/var/nagios/rw/nagios.cmd' do
Posted: Fri Aug 21, 2015 9:38 am
by tmcdonald
I'll be closing this thread now, but feel free to open another if you need anything in the future!