Sample configurations

Configuration 1

In this example, you configure the executable samba as StartProgram and StopProgram, with start and stop specified as command line arguments respectively. Configure the agent to monitor two processes: a process that the smbd.pid specifies and the process nmbd.

Application samba_app (

User = "root"

StartProgram = "/usr/sbin/samba start"

StopProgram = "/usr/sbin/samba stop"

PidFiles = { "/var/lock/samba/smbd.pid" }

MonitorProcesses = { "nmbd" }

)

Configuration 2

In this example, since no user is specified, it uses the root user. The executable samba starts and stops the application using start and stop as the command line arguments. The executable sambaMonitor monitors the application and uses all as its command line argument. The agent also monitors the smbd and nmbd processes.

Application samba_app2 (

StartProgram = "/usr/sbin/samba start"

StopProgram = "/usr/sbin/samba stop"

CleanProgram = "/usr/sbin/samba force stop"

MonitorProgram = "/usr/local/bin/sambaMonitor all"

MonitorProcesses = { "smbd", "nmbd" }

)