Xymon Mailing List Archive search

Log monitoring

8 messages in this thread

list Galen Johnson · Fri, 20 Apr 2007 21:28:15 -0400 ·
Hey,

I'm having a minor issue with the logging functionality of hobbit.  I have a log file that is rolled daily and, as such, has a date embedded.  I've tried adding the entry like:

log:/path/to/file_`date +%Y.%m.%d`.log:10240

I got the impression from the docs and Henrik's site that this should be possible.  What am I missing?

=G=
list Galen Johnson · Sat, 21 Apr 2007 10:41:37 -0400 ·
I'm also getting that "cannot open logfile:...: permission denied.  However, if I become the hobbit user, I can access it just fine...any thoughts?

=G= 
quoted from Galen Johnson

-----Original Message-----
From: Galen Johnson [mailto:user-87f955643e3d@xymon.invalid] 
Sent: Friday, April 20, 2007 9:28 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Log monitoring

Hey,

I'm having a minor issue with the logging functionality of hobbit.  I have a log file that is rolled daily and, as such, has a date embedded.  I've tried adding the entry like:

log:/path/to/file_`date +%Y.%m.%d`.log:10240

I got the impression from the docs and Henrik's site that this should be possible.  What am I missing?

=G=
list Alan Sparks · Sat, 21 Apr 2007 08:56:37 -0600 ·
quoted from Galen Johnson
Galen Johnson wrote:
Hey,

I'm having a minor issue with the logging functionality of hobbit.  I have a log file that is rolled daily and, as such, has a date embedded.  I've tried adding the entry like:

log:/path/to/file_`date +%Y.%m.%d`.log:10240

I got the impression from the docs and Henrik's site that this should be possible.  What am I missing?
  
You can... but I think you can only do one or the other, not mix it.  A literal, or the whole thing a command in backquotes.
Perhaps if you try something like:
log:`date +'/path/to/file_%Y.%m.%d.log'`:10240

The file must be readable by the Hobbit user for monitoring to work, of course.
-Alan

I do something like the following for some servers, and it works, maybe you can adapt the concept to your needs:
log:`find /path/to/location -maxdepth 1 -name '

-- 
Alan Sparks, UNIX/Linux Systems Integration and Administration
<user-8f2174fd8b66@xymon.invalid>
list Galen Johnson · Sat, 21 Apr 2007 11:41:11 -0400 ·
You rock, dude...that did it.  Now I just need to figure out why hobbit can't see the other logs.  It's a permissions thing I'm sure but I've made the hobbit user a member of the group that has access yet it seems like the secondary group membership is not being honored.  Anyone ever run into this?

=G= 
quoted from Alan Sparks

-----Original Message-----
From: Alan Sparks [mailto:user-8f2174fd8b66@xymon.invalid] 
Sent: Saturday, April 21, 2007 10:57 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Log monitoring

Galen Johnson wrote:
Hey,

I'm having a minor issue with the logging functionality of hobbit.  I have a log file that is rolled daily and, as such, has a date embedded.  I've tried adding the entry like:

log:/path/to/file_`date +%Y.%m.%d`.log:10240

I got the impression from the docs and Henrik's site that this should be possible.  What am I missing?
  
You can... but I think you can only do one or the other, not mix it.  A literal, or the whole thing a command in backquotes.
Perhaps if you try something like:
log:`date +'/path/to/file_%Y.%m.%d.log'`:10240

The file must be readable by the Hobbit user for monitoring to work, of course.
-Alan

I do something like the following for some servers, and it works, maybe you can adapt the concept to your needs:
log:`find /path/to/location -maxdepth 1 -name '

--
Alan Sparks, UNIX/Linux Systems Integration and Administration <user-8f2174fd8b66@xymon.invalid>
list Henrik Størner · Sat, 21 Apr 2007 17:58:53 +0200 ·
quoted from Galen Johnson
On Sat, Apr 21, 2007 at 11:41:11AM -0400, Galen Johnson wrote:
You rock, dude...that did it.  Now I just need to figure out why hobbit can't see the other logs.  It's a permissions thing I'm sure but I've made the hobbit user a member of the group that has access yet it seems like the secondary group membership is not being honored.
Make sure you restart the Hobbit client after changing group
memberships - changing it doesn't affect any running processes.


Regards,
Henrik
list Galen Johnson · Sat, 21 Apr 2007 19:28:09 -0400 ·
quoted from Henrik Størner
Henrik Stoerner wrote:
On Sat, Apr 21, 2007 at 11:41:11AM -0400, Galen Johnson wrote:
  
You rock, dude...that did it.  Now I just need to figure out why hobbit can't see the other logs.  It's a permissions thing I'm sure but I've made the hobbit user a member of the group that has access yet it seems like the secondary group membership is not being honored.
    
Make sure you restart the Hobbit client after changing group
memberships - changing it doesn't affect any running processes.


Regards,
Henrik
  
Yep, did that (a couple of times)...I wish I had this setup on a different OS...currently only on Solaris 10.  Never seen this before 9but then again solaris 10 isn't exactly like the older ones).  I wonder if it's the service manifest file I worked on for it...I may need to read up on that a bit more...

=G=
list Galen Johnson · Sat, 21 Apr 2007 21:35:43 -0400 ·
quoted from Galen Johnson
Galen Johnson wrote:
Henrik Stoerner wrote:
On Sat, Apr 21, 2007 at 11:41:11AM -0400, Galen Johnson wrote:
 
You rock, dude...that did it.  Now I just need to figure out why hobbit can't see the other logs.  It's a permissions thing I'm sure but I've made the hobbit user a member of the group that has access yet it seems like the secondary group membership is not being honored.
    
Make sure you restart the Hobbit client after changing group
memberships - changing it doesn't affect any running processes.


Regards,
Henrik
  
Yep, did that (a couple of times)...I wish I had this setup on a different OS...currently only on Solaris 10.  Never seen this before 9but then again solaris 10 isn't exactly like the older ones).  I wonder if it's the service manifest file I worked on for it...I may need to read up on that a bit more...

=G=
Ok...I've just confirmed this hypothesis.  I disabled the service and started hobbit manually (don't know why  I didn't think of it sooner) and it's working as expected...guess I'll have to research the service manifest to figure out what I need to know to make it work with it.

=G=
list Galen Johnson · Sat, 21 Apr 2007 23:07:35 -0400 ·
quoted from Galen Johnson
Galen Johnson wrote:
Galen Johnson wrote:
Henrik Stoerner wrote:
On Sat, Apr 21, 2007 at 11:41:11AM -0400, Galen Johnson wrote:
 
You rock, dude...that did it.  Now I just need to figure out why hobbit can't see the other logs.  It's a permissions thing I'm sure but I've made the hobbit user a member of the group that has access yet it seems like the secondary group membership is not being honored.
    
Make sure you restart the Hobbit client after changing group
memberships - changing it doesn't affect any running processes.


Regards,
Henrik
  
Yep, did that (a couple of times)...I wish I had this setup on a different OS...currently only on Solaris 10.  Never seen this before 9but then again solaris 10 isn't exactly like the older ones).  I wonder if it's the service manifest file I worked on for it...I may need to read up on that a bit more...

=G=
Ok...I've just confirmed this hypothesis.  I disabled the service and started hobbit manually (don't know why  I didn't think of it sooner) and it's working as expected...guess I'll have to research the service manifest to figure out what I need to know to make it work with it.

=G=
Figured it out and updated the entry on The Shire.

=G=