Re: DHCP Monitoring
Posted: Wed Apr 10, 2019 11:51 am
Generic guide for NSClient++.
Here is a guide on creating external commands on NSClient.
After installing NSClient++.
Copy the visual basic script to this folder
C:\Program Files\NSClient++\scripts
Create a command in the nsclient.ini file like this example.
Put it under this section
[/settings/external scripts/scripts]
After installing the check_nrpe plugin on the Nagios server, create a command for it like this.
An example service command to run the external command check_dhcp_scope on the remote windows server.
There really in not a guide for creating specific commands for the plugins you want to run so you will have to do the research on settings this up for your needs.
Do some searching here.
https://support.nagios.com/kb/category.php?id=10
https://support.nagios.com/kb/category.php?id=12
https://assets.nagios.com/downloads/nag ... n/toc.html
Code: Select all
https://docs.nsclient.org/tutorial/
Code: Select all
https://docs.nsclient.org/howto/external_scripts/
Copy the visual basic script to this folder
C:\Program Files\NSClient++\scripts
Create a command in the nsclient.ini file like this example.
Code: Select all
check_dhcp_scope = cscript.exe //T:115 //NoLogo scripts\\check_dhcp_scope.vbs
[/settings/external scripts/scripts]
After installing the check_nrpe plugin on the Nagios server, create a command for it like this.
Code: Select all
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$ $ARG8$
}
An example service command to run the external command check_dhcp_scope on the remote windows server.
Code: Select all
define service {
host_name WindowsHost
service_description Check DHCP nrpe
use local-service
check_command check_nrpe!!check_dhcp_scope!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
notification_period 24x7
notification_options w,c,u,r,s,
notifications_enabled 1
contacts nagiosadmin
register 1
}
Do some searching here.
https://support.nagios.com/kb/category.php?id=10
https://support.nagios.com/kb/category.php?id=12
https://assets.nagios.com/downloads/nag ... n/toc.html