3.7.3. Exporters

BundleWorks provides exporters for using information about bundles, deployments, and environments within other programs. BundleWorks currently provides exporters for two open source monitoring products, Nagios and Monit. You can also write your own exporter plugins.

For Nagios, BundleWorks first exports a command definition, then a series of service definitions, one per deployed executable bundles. The following is an example:

define command {
   command_name            check_bw_service
   command_line            /local/bundleworks/work/bin/bw $ARG1$ status
}

define service {
   use                     local-service
   host_name               localhost
   service_description     helloserver [/local/env/development]
   check_command           check_bw_service!/local/env/development/helloserver
}

define service {
   use                     local-service
   host_name               localhost
   service_description     helloserver [/local/env/integration]
   check_command           check_bw_service!/local/env/integration/helloserver
}

For Monit, BundleWorks exports a series of process defintions, one per deployed executable bundles. The following is an example:

check process local_env_development_helloserver
   with pidfile "/local/env/development/helloserver/work/helloserver.pid"
   start program = "/local/bundleworks/work/bin/bw /local/env/development/helloserver start"
   stop program = "/local/bundleworks/work/bin/bw /local/env/development/helloserver stop"
   if 2 restarts within 3 cycles then timeout
   group local_env_development

check process local_env_integration_helloserver
   with pidfile "/local/env/integration/helloserver/work/helloserver.pid"
   start program = "/local/bundleworks/work/bin/bw /local/env/integration/helloserver start"
   stop program = "/local/bundleworks/work/bin/bw /local/env/integration/helloserver stop"
   if 2 restarts within 3 cycles then timeout
   group local_env_integration

Exporters are invoked using the export.