<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Manually feed works!! but stop&start nagios not solves the problem.<br>
<br>
Kevin Keane escribió:
<blockquote cite="mid:4A07F8D6.2070207@kkeane.com" type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">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ó:
</pre>
<blockquote type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">[nagios@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ó:
</pre>
<blockquote type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">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ó:
</pre>
<blockquote type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">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
</pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">--
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">--
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<img src="cid:part1.08020405.06040107@dome-consulting.com" border="0"></div>
</body>
</html>