Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_selenium_docker

Rating
7 votes
Favoured:
0
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
Owner
Twitter Handle
opsdis
License
GPL
Hits
8360
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
check_selenium_docker
Synthetic website monitoring with Selenium and Docker.

check_selenium_docker is a Nagios based plugin that spins up a Docker container, executes the test and, once the test is finished and the result has been reported back to the monitoring solution, removes the Docker container.
Workflow

* Install Selenium IDE for Chrome (https://selenium.dev/downloads).

* Record your test.

* Export the test and copy the .side file to the server that will run the docker image.

* A Docker container will execute the test and report the test results back to the monitoring system.
Reviews (4)
bypsuw, March 2, 2021
Here is it improved 2.0 version of this plugin:
https://github.com/PawelSuwinski/check_selenium_docker
Hi,

In my case it fails when the test is launched with the check_selenium_docker plugin but not when it is run with Selenium IDE for Firefox:


/opt/plugins/custom/check_selenium_docker.py /opt/plugins/custom/selenium/testing/
CRITICAL: Failed 1 of 1 tests. Error message: ? Default Suite › cccc

TimeoutError: Waiting for element to be located By(link text, Bolsas de trabajo)
Wait timed out after 15018ms

at ../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/webdriver.js:841:17
| 'passed'=0;;;; 'failed'=1;;;; 'exec_time'=146s;;;;

Output sss.json:

{"numFailedTestSuites":1,"numFailedTests":1,"numPassedTestSuites":0,"numPassedTests":0,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":1,"numTotalTests":1,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1583936921135,"success":false,"testResults":[{"assertionResults":[{"ancestorTitles":["Default Suite"],"failureMessages":["TimeoutError: Waiting for element to be located By(link text, Bolsas de trabajo)\nWait timed out after 15018ms\n at /usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/webdriver.js:841:17\n at process._tickCallback (internal/process/next_tick.js:68:7)"],"fullName":"Default Suite cccc","location":null,"status":"failed","title":"cccc"}],"endTime":1583937067794,"message":" ? Default Suite › cccc\n\n TimeoutError: Waiting for element to be located By(link text, Bolsas de trabajo)\n Wait timed out after 15018ms\n\n at ../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/webdriver.js:841:17\n","name":"/selenium-side-runner/side-suite-sss/DefaultSuite.test.js","startTime":1583936921276,"status":"failed","summary":""}],"wasInterrupted":false}

Any idea? Thanks!
bybjarnijensopsdis, March 5, 2020
0 of 1 people found this review helpful
Used in production, do recommend.
byjpvhack, March 3, 2020
1 of 2 people found this review helpful
Hello, I followed this guide:

https://github.com/opsdis/check_selenium_docker

My computer: CentOS Linux version 7.7.1908 (Core)

My error:
[root@MVCCR:/opt/plugins/custom]# ./check_selenium_docker.py /opt/plugins/custom/selenium/google.com/
CRITICAL: Failed 1 of 1 tests. Error message: ? Default Suite › google

TimeoutError: Waiting for element to be located By(css selector, .bkWMgd:nth-child(1) .g:nth-child(1) .LC20lb)
Wait timed out after 15150ms

at ../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/webdriver.js:841:17
| 'passed'=0;;;; 'failed'=1;;;; 'exec_time'=22s;;;;
Owner's reply

Hi jpvhack,

The error message indicates that there is an issue with the test rather than the plugin.

Is the test successful when you run it in the Selenium IDE?

Best regards