Giter VIP home page Giter VIP logo

roundcube-behat-checker's Introduction

Roundcube checker

Fakes a browser session to login to Roundcube webmail, sent a test mail, and check settings.

Install

# git checkout somewhere
$ composer install
$ cp variables.sh.example variables.sh
  • Edit the login information in the variables.sh file
  • Edit the url and email settings in features/roundcube.feature (TODO, add these to variables.sh)
  • Ensure that the webmail user gets the Interface skin 'Larry'.
  • The last two steps in features/roundcube.feature depend on roundcube plugings, disable or extend to match your setup.

Usage

Use the check_behat.sh script to tun the tests.

For more output you can call behat directly.

$ vendor/bin/behat

Icinga config

Here's an example Nagios configuration. To use the passive check you need some script that either receives the mail or reads mailserver logs, and sends a passive result to Icinga.

object CheckCommand "check_behat_roundcube" {
        command = [ "/var/lib/nagios/src/roundcube-behat-checker/check_behat.sh" ]
        arguments = {   }
}
apply Service "behat-roundcube-active"  {
  import "generic-service"

  display_name = "Behat Roundcube active"

  check_interval = 1h
  retry_interval = 10m

  check_command = "check_behat_roundcube"

  assign where host.name == "mail.example.com"
}
apply Service "behat-roundcube-passive"  {
  import "generic-passive-service"

  check_interval = 7d
  vars.notification_interval = 1d
  display_name = "Behat Roundcube - passive result"
  vars.dummy_text = generate_passive_dummy_text("$host.name$", "$service.name$")

  assign where host.name == "mail.example.com"
}

Nagios config

Here's an example Nagios configuration. To use the passive check you need some script that either receives the mail or reads mailserver logs, and sends a passive result to Nagios.

define command{
    command_name  check_behat_roundcube
    command_line  /home/nagios/src/roundcube-checker/check_behat.sh
}

define service{
    use                 generic-service

    normal_check_interval       60
    retry_check_interval        10
    notification_interval       120

    host_name           mail.example.com

    service_description     Behat Roundcube
    check_command           check_behat_roundcube
}

# Passibe check to receive the mail from the Behat Roundcube test above
define service{
    use             passive-generic     ; Name of service template to use
    name                roundcube-behat

    active_checks_enabled       0   ; Active service checks are disabled
    passive_checks_enabled      1   ; Passive service checks are enabled

    check_freshness         1
    freshness_threshold     7200                   ; 2 hour threshold, since backups may not always finish at the same time
    check_command           return-misc!2!"No info in 2h"         ; this command is run only if the service results are "stale"

    host_name               mail.example.com
    service_description     roundcube mail via behat
}


About

This project was developed by Initfour websolutions and BrixIT.

roundcube-behat-checker's People

Contributors

helmo avatar martijnbraam avatar neszt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.