NSCA - Command file does not exist

Kevin Keane subscription at kkeane.com
Mon May 11 12:07:18 CEST 2009


Yes, this looks good. Besides, I only just noticed that you did the ls 
-lah * as user nagios, so we now have double confirmation that this 
works. Another question: what happens when you manually feed a command 
into nagios.cmd?

echo "xxx" >>/usr/local/nagios/var/rw/nagios.cmd

It should basically succeed without any message. If you look in your 
nagios log files, you'll probably see an invalid command "xxx" being 
logged. Finally, you could try stopping nagios, deleting the nagios.cmd 
file if it stayed around, and restarting nagios. It should get 
recreated. This just in case it is somehow "messed up".

Joan Tugores wrote:
> drwxr-xr-x 15 root   root      4,0K abr 29 13:07 /usr
> drwxr-xr-x 14 root   root      4,0K abr 29 13:58 /usr/local
> drwxrwxr-x  9 nagios nagiosgrb 4,0K abr 29 14:16 /usr/local/nagios
> drwxrwxr-x  5 nagios nagiosgrb 4,0K may 11 11:07 /usr/local/nagios/var
> drwxrwxr-x  2 nagios nagiosgrb 4,0K may  8 13:22 /usr/local/nagios/var/rw
>
> I think is all ok.
>
> Kevin Keane escribió:
>> How about
>>
>> ls -lahd /usr/local/nagios/var/rw /usr/local/nagios/var 
>> /usr/local/nagios /usr/local /usr
>>
>> They should all at a minimum have X permission for either the nagios 
>> user or the group or for world.
>>
>> ?
>>
>> Joan Tugores wrote:
>>   
>>> [nagios at DCSERVERBD2 rw]$ ls -lah *
>>> prw-rw---- 1 nagios nagiosgrb    0 may  8 13:22 nagios.cmd
>>> -rwxrwxr-x 1 nagios nagiosgrb 4,0K may 11 09:20 nsca.dump
>>>
>>> seems to be well.
>>>
>>> Kevin Keane escribió:
>>>     
>>>> Does the nsca user or group have access to every single directory along 
>>>> the path? Easy way to try:
>>>>
>>>> su - nagios
>>>> cd /usr/local/nagios/var/rw
>>>> ls -lah *
>>>>
>>>> Note: the above won't work if user nagios has /bin/false as a shell. In 
>>>> that case, try
>>>> su -s /bin/bash - nagios
>>>>
>>>> It should list nagios.cmd (and probably some other files)
>>>>
>>>> Joan Tugores wrote:
>>>>   
>>>>       
>>>>> I think that not using chroot jail, this is my nsca.cfg:
>>>>>
>>>>> pid_file=/var/run/nsca.pid
>>>>> server_port=5667
>>>>> #server_address=192.168.1.1
>>>>> nsca_user=nagios
>>>>> nsca_group=nagiosgrb
>>>>> #nsca_chroot=/usr/local/nagios/var/rw/
>>>>> debug=1
>>>>> command_file=/usr/local/nagios/var/rw/nagios.cmd
>>>>> alternate_dump_file=/usr/local/nagios/var/rw/nsca.dump
>>>>> aggregate_writes=0
>>>>> append_to_file=0
>>>>> max_packet_age=30
>>>>> #password=
>>>>> decryption_method=1
>>>>>
>>>>> Kevin Keane escribió:
>>>>>     
>>>>>         
>>>>>> Does nsca run in a chroot jail? I'm not sure if it can do that.
>>>>>>
>>>>>> If that's the case, nsca may think that /usr/local/nagios is really the 
>>>>>> root of the file system, and anything above that directory is 
>>>>>> essentially hidden. In that case, you'd have to change the nsca.cfg 
>>>>>> configuration to use /var/rw/nagios.cmd (or strip out whatever the root 
>>>>>> of the chroot jail is).
>>>>>>
>>>>>> Joan Tugores wrote:
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>>> Hi all,
>>>>>>>
>>>>>>> When I send a packet to ncsa server this not processed.
>>>>>>>
>>>>>>> In /var/log/messages:
>>>>>>>
>>>>>>> Command file '/usr/local/nagios/var/rw/nagios.cmd' does not exist,attempting to use alternate dump file '/usr/local/nagios/var/rw/nsca.dump' for output
>>>>>>>
>>>>>>> But nagios.cmd exists and the permissions are good.
>>>>>>> prw-rw---- 1 nagios nagiosgrb    0 may  5 09:59 nagios.cmd
>>>>>>>
>>>>>>> Regards,
>>>>>>> Joan
>>>>>>>
>>>>>>>       
>>>>>>>         
>>>>>>>             
>>>>   
>>>>       
>>> -- 
>>>     
>>
>>
>>   
>
> -- 


-- 
Kevin Keane
Owner
The NetTech
Find the Uncommon: Expert Solutions for a Network You Never Have to Think About

Office: 866-642-7116
http://www.4nettech.com

This e-mail and attachments, if any, may contain confidential and/or proprietary information. Please be advised that the unauthorized use or disclosure of the information is strictly prohibited. The information herein is intended only for use by the intended recipient(s) named above. If you have received this transmission in error, please notify the sender immediately and permanently delete the e-mail and any copies, printouts or attachments thereof.


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list