Hi Guys,
Has anyone got any experience with this plugin? When running this against a selenium test case it doesn't output Nagios friendly information? I get the full selenium test script data.
I'm following this doc;
http://exchange.nagios.org/directory/Do ... XI/details
Using Nagios with Selenium scripts
Firstly we must add the Selenium check to our plugin directory “usually /usr/local/nagios/libexec”:
The check may be found here:
wget http://assets.nagios.com/downloads/nagi ... k_selenium
Once the plugin has been added, from the Nagios terminal make sure you are in the libexec directory and run the following:
chmod 755 check_selenium
./check_selenium –script=/usr/local/nagios/libexec/simpletest
What the check_selenium script is doing is running
the simpletest script and returning the data all at
once at the end in a friendly way readable by Nagios.
check_selenium plugin
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_selenium plugin
Can you show us what output you are getting? Also a copy of your test script? You can scrub data you do not wish to share but please give us an indication of what you are changing and where.
Re: check_selenium plugin
hi,
i know this is actually an old post but i'm facing the same issue.
please find attached output of the perl script which where already some data seems to be missing in the end.
i also attached the sample script.
thanks in advance for any help
script
output of the perl script
output of the check_selenium script
i know this is actually an old post but i'm facing the same issue.
please find attached output of the perl script which where already some data seems to be missing in the end.
i also attached the sample script.
thanks in advance for any help
script
Code: Select all
use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_plan";
use Test::Exception;
my $sel = Test::WWW::Selenium->new( host => "xx.xx.xx.xx",
port => 4444,
browser => "*firefox",
browser_url => "https://freightnet.geodiswilson.com/Util/login.aspx?ReturnUrl=%2f" );
$sel->open_ok("/Util/login.aspx?ReturnUrl=%2f");
$sel->type_ok("id=ctl00_FullRegion_LoginControl_UserName", "abcdef");
$sel->type_ok("id=ctl00_FullRegion_LoginControl_Password", "123456");
$sel->click_ok("id=ctl00_FullRegion_LoginControl_Login");
$sel->wait_for_page_to_load_ok("30000");
$sel->click_ok("link=Home");
$sel->wait_for_page_to_load_ok("30000");
$sel->click_ok("id=ctl00_ctl00_buttonLogout");
$sel->wait_for_page_to_load_ok("30000");Code: Select all
ok 1 - open, /Util/login.aspx?ReturnUrl=%2f
ok 2 - type, id=ctl00_FullRegion_LoginControl_UserName, abcdefg
ok 3 - type, id=ctl00_FullRegion_LoginControl_Password, 1234567
ok 4 - click, id=ctl00_FullRegion_LoginControl_Login
ok 5 - wait_for_page_to_load, 30000
ok 6 - click, link=Home
ok 7 - wait_for_page_to_load, 30000
ok 8 - click, id=ctl00_ctl00_buttonLogout
ok 9 - wait_for_page_to_load, 30000
1..9output of the check_selenium script
Code: Select all
UNKNOWN: ok 1 - open, /Util/login.aspx?ReturnUrl=%2f
ok 2 - type, id=ctl00_FullRegion_LoginControl_UserName, waemake
ok 3 - type, id=ctl00_FullRegion_LoginControl_Password, Alcatraz92
ok 4 - click, id=ctl00_FullRegion_LoginControl_Login
ok 5 - wait_for_page_to_load, 30000
ok 6 - click, link=Home
ok 7 - wait_for_page_to_load, 30000
ok 8 - click, id=ctl00_ctl00_buttonLogout
ok 9 - wait_for_page_to_load, 30000
1..9-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: check_selenium plugin
That is definitely not nagios formatted output. The original posters plugin looks like it may work, but if you are using the one in your first code comment, that absolutely will not work for nagios. I would highly suggest either trying the OP's plugin or finding another one for selenium on exchange, there should be more than a few last I checked. Once you find another one, give it a try, if you have any issues post a link and the things you have tried with output.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: check_selenium plugin
i just looked into it again this morning and i figured out that the 'clean script' was not executing correctly.
After fixing that everything is now working.
Matt
After fixing that everything is now working.
Matt
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_selenium plugin
Ahh, yep that is required to clean it up before nagios executes it, thanks for letting us know!