check_selenium.py README
(c) copyright 2008,2009,2010 mm/mare-system.de
   dogtown@mare-system.de
Requirements
   make sure to have a selenium-server.jar running an accessible
   from your testscripts (server/port etc), for setting up
   headless selenium-server see below
   create an nagios-accessible directory (check_dir) for your sel_check_scripts.py
   get selenium-python-clientdrivers (see seleniumhq for an actual version
  Â
   place selenium.py and test_.py from python-clientdrivers into $check_dir
  Â
   create some tests from Selenium IDE, export Test-cases as python_tests
  Â
   upload your sel_check_scripts to $check_dir
  Â
   copy the nagios_plugin check_selenium.py to your $USER1$ / nagios_plugins_dir
  Â
   run some tests as user nagios
  Â
   create a check_command and service_definition (see below)
  Â
   ... fini ...
Bugs / Addidtional Notes
  Â
   please note, this plugin was created for a customer and works superb in our
   environment (test-cases, not suites, python-checks, firefox)
  Â
   if you have commnets/suggestions or find bugs please report them to dogtown@mare-system.de
Sample nagios_command and service_def
define command{
   command_name   check_selenium
   command_line   $USER1$/check_selenium.py -s $ARG1$ -w $ARG2$ -c $ARG3$
   }
define service {
       host_name              check_host
       service_description    check_selenium
       check_command          check_selenium!check_script!20!33
       use                    custom-service
}
  Â
  Â
Selenium-Server headless
   - install java
     aptitude install sun-java6-bin sun-java6-jre
  Â
   - install a simple windowmanager
     aptitude install gdm icewm-lite
    Â
   - install firefox
  Â
   - install xvfb
     aptitude install xfvb
    Â
   - add a xfvb_display to some startup-script
     Xvfb :99 -ac -noreset &
  Â
   - execute selenium-server with the correct display
     export DISPLAY=:99 && java -jar /path/to/selenium-server-1.0.1/selenium-server.jar &
  Â
   - check your tests now
Â