We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

Add multiple Nagios server in the nsclient.ini (Windows)

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Add multiple Nagios server in the nsclient.ini (Windows)

Postby ruudboek » Thu Feb 24, 2022 8:15 am

Hello,

i use the nsclient for Windows to sent passive checks to my Nagios monitoring server.

The problem is that i have multiple Nagios monitoring servers and i would like for the Windows nsclient to sent alerts to all of my Nagios monitoring servers.

The nagios server is defined in the nsclient.ini file by the address line:

[/settings/NSCA/client/targets/default]
address = monitoringserver.com

Is it possible to add multiple hostnames or ip addresses to the address line?
If yes, how do i do that?
ruudboek
 
Posts: 2
Joined: Thu Feb 24, 2022 8:08 am

Re: Add multiple Nagios server in the nsclient.ini (Windows)

Postby gormank » Thu Feb 24, 2022 12:54 pm

Yes, just add them after the other separated by spaces I think (or maybe comma separated). Restart the service and check the log for errors.
gormank
 
Posts: 992
Joined: Tue Dec 02, 2014 12:00 pm

Re: Add multiple Nagios server in the nsclient.ini (Windows)

Postby ruudboek » Fri Feb 25, 2022 4:08 am

I tried both komma separated as well as space separated and restarted the nsclient service, but it didn't work.
Both Nagios servers show an "unknown" error after making those changes because no data is received anymore from the nsclient.

The nsclient.log shows this error:

2022-02-25 10:06:15: error:c:\source\master\modules\Scheduler\Scheduler.cpp:173: Failed to submit nsca2m_Get-Service: Socket error: resolve: No such host is known

We are using nsclient version 0.5.2.39.
ruudboek
 
Posts: 2
Joined: Thu Feb 24, 2022 8:08 am

Re: Add multiple Nagios server in the nsclient.ini (Windows)

Postby gormank » Fri Feb 25, 2022 11:22 am

I checked one of my nsclient.ini files and here's what I see:

; ALLOWED HOSTS - A comaseparated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges.
allowed hosts = 10.133.134.0/24,10.136.243.0/24

The .0/24 is probably overkill since there are just two Nagios hosts in each network.
gormank
 
Posts: 992
Joined: Tue Dec 02, 2014 12:00 pm

Re: Add multiple Nagios server in the nsclient.ini (Windows)

Postby gormank » Fri Feb 25, 2022 2:21 pm

Sorry,
I'm a creative reader and answered for nrpe, w/o noticing you asked about passive checks.
gormank
 
Posts: 992
Joined: Tue Dec 02, 2014 12:00 pm


Return to Community Support

Who is online

Users browsing this forum: No registered users and 22 guests

cron