Monitoring another Nagios system using the Wizard issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Monitoring another Nagios system using the Wizard issue

Post by vijilants »

HI,

I am currently tying to monitor another Nagios XI server using the Nagios XI Server Wizard.

However I am getting the following error against every service on the monitored system:

(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'

Can you please advise ?

Both systems are on standalone Centos 6.5

Thanks
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitoring another Nagios system using the Wizard issue

Post by tgriep »

The error is caused by a missing double quote " at the end of an argument.
Go in to the Core Config Manager > Services menu and edit the check that is giving the error, check all of the Arguments and verify that all of the double quotes are there.
Add it is needed and see if the error message is gone.
Be sure to check out our Knowledgebase for helpful articles and solutions!
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Monitoring another Nagios system using the Wizard issue

Post by vijilants »

Thank you for your response.

Here is the $ARG1$

Code: Select all

--address=192.168.42.3 --url=http://192.168.42.3/nagiosxi/ --username=nagiosadmin --ticket="
Where should I be inserting the quote ?

Can you kindly send me the modified $ARG1$ ?

Also I used the wizard to install this and I didn't edit any of this. Does this mean that there is an issue with this particular Wizard ?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitoring another Nagios system using the Wizard issue

Post by tgriep »

Yes, the ticket option is empty. It should look similar to the following.
--ticket="t8hf9ss5"

The wizard is suppose to get that from the remote XI server and fill in the info for you.
To get the ticker number, login to that server as nagiosadmin avd click on the username in the top right corner and get the API key.
Use that in the ticket option and that should fix it for you.

Couple of questions.
What version of XI are you using on each server?
Do they have SSL enabled for the web interface?
Go to the Admin > Manage Config Wizards and make sure the Nagios XI server wizard is up to date. Version 1.3.0.
If not update it and see if the ticket field it empty again when you run it again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Monitoring another Nagios system using the Wizard issue

Post by vijilants »

tgriep wrote:Yes, the ticket option is empty. It should look similar to the following.
--ticket="t8hf9ss5" The wizard is suppose to get that from the remote XI server and fill in the info for you.
To get the ticker number, login to that server as nagiosadmin avd click on the username in the top right corner and get the API key.
Use that in the ticket option and that should fix it for you.
That worked perfectly !!! Thank you !!!
What version of XI are you using on each server?
5.5.1 on the one that is being monitored and 5.4.13 on the one with the Wizard. I am currently unable to upgrade the 5.4.13 server due to ramdisk running at 100% for which I have a fault out with your faultdesk.
Go to the Admin > Manage Config Wizards and make sure the Nagios XI server wizard is up to date. Version 1.3.0.
If not update it and see if the ticket field it empty again when you run it again.
I am currently running Wizard version 1.2.3 and when I try to update, it says the latest available is 1.2.4.

Thanks for your superfast response on this issue.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitoring another Nagios system using the Wizard issue

Post by tgriep »

Your welcome.
The latest version for XI 5.4.13 for the wizard is 1.2.4 but for XI 5.5.x, it is 1.3.0 so you should be good.
Be sure to check out our Knowledgebase for helpful articles and solutions!
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Monitoring another Nagios system using the Wizard issue

Post by vijilants »

Hi,

I am now trying to poll a 5.5.2 system from a 5.5.1 system and I am getting the following on the services:

Can you please advise ?

HTTP is showing "Critical socket timeout"

IO etc (apart from ping) are showing Error: Could not parse JSON from http://192.168.4.3/nagiosxi/ ()
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitoring another Nagios system using the Wizard issue

Post by tgriep »

Couple of things to check.
Verify that the firewall on the 5.5.2 system is allowing inbound connections to the Apache web server.
If the server has SSL enabled for accessing the web server, you will have to change the commands to use https and not http.
Here is an example argument for the Nagios XI server check that is using https.

Code: Select all

--address=192.168.1.1 --url=https://192.168.1.1/nagiosxi/ --username=nagiosadmin --ticket="j8hf9ss4" --mode=iowait --warn="150" --crit="190"
Be sure to check out our Knowledgebase for helpful articles and solutions!
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Monitoring another Nagios system using the Wizard issue

Post by vijilants »

tgriep wrote:Couple of things to check.
Verify that the firewall on the 5.5.2 system is allowing inbound connections to the Apache web server.
If the server has SSL enabled for accessing the web server, you will have to change the commands to use https and not http.
Here is an example argument for the Nagios XI server check that is using https.

Code: Select all

--address=192.168.1.1 --url=https://192.168.1.1/nagiosxi/ --username=nagiosadmin --ticket="j8hf9ss4" --mode=iowait --warn="150" --crit="190"
I would presume that Apache is allowing inbound on the 5.5.2 or else I wouldn't be able to get to the GUI ? Am I correct or missing something ?

Also how do I check if SSL is enabled on the server ?

Here is what is in the 5.5.1 command for IO:

Code: Select all

--address=$HOSTADDRESS$ --url='http://192.168.4.3/nagiosxi/' --apikey='r96rbk8p' --mode=iowait --warn="7" --crit="17"
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitoring another Nagios system using the Wizard issue

Post by tgriep »

Some customers setup the Firewall to only allow certain network segments to connect to the server and not allow everything to access it.
To check the firewall settings, run the following as root.

Code: Select all

iptables -L
To see if the server is listening on port 80 (http) or port 443 (https) you can run this command on the 5.5.2 server.

Code: Select all

netstat -anp |grep httpd
You should see something like this. This example shows that the the server is listening on both ports.

Code: Select all

tcp        0      0 :::443                      :::*                        LISTEN      1744/httpd
tcp        0      0 :::80                       :::*                        LISTEN      1744/httpd
To check and see if the ports are accessible from the 5.5.1 server, run this command on the 5.5.1 server. xxx.xxx.xxx.xxx is the IP address of the 5.5.2 server.

Code: Select all

nmap xxx.xxx.xxx.xxx
You may need to install the nmap command if it is not installed by running this as root.

Code: Select all

yum install nmap -y

To verify / check the server's settings for SSL access, take a look at this document.
https://assets.nagios.com/downloads/nag ... s%20XI.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked