rogue dhcp server detection

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
horizn
Posts: 10
Joined: Tue Oct 07, 2014 8:57 am

rogue dhcp server detection

Post by horizn »

Hi,
I am looking for rogue dhcp server detection plugin, but I would like to detect only really rogue server not every dhpc servers. so plugin should has a white list or something.
horizn
Posts: 10
Joined: Tue Oct 07, 2014 8:57 am

Re: rogue dhcp server detection

Post by horizn »

ok I've found this:
http://louismeunier.com/wp/?p=41

and it is working for me, but could someone please help me with configuration of Nagios for this?

I am trying to add to commands.cfg:

Code: Select all

define command {
       command_name    check_dhcp
       command_line    $USER1$/usr/lib/nagios/plugins/check_rogue_dhcp
       }
or

Code: Select all

define command {
       command_name    check_dhcp
       command_line    perl '/usr/lib/nagios/plugins/check_rogue_dhcp'
       }
but there is an error:

Code: Select all

Error: Could not add object property in file 'commands.cfg' on line 486.
Error processing object config files!
horizn
Posts: 10
Joined: Tue Oct 07, 2014 8:57 am

Re: rogue dhcp server detection

Post by horizn »

OK, I've added this to Nagios successfully, but I can't see it on the list of monitored servers and services.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: rogue dhcp server detection

Post by tmcdonald »

You will need to create a service that uses that command, like so:

Code: Select all

define service {
    use generic-service
    host_name somehost
    service_description Rogue DHCP Detection
    check_command check_dhcp
}

making sure to assign it to a host that makes sense in your environment. Also, check_dhcp should be an existing command already, so you might want to change the command name to check_rogue_dhcp/
Former Nagios employee
horizn
Posts: 10
Joined: Tue Oct 07, 2014 8:57 am

Re: rogue dhcp server detection

Post by horizn »

what should be placed instead of somehost? I define somehost in hosts.cfg I have to put an IP address. Which IP?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: rogue dhcp server detection

Post by tmcdonald »

I'm not familiar with how the script works, but it seems like it is scanning the network so you might be able to put it on any host.
Former Nagios employee
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: rogue dhcp server detection

Post by Box293 »

horizn wrote:what should be placed instead of somehost? I define somehost in hosts.cfg I have to put an IP address. Which IP?
Nagios services are associated with a host, it's how Nagios groups service together. If you're unsure use localhost and this service will belong to the Nagios server.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked