How to connect to remote backend via tcp

Hello,
I’d really appreciate any help with this.

I’ve got a very basic configuration with 2 interconnected virtual machines on a LAN, for testing a remote backend:

  • Virtual Box Linux Ubuntu with nagios4.4.5+nagvis1.9.18+mklivestatus1.4.0p37 (a.k.a the local host) on 192.168.0.26.
  • Virtual Box Linux Ubuntu with nagios4.4.5+nagvis1.9.18+mklivestatus1.4.0p37 (a.k.a.the remote host) on 192.168.0.25.

The thing is that I get an “Unable to connect to the in backend remotelive: Connection refused” message when I open the Mozilla Firefox (localhost/nagvis) and click on a map which is bound to a backend with name “remotelive”.

  • on the “local” host I’ve configured /usr/local/nagvis/etc/nagvis.ini.php this way:
    [defaults]
    ;backend=“live_1”
    [backend_live_1]
    backend_type=“mklivestatus”
    [backend_remotelive]
    backend_type=“mklivestatus”
    socket=“tcp:192.168.0.25:6557”

  • on the local host, I’ve configured /usr/local/nagios/etc/nagios.cfg this way:
    event_broker_options=-1
    broker_module=/usr/local/nagios/lib/mk-livestatus/livestatus.o /usr/local/nagios/var/rw/live

  • on the local host I’ve modified /usr/local/nagvis/etc/maps/automap.cfg this way:
    define global {
    sources=automap
    parent_map=demo-overview
    backend_id=remotelive

    }

  • on the local host, the log file /usr/local/nagios/var/nagios.log says that initialiation is correct:
    qh: Socket ‘/usr/local/nagios/var/rw/nagios.qh’ successfully initialized

    Event broker module ‘/usr/local/nagios/lib/mk-livestatus/livestatus.o’ initialized successfully.

  • on the remote host i have configured /usr/local/nagvis/etc/nagvis.ini.php this way:
    [defaults]
    ;backend=“live_1”
    [backend_live_1]
    backend_type=“mklivestatus”
    [backend_live2]
    backend_type=“mklivestatus”

  • on the remote host I’ve modified /usr/local/nagvis/etc/maps/automap.cfg this way:
    define global {
    sources=automap
    parent_map=demo-overview
    backend_id=live2

    }

  • on the remote host, the log file /usr/local/nagios/var/nagios.log says that initialiation is correct:
    qh: Socket ‘/usr/local/nagios/var/rw/nagios.qh’ successfully initialized

    Event broker module ‘/usr/local/nagios/lib/mk-livestatus/livestatus.o’ initialized successfully.

Finally, I’d add that the execution of the next command from local host command line is successful, giving tons of info:
$ ssh xxxx@192.168.0.25 ‘echo “GET hosts” | unixcat /usr/local/nagios/var/rw/live’

So I don’t know why I see an error on my browser when I click on a map that should be retrieving the remote map.

Thanks in advance

Kind regards