There are several ways for external programs or systems to interface with argus
The results of every service test can be sent to an external program for collecting, storing, analyzing, etc.
archive_prog: /bin/put_stuff_in_database archive_fmt: %t %o %s
archive_prog specifies a program. it will be sent data on its standard input. archive_fmt specifies the format of the data to send to the archive program in a manner similar to the formats for message{up,dn} (except that the values will be URL encoded).
Argus comes with a argusctl program which can be used to control or get data from the running argus server.
For a list of poorly documented commands that are supported, you can run either: argusctl help or argusd -C
Some examples of useful commands:
Argus can load user specified perl code into itself. This can be used to change argus's behavior, add additional features, remove features, enforce company policies, etc.
load_modules: MyArgus::Override_Policy MyArgus::TicketSystem
Argus can run a specified program whenever it starts or reloads the config. This can be used for logging, modifying argus's configuration, etc.
runatstartup: /usr/local/bin/myprogram
Normally, argus will wait for this program to complete. If you want argus to continue without waiting (eg. the program needs to talk to argus), you can put an '&' after the command to cause it ti run in the background.
runatstartup: /usr/local/bin/myprogram &
Argus sets a number of environment variables with are available to any program that argus runs (such as a 'Service Prog').
ARGUS_PID | Argus's process id |
ARGUS_VER | Argus's version |
ARGUS_DATA | the location of the data directory |
ARGUS_LIB | the location of the lib directory |
ARGUS_CTL | the location of the control socket |
ARGUS_SYSLOG | the configured syslog facility |
ARGUS_OBJNAME | the full name of service being tested (Prog only) |
ARGUS_UNAME | the short name of the service being tested (Prog only) |
ARGUS_DEBUG | the value of the debugging parameter (Prog only) |