Subject: Re: feature request - config loop

From: Jeff Weisberg <[email-masked]>
Date: Tue, 15 May 2007 17:22:13 -0400 (EDT)

| it'd be nice to do something like
| 
| For Group /host1 host2 host3/ {
|     # lines of config with ability to evaluate for $host
|     hostname: $host
|     messagedn: Top:foo:bar:$host is DOWN
|     # lots more config
| }

chmod a+x your-config-file.

put a #!/bin/sh at the top of your-config-file.

make your config file look kind of like:

    > for x in server1 server2 server3; do
    > 
    > 	      echo "Host \"$x.example.com\" {"
    > 	      echo "    Service Ping"
    > 	      echo "    Service TCP/HTTP"
    > 	      echo "    Service TCP/SSH"
    > 	      echo "}"
    > done

argus will automagically run it as a program, and
use the output as its config.

in your argus tarball, look at the file examples/config-generate
for m4 and perl examples.

note: the author generally does most of his configs with m4.