Getting alerts in Fusion from remote XI

This support forum board is for questions relating to Nagios Fusion.
elade
Posts: 144
Joined: Wed Mar 28, 2018 6:23 am

Getting alerts in Fusion from remote XI

Post 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

scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Getting alerts in Fusion from remote XI

Post 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?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
elade
Posts: 144
Joined: Wed Mar 28, 2018 6:23 am

Re: Getting alerts in Fusion from remote XI

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Getting alerts in Fusion from remote XI

Post 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/
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
elade
Posts: 144
Joined: Wed Mar 28, 2018 6:23 am

Re: Getting alerts in Fusion from remote XI

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Getting alerts in Fusion from remote XI

Post 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?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
elade
Posts: 144
Joined: Wed Mar 28, 2018 6:23 am

Re: Getting alerts in Fusion from remote XI

Post 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
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Getting alerts in Fusion from remote XI

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
elade
Posts: 144
Joined: Wed Mar 28, 2018 6:23 am

Re: Getting alerts in Fusion from remote XI

Post 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
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Getting alerts in Fusion from remote XI

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked