Page 1 of 1

Selenium Perl RPM's

Posted: Tue Jan 22, 2019 7:52 am
by danniiffxi
Hi All

Just a quick one.... I hope...

OK a quick back story. I am moving from an old instance of Nagios XI to a new build as it is going to be quicker than cleaning up the mess in our original version. We run Selenium in order to complete Synthetic Transactions and I need to set it up on the new instance.

So far I have installed
perl-Test-WWW-Selenium
https://centos.pkgs.org/6/repoforge-i38 ... h.rpm.html

perl-Time-HiRes
https://centos.pkgs.org/6/centos-x86_64 ... 4.rpm.html

But I am still getting the following error..

Code: Select all

Can't locate TimePerf2.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at testcase line 7.
BEGIN failed--compilation aborted at testcase line 7.
Problem is I can't seem to find a package anywhere online for TimePerf2... Does anyone know where I can find it or how to work around it please?

The Selenium Perl Script looks like this

Code: Select all

use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_plan";
use Test::Exception;
use TimePerf2;

my $time= TimePerf2->new(60,90,120);


my $sel = Test::WWW::Selenium->new( host => "servernamehere",
                                    port => 4445,
                                    browser => "*iexplore",
                                    browser_url => "https://google.com/" );

Re: Selenium Perl RPM's

Posted: Tue Jan 22, 2019 11:29 am
by mcapra
It's worth mentioning Selenium support appears to have been deprecated, and much of the original documentation has been removed:
https://support.nagios.com/forum/viewto ... 53#p261191

Here's the original URL for the TimePerf2 module provided for the check_selenium plugin. You'd likely need to build it from scratch if it's not in your current Perl environment:
http://assets.nagios.com/downloads/nagi ... s/Time.tar

Code: Select all

tar -xf Time.tar
cd TimePerf2
perl Makefile.PL
make
make test
make install
I'll attach the tarball as well for visitors from the future.

Re: Selenium Perl RPM's

Posted: Tue Jan 22, 2019 3:46 pm
by ssax
@mcapra is correct, please follow those instructions and let us know the results.

Thank you

Re: Selenium Perl RPM's

Posted: Thu Jan 24, 2019 5:29 am
by danniiffxi
Perfect, thank you guys! I will get this last piece of the puzzle installed and tested today.

I figured it was deprecated and have been looking at alternative solutions, this is just to keep it ticking over until I find something we can use.

I will update you shortly.

Re: Selenium Perl RPM's

Posted: Thu Jan 24, 2019 9:56 am
by danniiffxi
Thank you, Synthetic Transactions now working.

Please feel free to lock this thread :)

Re: Selenium Perl RPM's

Posted: Thu Jan 24, 2019 12:04 pm
by scottwilkerson
danniiffxi wrote:Thank you, Synthetic Transactions now working.

Please feel free to lock this thread :)
Great! locking.