Monitoring AD with Nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dca_admin
Posts: 18
Joined: Wed Jun 20, 2018 1:53 pm

Monitoring AD with Nagios

Post by dca_admin »

Hello team,

Service 1: Need to monitor replication synchronization in Nagios. I tried one plugin but its not working please check below links of powershell script i used (may be i don't understand how to work on this plugin). Please share document and need help how to work on it.

https://exchange.nagios.org/directory/P ... nc/details
https://github.com/juangranados/nagios- ... cation.ps1


Service 2: Need to monitor ADFS and AD Directory Sync Services. Please share document and need help how to work on it.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Monitoring AD with Nagios

Post by cdienger »

Let's address these one at a time.

See https://support.nagios.com/kb/article/n ... a-722.html for how to run scripts with NCPA.

The first step is to copy the powershell script into the plugins directory( Usually C:\Program Files (x86)\Nagios\NCPA\plugins)

and then testing it from the XI command line. For example:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H your_windows_server_ip_address -t your_windows_server_ncpa_token -P 5693 -M 'plugins/check_adreplication.ps1' -q 'args=-Warning 5 -Critical 10'
Does this work?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dca_admin
Posts: 18
Joined: Wed Jun 20, 2018 1:53 pm

Re: Monitoring AD with Nagios

Post by dca_admin »

Hi Cdienger,

Thank for your response.

I have tried as per your suggestion but we are facing replication error. Please find attached screenshot.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring AD with Nagios

Post by lmiltchev »

I haven't used this script, so I am going to speculate here... The example that is shown is this:

Code: Select all

.\Get-ADReplication.ps1 -Warning 5 -Critical 10
so, you are supposed to be able to pass arguments, even though they are "hard-coded" in the script.
Param(
[Parameter(Mandatory=$false,Position=0)]
[ValidateNotNullOrEmpty()]
[int]$Warning=1,
[Parameter(Mandatory=$false,Position=1)]
[ValidateNotNullOrEmpty()]
[int]$Critical=5
)
Having said that, you can try passing only the values (without the "-Warning" and "-Critical" part).

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H your_windows_server_ip_address -t your_windows_server_ncpa_token -P 5693 -M 'plugins/check_adreplication.ps1' -q 'args=5 10'
You can also try not passing any arguments to see what would be the status that is returned with the "hard-coded" parameters. The plugins seems to be working, however the status should be "Warning", not "Critical" (with the returned value of 7 that is).
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked