help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: issue with filters


From: Mark Burgess
Subject: Re: issue with filters
Date: Tue, 15 Feb 2005 20:55:01 +0100
User-agent: Internet Messaging Program (IMP) 3.2.2

Try something like this:

filters:

 { wwwfoo

  Owner: "www"
  Group: "foo"
  FromAtime: "tminus(0,0,10,0,0,0)"    # relative "ago" from now
  ToAtime:   "inf"   
  Type: "reg"
  Result: "Owner.Group.Type"
 }



Quoting "John S. J. Anderson" <address@hidden>:

> 
>   I'm having a filter problem. 
> 
>   My objective is to set up a 'tidy' action that removes files from
>   /tmp that haven't been accessed in 10 days, that are owned by either
>   'www' or group 'foo'. (That's "older than 10 days AND ( owner=www OR
>   group=foo )".)
> 
>   So I figured I'd be using something that looks like this:
> 
> tidy:
>   class_of_machines_that_i_want_this_for::
>     /tmp       pat=*  age=10 filter=wwwfoo r=inf rmdirs=true inform=true
> 
> filters:
>   { wwwfoo
>     Owner:  "www"
>     Group:  "foo"
>   }
> 
>   In order to test that this wouldn't do something crazy, I put in the
>   filter above, and added this temporary stanza to 'files':
> 
> files:
>   class_of_machines_that_i_want_this_for::
>     /tmp       filter=wwwfoo action=alert r=inf
> 
>   Unfortunately, that's alerting on every file under /tmp.
> 
>   Clearly, something is wrong with the filter. What, I have no
>   idea. Other things I have tried:
> 
> { wwwfoo
>   Owner: "www"
> }
> 
> { wwwfoo
>   Owner: "www"
>   Group: "foo"
>   Result: Owner|Group
> }
> 
>   Version 2.0.7p3; running on Linux. Any help, even if it's just a
>   pointer to more documentation on filters, would be appreciated. I
>   can't seem to get my head around how they're supposed to work. 
>   
> 
> thanks,
> john.
> -- 
> John S J Anderson, Ph.D.         [ Contractor ]     +1.301.402.7499
> Chief Penguin Herder & Linux Team Lead, Systems Group, NCBI/NLM/NIH
> "Acquire the habit of reading specs and talking to your peers."
>       - Per Cederqvist, _Version Management with CVS_
> 
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-cfengine
> 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]