Unable to login via script

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
njain213

Re: Unable to login via script

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to login via script

Post 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.
Former Nagios Employee
njain213

Re: Unable to login via script

Post by njain213 »

Hi,

yes it helps and it got repaired.

Thanks
Naman
njain213

Re: Unable to login via script

Post 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
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to login via script

Post 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.
Former Nagios Employee
njain213

Re: Unable to login via script

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to login via script

Post 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
njain213

Re: Unable to login via script

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to login via script

Post 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)
njain213

Re: Unable to login via script

Post 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
Locked