Nagios Core HA(NDOUtils)-Load Balanced-Custom Setup

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
Pitone_Maledetto
Posts: 69
Joined: Fri Jul 01, 2016 4:11 am
Location: Liverpool, United Kingdom

Nagios Core HA(NDOUtils)-Load Balanced-Custom Setup

Post by Pitone_Maledetto »

Hi all,
following this thread https://support.nagios.com/forum/viewto ... =7&t=44447 I will try to build a custom Nagios Core installation and document the process all along.
The architecture that I have in mind will consist (but this can change along the way) of:
- 2 Nagios Core (built from source) servers running on Debian 9; one in production and one on a DR site with full HA and fail-over capabilities.
- mod-gearman running satellite workers servers.
- graphite plugged into Grafana for user dashboards.
- Thruk for administrative use.

This is what I have in mind. All will be running on WMWare.
I am not sure how the admin would like this thread to be managed since it is not a support request ticket or if they would like something like this to be here at all.
Please feel free to add and comment this project all along.
Best Regards

UPDATE #1 (11-07-2017)
We have discussed to install the latest Nagios Core running nginx instead of Apache and NDOUtils.
Dropping Graphite we are going for InfluxDB and Grafana combo. InfluxDB will be served by Graphios.
While discussing the topic we would like to see collectd integrated as well with Grafana.

I might consider Graphite for admin use only but not confirmed yet.

Regarding HA I might let VMWare do that since a native approach seems not as solid as I first thought.

modgearman will help in load balancing and mod-gearman-worker will be deployed on remote satellites.

I will also try and write a Chef recipe while going along with the Nagios Core installation.

UPDATE #2 (20-07-2017)
We have a working instance of Nagios Core 4.3.2 with nginx.
I will follow with instructions on how to build Nagios from source on Debian 9 with nginx.
Last edited by Pitone_Maledetto on Thu Jul 20, 2017 5:04 am, edited 3 times in total.
"It is impossible to work in information technology without also engaging in social engineering"
Jaron Lanier
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios Core HA(NDOUtils)-Load Balanced-Custom Setup

Post by tmcdonald »

While we do appreciate the info, we have an internal dashboard for our support team that shows which posts need to be replied to. What we can do is leave this open, but I'll ask that any information be posted once and updated as needed, as opposed to adding a new post to the topic. As long as a moderator is the last to post in the topic, it will be fine.
Former Nagios employee
User avatar
Pitone_Maledetto
Posts: 69
Joined: Fri Jul 01, 2016 4:11 am
Location: Liverpool, United Kingdom

Re: Nagios Core HA(NDOUtils)-Load Balanced-Custom Setup

Post by Pitone_Maledetto »

Hi,
I am having some trouble making any progress on installing NDOUtils.
I am not sure if this forum is the right place to ask for help.
I am following this https://assets.nagios.com/downloads/nag ... OUtils.pdf guide.
I am ok getting the tarball, I am good on ./configure but at make all I am getting a lot of this:

Code: Select all

db.c:512:33: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
  result=mysql_errno(&idi->dbinfo.mysql_conn);
                                 ^
db.c:513:13: error: ‘CR_SERVER_LOST’ undeclared (first use in this function)
  if(result==CR_SERVER_LOST || result==CR_SERVER_GONE_ERROR){
             ^~~~~~~~~~~~~~
db.c:513:39: error: ‘CR_SERVER_GONE_ERROR’ undeclared (first use in this function)
  if(result==CR_SERVER_LOST || result==CR_SERVER_GONE_ERROR){
                                       ^~~~~~~~~~~~~~~~~~~~
db.c: In function ‘ndo2db_db_get_latest_data_time’:
db.c:565:14: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
   idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
              ^
db.c:565:59: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_conn’
   idi->dbinfo.mysql_result=mysql_store_result(&idi->dbinfo.mysql_conn);
                                                           ^
db.c:566:18: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_row’
   if((idi->dbinfo.mysql_row=mysql_fetch_row(idi->dbinfo.mysql_result))!=NULL){
                  ^
db.c:566:56: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
   if((idi->dbinfo.mysql_row=mysql_fetch_row(idi->dbinfo.mysql_result))!=NULL){
                                                        ^
db.c:567:53: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_row’
    ndo2db_convert_string_to_unsignedlong(idi->dbinfo.mysql_row[0],t);
                                                     ^
db.c:569:32: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
   mysql_free_result(idi->dbinfo.mysql_result);
                                ^
db.c:570:14: error: ‘ndo2db_dbconninfo {aka struct ndo2db_dbconninfo_struct}’ has no member named ‘mysql_result’
   idi->dbinfo.mysql_result=NULL;
and finally:

Code: Select all

Makefile:108: recipe for target 'db.o' failed
make[2]: *** [db.o] Error 1
make[2]: Leaving directory '/tmp/ndoutils-2.1.3/src'
Makefile:71: recipe for target 'ndo2db' failed
make[1]: *** [ndo2db] Error 2
make[1]: Leaving directory '/tmp/ndoutils-2.1.3/src'
Makefile:74: recipe for target 'all' failed
make: *** [all] Error 2
and I can't carry on with the make install

I am runnning the following version of mysql:

Code: Select all

MariaDB [(none)]> select version();
+--------------------------+
| version()                |
+--------------------------+
| 10.1.23-MariaDB-9+deb9u1 |
+--------------------------+
1 row in set (0.00 sec)
Any help would be appreciated.
Thanks
"It is impossible to work in information technology without also engaging in social engineering"
Jaron Lanier
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Core HA(NDOUtils)-Load Balanced-Custom Setup

Post by tgriep »

It could be that the MYSQL Development package it not installed on the server and it cannot file the library it needs.
Try installing this package and see if it fixes the issue.

Code: Select all

mysql-devel
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Pitone_Maledetto
Posts: 69
Joined: Fri Jul 01, 2016 4:11 am
Location: Liverpool, United Kingdom

Re: Nagios Core HA(NDOUtils)-Load Balanced-Custom Setup

Post by Pitone_Maledetto »

Hi tgriep,
I had to install default-libmysqlclient-dev but the problem also was that the guide is not correct.
You have to create the nagios DB and the ndoutils user account and adjust some kernel settings beforehand.
The guide that is pretty much the one to follow is this one https://support.nagios.com/kb/article.php?id=406#Debian
Thank you for your help as always.
Regards
Last edited by Pitone_Maledetto on Fri Jul 21, 2017 10:59 am, edited 1 time in total.
"It is impossible to work in information technology without also engaging in social engineering"
Jaron Lanier
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: Nagios Core HA(NDOUtils)-Load Balanced-Custom Setup

Post by tacolover101 »

this is awesome, nice one @Pitone_Maledetto!
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Core HA(NDOUtils)-Load Balanced-Custom Setup

Post by tgriep »

Glad it is working for you now.
If you don't have any other questions, shall I close and lock the post as solved?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Pitone_Maledetto
Posts: 69
Joined: Fri Jul 01, 2016 4:11 am
Location: Liverpool, United Kingdom

Re: Nagios Core HA(NDOUtils)-Load Balanced-Custom Setup

Post by Pitone_Maledetto »

Hi tgriep,
If you don't mind this thread as a document while I go along with my setup it might help others? I will keep updating it as per above conversation with tmcdonald and post a reply only if I need help.
If you think that it might be better being closed please do so.
Thanks
"It is impossible to work in information technology without also engaging in social engineering"
Jaron Lanier
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios Core HA(NDOUtils)-Load Balanced-Custom Setup

Post by dwhitfield »

We can leave it open, but I think what Trevor was saying that you actually use the EDIT button rather than adding a new post. I think you can go back and edit individual posts even if the thread is closed, but I'm not 100% sure of that.
User avatar
Pitone_Maledetto
Posts: 69
Joined: Fri Jul 01, 2016 4:11 am
Location: Liverpool, United Kingdom

Re: Nagios Core HA(NDOUtils)-Load Balanced-Custom Setup

Post by Pitone_Maledetto »

Sure, I added a new post because I wanted the attention for an issue that I was facing. If I don't need anything I keep editing the first entry as agreed.
If by editing the first post you get nonetheless notified I could do that instead.
Hope it make sense.
"It is impossible to work in information technology without also engaging in social engineering"
Jaron Lanier
Locked