Page 1 of 2

Getting alerts in Fusion from remote XI

Posted: Tue Jan 15, 2019 12:02 pm
by elade
Hi,

I have a remote XI in disconnect environment.
I pass all the alerts using the remote XI API to a local machine.
I tried to connect the local machine to Fusion in order to show the alerts but I get credentials errors all the time.
The XI version is 5.5.8 and the Fusion is 4.1.6
How the fusekey section in Fusion is checking if the credentials are OK?

errors attached

Code: Select all

2019-01-15 19:40:02[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:03[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:04[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:05[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:06[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:07[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:08[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:09[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:10[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:11[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:12[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:13[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:14[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:15[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:16[s: 36, u: 0] Failed authentication check
2019-01-15 19:40:17[s: 36, u: 0] Failed authentication check

Code: Select all

/usr/local/nagiosfusion/cron/poll_subsys.php --debug --server 36 --user nagiosadmin

OPERATING IN DEBUG MODE

2019-01-15 19:43:31[s: 0, u: 0] poll_server() unable to poll data for s:Test, u:nagiosadmin, poll:nagiosxi_bpi
2019-01-15 19:43:31[s: 0, u: 0] poll_server() CHECK YOUR LIVE_DATA_TIMEOUT SETTINGS. IT MAY NEED INCREASED
2019-01-15 19:43:31[s: 0, u: 0] poll_server() unable to poll data for s:Test, u:nagiosadmin, poll:hoststatus
2019-01-15 19:43:31[s: 0, u: 0] poll_server() CHECK YOUR LIVE_DATA_TIMEOUT SETTINGS. IT MAY NEED INCREASED
2019-01-15 19:43:31[s: 0, u: 0] poll_server() unable to poll data for s:Test, u:nagiosadmin, poll:servicestatus
2019-01-15 19:43:31[s: 0, u: 0] poll_server() CHECK YOUR LIVE_DATA_TIMEOUT SETTINGS. IT MAY NEED INCREASED
2019-01-15 19:43:31[s: 0, u: 0] poll_server() unable to poll data for s:Test, u:nagiosadmin, poll:status
2019-01-15 19:43:31[s: 0, u: 0] poll_server() CHECK YOUR LIVE_DATA_TIMEOUT SETTINGS. IT MAY NEED INCREASED
2019-01-15 19:43:31[s: 0, u: 0] poll_server() unable to poll data for s:Test, u:nagiosadmin, poll:user
2019-01-15 19:43:31[s: 0, u: 0] poll_server() CHECK YOUR LIVE_DATA_TIMEOUT SETTINGS. IT MAY NEED INCREASED
2019-01-15 19:43:31[s: 0, u: 0] poll_server() unable to poll data for s:Test, u:nagiosadmin, poll:info
2019-01-15 19:43:31[s: 0, u: 0] poll_server() CHECK YOUR LIVE_DATA_TIMEOUT SETTINGS. IT MAY NEED INCREASED
2019-01-15 19:43:31[s: 0, u: 0] poll_server() unable to poll data for s:Test, u:nagiosadmin, poll:alerts
2019-01-15 19:43:31[s: 0, u: 0] poll_server() CHECK YOUR LIVE_DATA_TIMEOUT SETTINGS. IT MAY NEED INCREASED
2019-01-15 19:43:31[s: 0, u: 0] poll_server() unable to poll data for s:Test, u:nagiosadmin, poll:hostgroupmembers
2019-01-15 19:43:31[s: 0, u: 0] poll_server() CHECK YOUR LIVE_DATA_TIMEOUT SETTINGS. IT MAY NEED INCREASED
2019-01-15 19:43:31[s: 0, u: 0] poll_server() unable to poll data for s:Test, u:nagiosadmin, poll:hostgroup
2019-01-15 19:43:31[s: 0, u: 0] poll_server() CHECK YOUR LIVE_DATA_TIMEOUT SETTINGS. IT MAY NEED INCREASED
2019-01-15 19:43:31[s: 0, u: 0] poll_server() unable to poll data for s:Test, u:nagiosadmin, poll:servicegroup
2019-01-15 19:43:31[s: 0, u: 0] poll_server() CHECK YOUR LIVE_DATA_TIMEOUT SETTINGS. IT MAY NEED INCREASED
2019-01-15 19:43:31[s: 0, u: 0] poll_server() unable to poll data for s:Test, u:nagiosadmin, poll:servicegroupmembers
2019-01-15 19:43:31[s: 0, u: 0] poll_server() CHECK YOUR LIVE_DATA_TIMEOUT SETTINGS. IT MAY NEED INCREASED
SERVER:      Test
USERNAME:    nagiosadmin
POLLED_DATA:
Array
(
    [server_id] => 36
    [server_type] => 1
    [authentication_type] => 0
    [username] => nagiosadmin
    [polled_time] => 1547574211
    [data] => Array
        (
        )

    [debug_started_time] => 2019-01-15 19:43:31
    [debug_completed_time] => 2019-01-15 19:43:31
)


MEMORY USED: 4,035,944 Bytes
MEMORY PEAK: 4,294,952 Bytes


Re: Getting alerts in Fusion from remote XI

Posted: Tue Jan 15, 2019 5:48 pm
by scottwilkerson
Did it validate successfully when you entered the information on the manage fused servers page when adding the server?

Did you just add a fuse key or did you also add login credentials?

Re: Getting alerts in Fusion from remote XI

Posted: Wed Jan 16, 2019 3:40 am
by elade
Hi scottwilkerson,
Did it validate successfully when you entered the information on the manage fused servers page when adding the server?
No
Did you just add a fuse key or did you also add login credentials?
Both

Re: Getting alerts in Fusion from remote XI

Posted: Wed Jan 16, 2019 3:26 pm
by scottwilkerson
Are you sure the fusion server can reach the new XI server?

from the command line on the fusion box can you run the following

Code: Select all

curl http://XI_SERVER_ADDRESS/nagiosxi/

Re: Getting alerts in Fusion from remote XI

Posted: Thu Jan 17, 2019 2:39 am
by elade
Are you sure the fusion server can reach the new XI server?

from the command line on the fusion box can you run the following

CODE: SELECT ALL
curl http://XI_SERVER_ADDRESS/nagiosxi/
yes

Re: Getting alerts in Fusion from remote XI

Posted: Thu Jan 17, 2019 8:19 am
by scottwilkerson
When you go to add the XI server to fusion, do you get an error (red circle) next to both the fusekey and the username?

Re: Getting alerts in Fusion from remote XI

Posted: Thu Jan 17, 2019 8:51 am
by elade
When you go to add the XI server to fusion, do you get an error (red circle) next to both the fusekey and the username?
Yes

Re: Getting alerts in Fusion from remote XI

Posted: Thu Jan 17, 2019 4:26 pm
by tgriep
The following example is a command you can run as root on the Fusion server to see if it can connect to the remote Nagios server using the fusekey.
Run the following replacing the nagiosxiserver with the XI server's host name and the xxxxxxxxxxxxxxxxxxxxxxxx with the fusion key.

Code: Select all

curl -XGET https://nagiosxiserver/nagiosxi/api/v1/system/status?fusekey=xxxxxxxxxxxxxxxxxxxxxxxx -k -v
Add the output of the curl command to the post.

Re: Getting alerts in Fusion from remote XI

Posted: Mon Jan 21, 2019 1:19 pm
by elade
* Hostname was NOT found in DNS cache
* Trying 1.1.1.1...
* connect to 1.1.1.1 port 443 failed: Connection refused
* Failed to connect to 1.1.1.1 port 443: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 1.1.1.1 port 443: Connection refused

I have fixed it after open port 443

* About to connect() to 1.1.1.1 port 443 (#0)
* Trying 1.1.1.1...
* Connected to 1.1.1.1 (1.1.1.1) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* NSS error -12263 (SSL_ERROR_RX_RECORD_TOO_LONG)
* SSL received a record that exceeded the maximum permissible length.
* Closing connection 0
curl: (35) SSL received a record that exceeded the maximum permissible length.

I tried again but still get the same error about the credentials and fusekey

Re: Getting alerts in Fusion from remote XI

Posted: Mon Jan 21, 2019 2:55 pm
by tgriep
Those errors suggest that there is a configuration issue with the SSL settings on the Nagios XI server which has to be resolved.
If you can post the following files from the Nagios XI server here, we can take a look at them to see what the issue it.

Code: Select all

/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/ssl.conf
/etc/httpd/conf.d/nagiosxi.conf
Thanks.