Page 1 of 1

Nagios XI - Missing Disks to Monitor

Posted: Thu Nov 12, 2020 9:42 am
by veeravamsi
Hi Team,

We did bulk deployment of 100s of Servers by cloning so we end up configuring only C:\ on all servers , and missing any other drives whether D: E: etc associated with each of Servers.

Is there any easy way to bring all those associated Drives as part of monitoring , instead of running the ncpa wizard for each of Host ?

--Vamsi

Re: Nagios XI - Missing Disks to Monitor

Posted: Thu Nov 12, 2020 6:08 pm
by benjaminsmith
HI Vamsi,

Hopefully, I got this right but correct me if I'm wrong. Do all the cloned servers have the same drive structure, C, D , E..etc.?

If that's the case you could group them into one large host group, and create a new service for those drives and assign it to the hostgroup.

Check out the following video for an explanation of the process.

https://www.youtube.com/watch?v=Qj_HALNyWvc

Benjamin

Re: Nagios XI - Missing Disks to Monitor

Posted: Fri Nov 13, 2020 9:28 am
by veeravamsi
Thats more of bulk deployment/cloning. We have varying Disks E: F: I: etc.

Re: Nagios XI - Missing Disks to Monitor

Posted: Fri Nov 13, 2020 2:52 pm
by dchurch
What you could do is add all your hosts with a D drive to a Host Group called "With Drive D" and assign the active NCPA check "Disk Usage on Drive D" to that group (don't assign it individually to each host, only to the host group), then do the same for the rest of the drive letters.

The check would look something like this:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H 127.0.0.1 -t 'some-shared-token-bla-blu-blarg' -P 5693 -M 'disk/logical/D:|' -w '70' -c '90'
Then on each of the monitored machines:

Code: Select all

# C:\Program Files (x86)\Nagios\NCPA\etc\ncpa.cfg (Windows)
# or /usr/local/ncpa/etc/ncpa.cfg (Linux)
[api]
community_string =some-shared-token-bla-blu-blarg
This necessitates having the community_string (ncpa.cfg) being the same on each of the monitored hosts.

The advantage of this is that it centralizes the setup and management. If a host drops their Drive D:, simply remove them from the "With Drive D" group, and they'll no longer receive that check.