[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" <janderso@ncbi.nlm.nih.gov>:
>
> 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
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272 Email: Mark.Burgess@iu.hio.no
Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
- issue with filters, John S. J. Anderson, 2005/02/15
- Re: issue with filters,
Mark Burgess <=