Page 2 of 4

Re: Unable to login via script

Posted: Wed Apr 27, 2016 4:16 am
by njain213
Thanks for the documents.

I have followed document and after applying configuration I am unable to view host details and service details that I have added.

Also I am getting below error on my dashboard.


SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and last (automatic?) repair failed SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and last (automatic?) repair failed SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and last (automatic?) repair failed SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and last (automatic?) repair failed SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and last (automatic?) repair failed SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and last (automatic?) repair failed SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and last (automatic?) repair failed

Re: Unable to login via script

Posted: Wed Apr 27, 2016 9:27 am
by rkennedy
It looks like SQL has crashed.

Try running -

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
Let us know the output, and if that helps.

Re: Unable to login via script

Posted: Thu Apr 28, 2016 12:07 am
by njain213
Hi,

yes it helps and it got repaired.

Thanks
Naman

Re: Unable to login via script

Posted: Thu Apr 28, 2016 1:36 am
by njain213
Hi,

Now I want to user journey to monitor applications.

Please find attached initial steps that I want to perform.

Could you please help me how to perform these steps in Nagios XI.

Thanks
Naman

Re: Unable to login via script

Posted: Thu Apr 28, 2016 9:49 am
by rkennedy
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Take a look at the above links and see if either of these solutions will work with you. You'll probably need to use Selenium judging by the screenshots.

Re: Unable to login via script

Posted: Fri Apr 29, 2016 1:43 am
by njain213
Hi,

I have followed above documents and got stuck in while executing command perl simpletest.

Error requesting http://10.72.27.94:4444/selenium-server/driver/:
500 Can't connect to 10.72.27.94:4444 (connect: Connection refused)
# Looks like your test exited with 111 before it could output anything.

[root@localhost libexec]# cat simpletest
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 => "Ip ad",
port => 4444,
browser => "*chrome",
browser_url => "https://imrsec.xchanging.com/" );

$sel->open_ok("/worksitemp/index.jsp");
$sel->type_ok("name=UserId", "Username");
$sel->type_ok("name=Password", "password");
$sel->click_ok("id=login");
ok($sel->get_confirmation() =~ /^Your Java Virtual Machine is not configured properly\.
You will not be able to use applets\. Do you want to proceed[\s\S]$/);
$sel->select_window_ok("name=wsmpTop");
$sel->type_ok("name=umrPolicy", "B0001");
$sel->select_window_ok("name=wsmpTop");
$sel->click_ok("id=searchFormPolicyFirefox");
$sel->wait_for_page_to_load_ok("30000");
$sel->select_window_ok("name=wsmpTop");
$sel->click_ok("link=B0001 TEST 1");
$sel->wait_for_page_to_load_ok("30000");

Note: 10.72.27.94 is address of my nagios server.
Thanks
Naman

Re: Unable to login via script

Posted: Fri Apr 29, 2016 12:47 pm
by ssax
Selenium should be installed on a separate server, not on the XI server, it requires a GUI and it's not recommended that you install that on the XI server.

Then you would also need to make sure chrome is installed if your script calls chrome and that you have the 4444 allowed in the firewall rules.

You can also check to see if the port is running with:

Code: Select all

netstat -ano | grep PORTNUM

Re: Unable to login via script

Posted: Fri Apr 29, 2016 12:55 pm
by njain213
Hi,

In the above documents shared by your colleague it is not written that we should install selenium on another server. I simply installed a virtual box and attached centos in it and followed all steps as per documents.

Thanks
Naman

Re: Unable to login via script

Posted: Fri Apr 29, 2016 12:58 pm
by ssax
Under the Prerequisites section:
A separate system with a GUI installed, in this example we will be using Fedora 17 (Not covered in this document)

Re: Unable to login via script

Posted: Fri Apr 29, 2016 1:05 pm
by njain213
As I am using Oracle virtual box for this installation so as per your suggestion I need to install another virtual box for this?

How it will communicate when selenium will be on another box?

Thanks
Naman