<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">OK, so you are using sudo to generate a
list of filenames, so xymon can read the list of filenames you
want to monitor (the same as if you just hardcoded
/var/crash/bounds and /var/crash/vmdump.0 into the clientlocal.cfg
file.<br>
<br>
However, when xymon tries to look at the details for the file you
have asked it to check, it can't determine *any* information about
the file, not even whether it exists or not, because it doesn't
have sufficient privileges. You would need xymon to have sudo
power to check the file as well, (not sure if that would be
feasible) or else to add at least rx permissions for xymon to be
able to provide information:<br>
<br>
ls -ld test<br>
drwx------ 2 root root 4096 May 23 09:10 test<br>
agoryachev@it-desktop:/tmp$ ls -l test<br>
ls: cannot open directory test: Permission denied<br>
agoryachev@it-desktop:/tmp$ sudo chmod +r test<br>
root@it-desktop:/tmp# exit<br>
agoryachev@it-desktop:/tmp$ ls -l test<br>
ls: cannot access test/two: Permission denied<br>
ls: cannot access test/one: Permission denied<br>
total 0<br>
-????????? ? ? ? ? ? one<br>
-????????? ? ? ? ? ? two<br>
agoryachev@it-desktop:/tmp$ ls -l test/one<br>
ls: cannot access test/one: Permission denied<br>
agoryachev@it-desktop:/tmp$ sudo chmod +x test<br>
root@it-desktop:/tmp# exit<br>
agoryachev@it-desktop:/tmp$ ls -l test<br>
total 0<br>
-rw-r--r-- 1 root root 0 May 23 09:10 one<br>
-rw-r--r-- 1 root root 0 May 23 09:10 two<br>
<br>
So you can read the directory contents with +r, but you need +x to
be able to stat those directory entries. At least, that applies on
my Linux workstation, it may depend on your OS/etc.<br>
<br>
Regards,<br>
Adam<br>
<br>
On 22/05/14 15:40, Vernon Everett wrote:<br>
</div>
<blockquote
cite="mid:CAGo4kcZj5cVwfP=BFcc=Xr6yiXGYcsSm43UJOEvzENoyPgWCow@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>Hi all<br>
<br>
</div>
Not sure if this really classifies
as a bug or not.<br>
</div>
I am inclined to think it is.<br>
<br>
</div>
In clientlocal.cfg, I have <br>
</div>
<span style="font-family:courier
new,monospace">[sunos]<br>
file:`/usr/bin/sudo /usr/bin/find
/var/crash/ -type f 2> /dev/null`</span><br>
<br>
</div>
And this finds 2 files.<br>
</div>
<span style="font-family:courier
new,monospace">/var/crash/bounds<br>
</span></div>
<span style="font-family:courier new,monospace">/var/crash/vmdump.0</span><br>
</div>
So far so good.<br>
<br>
</div>
However, <span style="font-family:courier
new,monospace">/var/crash/</span> is a symlink to
<span style="font-family:courier new,monospace">/var/share/crash/</span><br>
</div>
And /var/share/crash has permissions or 700<br>
</div>
So Xymon can determine there is a file, but cannot
collect any metadata on the file, since it cannot stat
the files in <span style="font-family:courier
new,monospace">/var/share/crash/</span><br>
<br>
</div>
<div>In analysis.cfg I have this line (with appropriate
HOST= value, of course)<br>
<span style="font-family:courier new,monospace">
FILE %^/var/cores/.* NOEXIST red</span><br>
When I go to the "files" page, I see the file names
there.<br>
Clicking on the file names, I get this info.<br>
<span style="font-family:courier new,monospace">[<a class="moz-txt-link-freetext" href="file:/var/crash/vmdump.0">file:/var/crash/vmdump.0</a>]<br>
ERROR: Permission denied</span></div>
<div><br>
</div>
But no red status appears on the test.<br>
</div>
Testing, using a similar directory structure, where Xymon
can stat the files, does give a red status.<br>
</div>
<div><br>
</div>
I can understand that Xymon can't give any info on the file
because of permissions, but in this case, all I care about is
that the file exists, which Xymon has determined. <br>
That should trigger a red status.<br>
<br>
</div>
<div>Using Xymon 4.3.10<br>
<br>
</div>
<div>Regards<br>
Vernon<br>
<br>
</div>
<br>
<div>
<div><br>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<pre>
</pre>
<br clear="all">
<div>
<div>
<div>
<div>
<div>
<div><br>
-- <br>
<span>"Accept the challenges
so that you can feel the
exhilaration of victory"</span>
<div>
<span>- General George
Patton</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Xymon mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xymon@xymon.com">Xymon@xymon.com</a>
<a class="moz-txt-link-freetext" href="http://lists.xymon.com/mailman/listinfo/xymon">http://lists.xymon.com/mailman/listinfo/xymon</a>
</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
Adam Goryachev
Website Managers
<a class="moz-txt-link-abbreviated" href="http://www.websitemanagers.com.au">www.websitemanagers.com.au</a></div>
</body>
</html>