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.

DHCP Monitoring

Postby skypete » Tue Apr 09, 2019 5:11 pm

Want to set up a DHCP monitoring and alerts to view in the nagios core GUI. Will any of these work and can you please show step by step process on the steps to get this working new to this. Any help is greatly appreciated. The nagios core is running on centos and the Dhcp is windows.

https://exchange.nagios.org/directory/P ... sh/details

https://exchange.nagios.org/directory/P ... pe/details
Last edited by skypete on Wed Apr 10, 2019 8:50 am, edited 5 times in total.
skypete
 
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: DHCP Monitoring

Postby skypete » Tue Apr 09, 2019 6:20 pm

Anyone please?
skypete
 
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: DHCP Monitoring

Postby tgriep » Wed Apr 10, 2019 9:03 am

Quick question. The first plugin runs on the nagios server and requires the host you are checking to have SNMP enabled and the second one is a Visual Basic script that runs on a Windows server using the NSClient++ agent, which one do you want to use?
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: 8212
Joined: Thu Oct 30, 2014 9:02 am

Re: DHCP Monitoring

Postby skypete » Wed Apr 10, 2019 9:15 am

tgriep wrote:Quick question. The first plugin runs on the nagios server and requires the host you are checking to have SNMP enabled and the second one is a Visual Basic script that runs on a Windows server using the NSClient++ agent, which one do you want to use?


We can try the snmp for now to see how that alerts or you whatever your think would work the easiest.I am good either way. Thanks for response.Will they both show metrics in the nagios GUI?
skypete
 
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: DHCP Monitoring

Postby tgriep » Wed Apr 10, 2019 9:24 am

First, install and configure SNMP on the Windows server. You can search Microsoft for instructions for doing that.

The plugin requires Net-SNMP to be installed on the Nagios server, install that.

Download the plugin and put it in the /usr/local/nagios/libexec folder and call it check_dhcp_all_pools.sh and make is executable.

Create a command for it in the commands.cfg file line this example.

Code: Select all
define command {
    command_name    check_dhcp_all_pools
    command_line    $USER1$/check_dhcp_all_pools.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$
}



An example service is below. It uses $ARG1$ as the SNMP Community string. $ARG2$ as the warning threshold. $ARG3$ as the critical threshold.
Code: Select all
define service {
    host_name                WindowsHost
    service_description      Check DHCP
    use                      local-service
    check_command            check_dhcp_all_pools!public!20!30!!!!!
    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
}


If you view the plugin, is has a bit more details in it.

I don't have access to a Windows DHCP server so I can't show you the plugin's output but it says that it will show the total amount of scopes available vs those shown.
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: 8212
Joined: Thu Oct 30, 2014 9:02 am

Re: DHCP Monitoring

Postby skypete » Wed Apr 10, 2019 9:25 am

tgriep wrote:First, install and configure SNMP on the Windows server. You can search Microsoft for instructions for doing that.

The plugin requires Net-SNMP to be installed on the Nagios server, install that.

Download the plugin and put it in the /usr/local/nagios/libexec folder and call it check_dhcp_all_pools.sh and make is executable.

Create a command for it in the commands.cfg file line this example.

Code: Select all
define command {
    command_name    check_dhcp_all_pools
    command_line    $USER1$/check_dhcp_all_pools.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$
}



An example service is below. It uses $ARG1$ as the SNMP Community string. $ARG2$ as the warning threshold. $ARG3$ as the critical threshold.
Code: Select all
define service {
    host_name                WindowsHost
    service_description      Check DHCP
    use                      local-service
    check_command            check_dhcp_all_pools!public!20!30!!!!!
    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
}


If you view the plugin, is has a bit more details in it.

I don't have access to a Windows DHCP server so I can't show you the plugin's output but it says that it will show the total amount of scopes available vs those shown.



Ok going to try this now standby thank you.
skypete
 
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: DHCP Monitoring

Postby skypete » Wed Apr 10, 2019 9:35 am

What about the Visual basic install using nsclient?
skypete
 
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: DHCP Monitoring

Postby tgriep » Wed Apr 10, 2019 10:15 am

For instructions on installing NSClient++, you can find it on the NSClient++ web site.
http://nsclient.org/

You would have to create an external command in the NSClient's config file for the visual basic script. Details on how to do that.
https://docs.nsclient.org/reference/check/CheckExternalScripts/

Then, you would have to use the check_nrpe plugin to connect to the Windows system running NSClient++
At the bottom in this article are the instructions for Install check_nrpe Plugin Only.
https://support.nagios.com/kb/article.php?id=515
Your server may already the check_nrpe plugin installed so check for that.

Or, you can use NCPA instead of NSClient++ and some details on that are at these links.
https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/monitoring-windows.html
https://www.nagios.org/ncpa/
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: 8212
Joined: Thu Oct 30, 2014 9:02 am

Re: DHCP Monitoring

Postby skypete » Wed Apr 10, 2019 10:18 am

So my question is both the plugins will show details from the GUI in Nagios right?
skypete
 
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: DHCP Monitoring

Postby skypete » Wed Apr 10, 2019 11:01 am

tgriep wrote:For instructions on installing NSClient++, you can find it on the NSClient++ web site.
http://nsclient.org/

You would have to create an external command in the NSClient's config file for the visual basic script. Details on how to do that.
https://docs.nsclient.org/reference/check/CheckExternalScripts/

Then, you would have to use the check_nrpe plugin to connect to the Windows system running NSClient++
At the bottom in this article are the instructions for Install check_nrpe Plugin Only.
https://support.nagios.com/kb/article.php?id=515
Your server may already the check_nrpe plugin installed so check for that.

Or, you can use NCPA instead of NSClient++ and some details on that are at these links.
https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/monitoring-windows.html
https://www.nagios.org/ncpa/


Can you please explain in detail on how to get this work with the nrpe? seems to be not pulling any information. Do i need to follow the same process for NRPE as ncpa
skypete
 
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Next

Return to Nagios Core

Who is online

Users browsing this forum: Fess [Nagios Bot] and 9 guests