feature request - config loop

Jeff Weisberg jaw+arguslist at tcp4me.com
Tue May 15 17:22:13 EDT 2007

| 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.

More information about the Arguslist mailing list