- Code: Select all
https://docs.nsclient.org/tutorial/
Here is a guide on creating external commands on NSClient.
- Code: Select all
https://docs.nsclient.org/howto/external_scripts/
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.
- Code: Select all
check_dhcp_scope = cscript.exe //T:115 //NoLogo scripts\\check_dhcp_scope.vbs
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.
- 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
}
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/nagioscore/docs/nagioscore/4/en/toc.html