DHCP Monitoring

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: DHCP Monitoring

Postby tgriep » Wed Apr 10, 2019 11:51 am

Generic guide for NSClient++.
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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 8209
Joined: Thu Oct 30, 2014 9:02 am

Re: DHCP Monitoring

Postby skypete » Wed Apr 10, 2019 12:59 pm

That worked. Thanks could you please explain in detail on how to check_dhcp_all_pools.sh working.
skypete
 
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: DHCP Monitoring

Postby tgriep » Wed Apr 10, 2019 2:25 pm

The author of the plugin could provide more details than I but the plugin looks to poll the Windows server using SNMP to gather the number of free address, the number of used addresses and the total number of addresses and use that to calculate used, free and generate an alert if the percentage of free falls below the threshold settings.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 8209
Joined: Thu Oct 30, 2014 9:02 am

Previous

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 18 guests