DNX Master + Slaves - Load balancing.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Farido
Posts: 1
Joined: Tue Feb 03, 2015 4:37 am

DNX Master + Slaves - Load balancing.

Post by Farido »

Hello,

I am trying to create the following structure:
Image

The monitoring services are working but i want to create more load balancing by creating 1 Master DNX server, with multiple DNX Slaves/Workers.
As described in Using Nagios for Load Balancing PDF i tried the following but i keep getting errors. This is my first time using nagios, excuse me.

This is what i did:

Code: Select all

1. Log on to one of your Nagios servers that will serve as a “slave”, or worker client, as the root user.
2. Download the automated installation script to the /tmp directory:
cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/scripts/NagiosXI-DNX.sh
3. Make the script executable:
chmod +x NagiosXI-DNX.sh
4. Run the script in client mode
./NagiosXI-DNX.sh -c
5. Repeat steps 1-4 for each slave system.
6. Repeat steps 1-3 on the master Nagios server.
7. Run the script in server mode, optionally enabling automatic synchronization of check plugins by ssh (recommended).
./NagiosXI-DNX.sh -s -e
Response After step 4:

Code: Select all

sed: can't read /usr/local/nagios/etc/dnxClient.cfg: No such file or directory
sed: can't read /usr/local/nagios/etc/dnxClient.cfg: No such file or directory
ln: creating symbolic link `/etc/init.d/dnxcld': File exists
error reading information on service dnxcld: No such file or directory
error reading information on service dnxcld: No such file or directory
dnxcld: unrecognized service
What should i have done or should i do to realize what i want? I used a mod_gearman version for nagios.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: DNX Master + Slaves - Load balancing.

Post by lmiltchev »

The last release date on the DNX project was 2010-04-13 (on the Nagios Exchange)...
The steps, outlined in our documentation worked the last time I tried them, but this was a long time ago. I will try to recreate the issue in house. Can you run the following commands on the master and all of the slaves, and show us the output?

Code: Select all

uname -a
cat /etc/*release
In my opinion, mod gearman is a lot better option. Have you tried setting it up? Here's a document that you can follow:

http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
litsupport.box
Posts: 80
Joined: Wed Apr 02, 2014 7:24 am

Re: DNX Master + Slaves - Load balancing.

Post by litsupport.box »

Hello lmiltchev Farido here,

Thank you for your response, I have done what you asked me to do. and these are the results:
Master:

Code: Select all

Last login: Wed Feb  4 12:17:44 2015 from pc5995.COMPANYNAME.net
[root@sr0336 ~]# uname -a
Linux sr0336.COMPANYNAME.net 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@sr0336 ~]# cat /etc/*release
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)
Worker:

Code: Select all

Last login: Wed Feb  4 10:28:18 2015 from pc5995.COMPANYNAME.net
[root@boxsr0338 ~]# uname -a
Linux sr0338.COMPANYNAME.net 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@sr0338 ~]# cat /etc/*release
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)
I started following this guide as you mentioned: http://assets.nagios.com/downloads/nagi ... ios_XI.pdf

When i try gearman_top on a worker i get the following:

Code: Select all

2015-02-04 14:15:31  -  localhost:4730

 failed to connect to localhost:4730 - Connection refused
When i try the same on the master i get the following:

Code: Select all

2015-02-04 14:38:18  -  localhost:4730  -  v1.1.8

 Queue Name                                  | Worker Available | Jobs Waiting | Jobs Running
-----------------------------------------------------------------------------
 eventhandler                                 |               0  |           0  |           0
 host                                              |               0  |           0  |           0
 service                                          |               0  |           0  |           0
 worker_sr0336.COMPANYNAME.net |               1  |           0  |           0
-----------------------------------------------------------------------------
**Shouldn't the other worker be here too? i set the IP to the one of the master server during the installation?
I found this topic about the same thing: http://support.nagios.com/forum/viewtop ... 16&t=22300 but as this is my first time using nagios i'm curious if this is what i want to achieve. 1 Master server with the monitoring results (which will be displayed in the office), multiple workers/slaves that will run checks on all servers. What is the most simple solution to this? i hope you can understand my way of explaining as i'm new to this.
Nagios XI Version : 2014R2.6
fqdn 2.6.32-431.17.1.el6.x86_64 x86_64
CentOS release 6.5 (Final)
Gnome is not installed
Proxy appears to be in use
VMware Image
Mod Gearman
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: DNX Master + Slaves - Load balancing.

Post by slansing »

The easiest way I can think of would be to designate host groups to the workers, you can do so through the configuration file. This way, you can control which slaves are running which checks, and since you are doing it by hostgroups, you can assign multiple hosts at once.
litsupport.box
Posts: 80
Joined: Wed Apr 02, 2014 7:24 am

Re: DNX Master + Slaves - Load balancing.

Post by litsupport.box »

To come back to my main question, i followed the following guides on http://sites.box293.com/nagios/guides/m ... -nagios-xi i started over and followed his guide. Now it seems to work.

@slansing: thank you for pointing me into that direction thats exactly what i want.

I've encountered some other problems now but i will roam through the forum to see if i can find anything about that first.
Nagios XI Version : 2014R2.6
fqdn 2.6.32-431.17.1.el6.x86_64 x86_64
CentOS release 6.5 (Final)
Gnome is not installed
Proxy appears to be in use
VMware Image
Mod Gearman
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: DNX Master + Slaves - Load balancing.

Post by lmiltchev »

Farido, I am glad your issue has been resolved! Is is safe to lock this topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
litsupport.box
Posts: 80
Joined: Wed Apr 02, 2014 7:24 am

Re: DNX Master + Slaves - Load balancing.

Post by litsupport.box »

Yes, thank you. If i run into anything else now it would be a completely different subject.
Nagios XI Version : 2014R2.6
fqdn 2.6.32-431.17.1.el6.x86_64 x86_64
CentOS release 6.5 (Final)
Gnome is not installed
Proxy appears to be in use
VMware Image
Mod Gearman
Locked