Port list for merging two XI monitoring result on NAGVIS

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
axvers
Posts: 65
Joined: Tue Jan 08, 2019 8:31 pm

Port list for merging two XI monitoring result on NAGVIS

Post by axvers »

Hi Support,

Due to subnet settings, there are two Nagios XI on different host and check their own devices status separately.

And the client ask us to show all results on nagvis from one host.

1. What should we do to make A host (which is running Nagios XI and the main nagvis panel) can read result from B host (running another Nagios XI) and show all status on A's nagvis panel?

2. Is there only one 3306 port needed to be opened on the firewall between A host and B host? Or it needs more ports to achieve the merging?

Thanks!
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: Port list for merging two XI monitoring result on NAGVIS

Post by SteveBeauchemin »

This is going to be overkill for the question you asked but I am looking into this very heavily myself.

here goes...

First you should know that NagVis can be installed stand-alone on a host.

Second you may want to use a livestatus backend. But this example is using MySQL as a backend.

The NagVis config file is

Code: Select all

/usr/local/nagvis/etc/nagvis.ini.php
Edit the file and define multiple backends using different names.

for example - look for this in the php file - there are examples.

Code: Select all

; ----------------------------
; Backend definitions
; ----------------------------
Find the backend area and configure or add multiple backend definitions.

Code: Select all

[backend_nagiosxi-01]
; type of backend - MUST be set
backendtype="ndomy"
; hostname for NDO-db
dbhost="10.253.0.53"
; portname for NDO-db
dbport=3306
; database name for NDO-db
dbname="nagios"
; username for NDO-db
dbuser="nagios-01"
; password for NDO-db
dbpass="nagios-01"
; prefix for tables in NDO-db
dbprefix="nagios_"

[backend_nagiosxi-02]
; type of backend - MUST be set
backendtype="ndomy"
; hostname for NDO-db
dbhost="10.254.0.53"
; portname for NDO-db
dbport=3306
; database name for NDO-db
dbname="nagios"
; username for NDO-db
dbuser="nagios-02"
; password for NDO-db
dbpass="nagios-02"
; prefix for tables in NDO-db
dbprefix="nagios_"
The names nagiosxi-01 and nagiosxi-02 will now exist and be available for use in the NagVis GUI. You can set a master name for all maps if you prefer at a top level.

Code: Select all

NagVis > Options > General Configuration > Object Defaults > backend = nagiosxi-01
If you set this then all maps will use that backed unless otherwise specified.
Each item you add that tracks back to a Nagios XI server can have a backend set.

In a Map, click

Code: Select all

Edit Map > Map Options > Obj.Defaults > backend_id
(will show the top level setting but can be changed)

In a Map, if you get into Edit mode, and right click an object and select Modify you will see on the General Tab the backend_id option again.

You can have many backends and use them in combination on any map.

There is also a livestatus method using LMD - which is a single livestatus proxy that pulls data from all your livestatus and can be used as a single item. you have many ways to succeed. https://github.com/sni/lmd I do not run LMD yet but I do plan to try it as we are growing our team and our new company is very interested in Nagios and Monitoring visualizations.
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Port list for merging two XI monitoring result on NAGVIS

Post by tgriep »

Thanks@ SteveBeauchemin for the help.

@axvers , all you would need to open port 3306 in the file to allow remote access to the server and also setup a user account in MYSQL that allows remote connections as well.
This document has an example for setting up user accounts in MYSQL for remote access.
https://assets.nagios.com/downloads/nag ... Server.pdf

Any further questions, let us know.
Be sure to check out our Knowledgebase for helpful articles and solutions!
axvers
Posts: 65
Joined: Tue Jan 08, 2019 8:31 pm

Re: Port list for merging two XI monitoring result on NAGVIS

Post by axvers »

Hi Support,

Got it!

You save my day!

Thank you very much!!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Port list for merging two XI monitoring result on NAGVIS

Post by tgriep »

Your welcome. I'll close and lock the post for you but feel free to open a new post in the future for any other questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked