feature (or documentation) request
Jeff Weisberg
jaw+arguslist at tcp4me.com
Tue May 26 14:23:55 EDT 2009
On 26 May, 2009, at 12:49, Jeremy Kister wrote:
> it'd be nice if argus' config could understand some kind of
> rand() and time()
>
> e.g., i want both functions evaluated at test time.
>
>
> Group "foo" {
> # test one of the three hosts on any given poll
> host: rand(host1 host2 host3)
> messagedn: %o{hostname} says test foo is broken
> [...]
> }
I am having trouble seeing how that could possibly be useful.
> Service Prog {
> # make sure file was created recently
> cmd: stat -c %Y /tmp/somefile
> expect: ^[0-9]{10}$
> minvalue: (time() - 3600)
> }
I think you'd be better off, and have more flexibility,
if you move that logic into your external program.
cmd: /usr/local/bin/
my_perl_program_that_returns_the_age_of_a_file /tmp/somefile
minvalue: 3600
you could even do something like
cmd: perl -e 'one line perl program that does -M on a file,
some math, and prints it'
More information about the Arguslist
mailing list