Symptoms

Provider want to monitor control panel availability.

Cause

  • CP downtime may reflect most critical OSA components outage as well (multiple checks in one)

  • It’s simple – the easiest method to collect OA installation uptime (only account credentials with minimal privileges are required to check provider panel. No monitoring services installation required)

  • Control Panel uptime can be used as the most important indicator showing overall system health. Metric can be used in reports

Resolution

To monitor control panel there are two ways:

  • Simple URL ping. You can find and use one of many Internet services who provide simple website check and alert recepients via SMS, Email and other notification channels
  • Extended CP checking - with logging in provider control panel and switching to Billing panel. See the instructuions below to configure extended CP monitoring

To login in OA provider control panel you need a framework which allows to automate browser actions like Selenium. But we prefer to create an automated tests with the Robot Framework. It allows to create and maintain tests with a keyword-driven approach.

The below you can see the robot Framework test output while execution:

# pybot  --exitonfailure /home/myrobot/my_cp_test.txt
Check networking                                                      | PASS |
------------------------------------------------------------------------------
Prepare browser for test                                              | PASS |
------------------------------------------------------------------------------
Enter credentials in login form                                       | PASS |
------------------------------------------------------------------------------
Login to CP                                                           | PASS |
------------------------------------------------------------------------------
OA frames are good                                                    | PASS |
------------------------------------------------------------------------------
Switch to billing panel                                               | PASS |
------------------------------------------------------------------------------
OB frames are good                                                    | PASS |
------------------------------------------------------------------------------
Logout                                                                | PASS |
------------------------------------------------------------------------------
Calculate test execution time                                         | PASS |
------------------------------------------------------------------------------
Nologin Frame                                                         | PASS |
9 critical tests, 9 passed, 0 failed
9 tests total, 9 passed, 0 failed

To run Robot Framework test the server requirements are following:

  1. For Unix-like servers: installed X window system or Xvfb (virtual display server implementing the X11 display server X11 protocol)
  2. Installed Python and pip package
  3. Installed Robot Framework. See installation instructions
  4. Installed Browser. Firefox is preferable
  5. OA Account with minimal CP permissions to browse Automation and Billing control panels. Do not use admin accounts!
  6. Make sure firewall settings allow access from test server to provider CP

Instructions

To simplify the configuration process we configured AWS Image. You can run you own server in Amazon Web Services with already configured Robot Framework and Firefox browser. To find the image use the following data:

    Region: US West (Oregon) 
    AMI name: OdinAutomationControlPanelChecker
    AMI ID: ami-5fc15d3f
    Username: ubuntu
  1. cp_test_availability.zip and extract Robot Framework tests on the prepared server
  2. Specify all required settings in variables.py: username, password, URL, providername, etc..
  3. Run test like below:

    pybot  --removekeywords name:Collections.Get* --removekeywords name:BuiltIn.Set* --exitonfailure  -v CUSTOMER:<providername> login_frame.txt
    
    # common.txt - this is a main test file with user defined keywords
    # login_frame.txt - this is a test for control panels with 'loginFrame' frame on login page
    # nologin_frame.txt - this is a test for control panels without 'loginFrame' frame on login page
    # agent.py - this is a utility to send test result in a monitoring system if test was success of failed. You can create your own script to send test result to monitoring server for further processing
    # variables.py - variables to get access to control panel. Specify 0600 permissions on file system for this file
    

Internal content