Graphing DHCP pools

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Graphing DHCP pools

project722
Yes x2. I have the appropriate line in /etc/snmp/snmpd.conf:

pass_persist .1.3.6.1.4.1.21695.1.2 /home/nagios/dhcpd-snmp /home/nagios/dhcpd-snmp.conf

And I am able to poll other OID's remotely.

root 02:29:38 0 jobs ~ > snmpwalk -v2c -On <host> -c public
.1.3.6.1.2.1.1.1.0 = STRING: Linux <host> 2.6.32-696.13.2.el6.x86_64 #1 SMP Fri Sep 22 12:32:14 EDT 2017 x86_64
.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.8072.3.2.10
.1.3.6.1.2.1.1.3.0 = Timeticks: (123002397) 14 days, 5:40:23.97
.1.3.6.1.2.1.1.4.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
.1.3.6.1.2.1.1.5.0 = STRING: localhost
.1.3.6.1.2.1.1.6.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
.1.3.6.1.2.1.1.8.0 = Timeticks: (2) 0:00:00.02
.1.3.6.1.2.1.1.9.1.2.1 = OID: .1.3.6.1.6.3.11.2.3.1.1
.1.3.6.1.2.1.1.9.1.2.2 = OID: .1.3.6.1.6.3.15.2.1.1
.1.3.6.1.2.1.1.9.1.2.3 = OID: .1.3.6.1.6.3.10.3.1.1
.1.3.6.1.2.1.1.9.1.2.4 = OID: .1.3.6.1.6.3.1
.1.3.6.1.2.1.1.9.1.2.5 = OID: .1.3.6.1.2.1.49
.1.3.6.1.2.1.1.9.1.2.6 = OID: .1.3.6.1.2.1.4
.1.3.6.1.2.1.1.9.1.2.7 = OID: .1.3.6.1.2.1.50
.1.3.6.1.2.1.1.9.1.2.8 = OID: .1.3.6.1.6.3.16.2.2.1
.1.3.6.1.2.1.1.9.1.3.1 = STRING: The MIB for Message Processing and Dispatching.
.1.3.6.1.2.1.1.9.1.3.2 = STRING: The MIB for Message Processing and Dispatching.
.1.3.6.1.2.1.1.9.1.3.3 = STRING: The SNMP Management Architecture MIB.
.1.3.6.1.2.1.1.9.1.3.4 = STRING: The MIB module for SNMPv2 entities
.1.3.6.1.2.1.1.9.1.3.5 = STRING: The MIB module for managing TCP implementations
.1.3.6.1.2.1.1.9.1.3.6 = STRING: The MIB module for managing IP and ICMP implementations
.1.3.6.1.2.1.1.9.1.3.7 = STRING: The MIB module for managing UDP implementations
.1.3.6.1.2.1.1.9.1.3.8 = STRING: View-based Access Control Model for SNMP.
.1.3.6.1.2.1.1.9.1.4.1 = Timeticks: (2) 0:00:00.02
.1.3.6.1.2.1.1.9.1.4.2 = Timeticks: (2) 0:00:00.02
.1.3.6.1.2.1.1.9.1.4.3 = Timeticks: (2) 0:00:00.02
.1.3.6.1.2.1.1.9.1.4.4 = Timeticks: (2) 0:00:00.02
.1.3.6.1.2.1.1.9.1.4.5 = Timeticks: (2) 0:00:00.02
.1.3.6.1.2.1.1.9.1.4.6 = Timeticks: (2) 0:00:00.02
.1.3.6.1.2.1.1.9.1.4.7 = Timeticks: (2) 0:00:00.02
.1.3.6.1.2.1.1.9.1.4.8 = Timeticks: (2) 0:00:00.02
.1.3.6.1.2.1.25.1.1.0 = Timeticks: (574473501) 66 days, 11:45:35.01
.1.3.6.1.2.1.25.1.1.0 = No more variables left in this MIB View (It is past the end of the MIB tree)


root 02:31:25 0 jobs ~ > snmpget -v2c -On -c public <host> .1.3.6.1.2.1.1.5.0
.1.3.6.1.2.1.1.5.0 = STRING: localhost

When I try to poll the OID listed in snmpd.conf from the "pass_persists" line, it fails. 

root 02:33:53 0 jobs ~ > snmpget -v2c -On -c public <host> .1.3.6.1.4.1.21695.1.2
.1.3.6.1.4.1.21695.1.2 = No Such Object available on this agent at this OID

What am I missing?



On Thu, Dec 21, 2017 at 1:06 PM, David Ramage <[hidden email]> wrote:

That dhcpd-snmp.conf looks good to me, so I’m afraid I have to ask you a couple of other questions.

 

Are you able to poll any OIDs from your server at all?

 

If you are, do you have the pass-through MIB extension in your sntmpd.conf?

 

 

 

From: dhcp-users [mailto:[hidden email]] On Behalf Of project722
Sent: Thursday, December 21, 2017 10:51 AM
To: Users of ISC DHCP <[hidden email]>
Subject: Re: Graphing DHCP pools

 

@David Rampage - I am still wrestling with that error when poling externally. Here is my dhcpd-snmp.conf file structure, as you requested. 

 

# Configuration file for dhcpd-snmp

 

# Path to the dhcpd.leases file.

#

# leases: /var/lib/dhcp3/dhcpd.leases

 

leases: /var/lib/dhcpd/dhcpd.leases

 

# Definition of the pools

#

# pool: number, description, from-to, from-to, from-to...

 

pool: 1, "Market 1", 192.168.100.100 192.168.100.254 192.168.101.100 192.168.101.254

 

pool: 2, "Market 2", 192.168.200.100 192.168.200.254 192.168.201.100 192.168.201.254

 

pool: 3, "Market 3", 192.168.202.100 192.168.202.254 192.168.203.100 192.168.203.254

 

 

Just to recap, I can run the dhcpd-snmp script locally, and it works. But if I try an smnpwalk from a remote device, I get the following error:

 

#snmpwalk -v 2c <host> -c public .1.3.6.1.4.1.21695.1.2

SNMPv2-SMI::enterprises.21695.1.2 = No more variables left in this MIB View (It is past the end of the MIB tree)

 

Do I need to place some dhcpd-snmp specific MIB's somewhere on the server?

 

 

On Thu, Dec 7, 2017 at 3:34 PM, Simon Hobson <[hidden email]> wrote:

project722 <[hidden email]> wrote:

> I'm going to look into Cacti, as we will probably not deem this high enough on the priority list to purchase Solarwinds. But, for the moment, I have setup dhcpd-snmp on my DHCP server.

Just a thought ...
Cacti doesn't HAVE to use SNMP, you can supply your own data externally. So you could use any means of extracting the pool status and insert that into RRD files, and let Cacti handle the graphing. Obviously it starts getting more complicated if the DHCP and Cacti servers are on different hosts.


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users

 


The information contained in this email and any attachments may be privileged, confidential, and/or proprietary and is intended solely for the use of the person(s) to whom it is addressed. If you are not the intended recipient, any review, retransmission, dissemination or any other use of the information contained in this email and any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please notify the sender immediately by replying to this email and then delete this material from any system that it may be on. LightSpeed Networks, Inc. does not accept responsibility for any changes made to the information contained in this communication after it was originally sent.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Graphing DHCP pools

Anderson, Charles R
Are you able to run /home/nagios/dhcpd-snmp manually?  Maybe you are missing a module, maybe you need to fix SELinux attributes, ...

On Thu, Dec 21, 2017 at 02:36:57PM -0600, project722 wrote:
> Yes x2. I have the appropriate line in /etc/snmp/snmpd.conf:
>
> pass_persist .1.3.6.1.4.1.21695.1.2 /home/nagios/dhcpd-snmp
> /home/nagios/dhcpd-snmp.conf
>
> And I am able to poll other OID's remotely.
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Graphing DHCP pools

project722
Yes, the script runs locally without issue. SELinix is set to permissive. 

On Thu, Dec 21, 2017 at 2:50 PM, Chuck Anderson <[hidden email]> wrote:
Are you able to run /home/nagios/dhcpd-snmp manually?  Maybe you are missing a module, maybe you need to fix SELinux attributes, ...

On Thu, Dec 21, 2017 at 02:36:57PM -0600, project722 wrote:
> Yes x2. I have the appropriate line in /etc/snmp/snmpd.conf:
>
> pass_persist .1.3.6.1.4.1.21695.1.2 /home/nagios/dhcpd-snmp
> /home/nagios/dhcpd-snmp.conf
>
> And I am able to poll other OID's remotely.
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

RE: Graphing DHCP pools

David Ramage

I do not see anything in your config that looks out of the ordinary.

 

The first thing I’d try is restarting snmpd while watching your syslog.  There may be some useful stuff written to syslog when the daemon is restarted that can get you on the right path.

 

Failing that, I’d stop the snmp daemon and run it in the foreground (as root) to see if it spits out anything insightful.  IIRC the syntax is snmpd –f –c [path/to/snmpd.conf]

From: dhcp-users [mailto:[hidden email]] On Behalf Of project722
Sent: Thursday, December 21, 2017 1:05 PM
To: Users of ISC DHCP <[hidden email]>
Subject: Re: Graphing DHCP pools

 

Yes, the script runs locally without issue. SELinix is set to permissive. 

 

On Thu, Dec 21, 2017 at 2:50 PM, Chuck Anderson <[hidden email]> wrote:

Are you able to run /home/nagios/dhcpd-snmp manually?  Maybe you are missing a module, maybe you need to fix SELinux attributes, ...

On Thu, Dec 21, 2017 at 02:36:57PM -0600, project722 wrote:
> Yes x2. I have the appropriate line in /etc/snmp/snmpd.conf:
>
> pass_persist .1.3.6.1.4.1.21695.1.2 /home/nagios/dhcpd-snmp
> /home/nagios/dhcpd-snmp.conf
>
> And I am able to poll other OID's remotely.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users

 


The information contained in this email and any attachments may be privileged, confidential, and/or proprietary and is intended solely for the use of the person(s) to whom it is addressed. If you are not the intended recipient, any review, retransmission, dissemination or any other use of the information contained in this email and any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please notify the sender immediately by replying to this email and then delete this material from any system that it may be on. LightSpeed Networks, Inc. does not accept responsibility for any changes made to the information contained in this communication after it was originally sent.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Graphing DHCP pools

project722
I see this in syslog and when running snmpd in the foreground. 

Dec 22 09:19:02 <host> snmpd[6816]: Duplicate IPv4 address detected, some interfaces may not be visible in IP-MIB

[root~]# /usr/sbin/snmpd -Lo -p /var/run/snmpd.pid -a
Duplicate IPv4 address detected, some interfaces may not be visible in IP-MIB

Now, while this may appear to be a problem, keep in mind that I can remotely do an snmpget to other OID's. The breakdown seems to be limited to the OID for dhcpd-snmp. 

And, just to provide a background on the duplicate IP address message, the server does not have duplicate IP's but rather 2 different IPv4 addresses assigned to a single interface. So, my guess is this is what's being detected by snmpd. 



On Thu, Dec 21, 2017 at 3:36 PM, David Ramage <[hidden email]> wrote:

I do not see anything in your config that looks out of the ordinary.

 

The first thing I’d try is restarting snmpd while watching your syslog.  There may be some useful stuff written to syslog when the daemon is restarted that can get you on the right path.

 

Failing that, I’d stop the snmp daemon and run it in the foreground (as root) to see if it spits out anything insightful.  IIRC the syntax is snmpd –f –c [path/to/snmpd.conf]

From: dhcp-users [mailto:[hidden email]] On Behalf Of project722
Sent: Thursday, December 21, 2017 1:05 PM
To: Users of ISC DHCP <[hidden email]>
Subject: Re: Graphing DHCP pools

 

Yes, the script runs locally without issue. SELinix is set to permissive. 

 

On Thu, Dec 21, 2017 at 2:50 PM, Chuck Anderson <[hidden email]> wrote:

Are you able to run /home/nagios/dhcpd-snmp manually?  Maybe you are missing a module, maybe you need to fix SELinux attributes, ...

On Thu, Dec 21, 2017 at 02:36:57PM -0600, project722 wrote:
> Yes x2. I have the appropriate line in /etc/snmp/snmpd.conf:
>
> pass_persist .1.3.6.1.4.1.21695.1.2 /home/nagios/dhcpd-snmp
> /home/nagios/dhcpd-snmp.conf
>
> And I am able to poll other OID's remotely.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users

 


The information contained in this email and any attachments may be privileged, confidential, and/or proprietary and is intended solely for the use of the person(s) to whom it is addressed. If you are not the intended recipient, any review, retransmission, dissemination or any other use of the information contained in this email and any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please notify the sender immediately by replying to this email and then delete this material from any system that it may be on. LightSpeed Networks, Inc. does not accept responsibility for any changes made to the information contained in this communication after it was originally sent.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
12