dhcpd-snmp

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

jokerz...

this is for *ux systems only, not win32.

I started installing this.. but gave up.. the cacti bit went fine, and I figured out that you had to install dhcpd-snmp itself first, but I can't see how you set that up if your dhcp server isn't the same box as the Cacti server. what-goes-where?
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

Correction:

I was able to get this working in the end... After downloading dhcpd-snmp, make, and make install worked, I then found better instuctions in the /usr/local/sbin/dhcpd-snmp script (at the end).

Once I added the snmp line to snmpd.conf and modified the .conf script (the .pl tool mis-read my Centos DHCP config), then all was ok..
D43m0n
Posts: 7
Joined: Wed Jun 01, 2005 2:09 am

Post by D43m0n »

Hi all,

I've been struggling for a while now, but I can't get the graphs going as expected. I have 6 different scopes on one DHCP server. I want to graph them all with these great tools, but for some reason, I can't get them going like you guys.

The pool description is displayed in cacti when I want to add the graph on the host in question, but all I get is the poolSize. nothing else. When I exec an snmpwalk on the cacti host to the DHCP server, I can get all the values I want, but in cacti, this doesn't work for me.

Does anyone have a clue what I'm doing wrong?

Thanks in advance!
Attachments
cacti-dhcpd-snmp.tgz
(4.74 KiB) Downloaded 1582 times
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

Put the debug in Cacti to full, let one itteration run, then reduce the logging and take a look through the log. Look for what Cacti sees as the results.
Stephan
Posts: 6
Joined: Fri Mar 14, 2003 2:20 am

Post by Stephan »

Hi all,

just a big THANKs for this Template. It works perfectly well for our Servers with up to 15 subnets and ranges with up to a few thousands of hosts.

The only "problem" was to correct the data-sources in the template. After the import everything was set to one data-source.

bye
Stephan
paulm
Posts: 1
Joined: Wed Nov 25, 2009 6:25 pm

Post by paulm »

What are all of those correct values?
I've just set "Maximum Value" to "Use Per-Data Source Value" on dhcpdSnmpPoolActive/Available/Expire/Size .

Hopefully that will work.
I'm still very curious to know what values you dropped in, as I am also poling for very large dhcp pools (a couple /18s)
blueman176
Posts: 19
Joined: Fri Mar 05, 2010 8:18 am

Post by blueman176 »

Hello,

I'm trying to use the template but I don't succeed.
When I run the graph debug mode for the template "DHCP statistics (SNMP)" and "DHCPD statistics (SNMP)" I have this error :



RRDTool Command:

/opt/rrdtool-1.4.2/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="ServeurDHCP - DHCP |query_dhcpSnmpPoolDescription| Statistics" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="# leases" \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
LINE2:#4444FFFF:"Active leases" \
GPRINT::LAST:" Current\:%8.2lf%s" \
GPRINT::AVERAGE:"Average\:%8.2lf%s" \
GPRINT::MAX:"Maximum\:%8.2lf%s\n" \
LINE2:#00CF00FF:"Available leases" \
GPRINT::LAST:"Current\:%8.2lf%s" \
GPRINT::AVERAGE:"Average\:%8.2lf%s" \
GPRINT::MAX:"Maximum\:%8.2lf%s\n" \
LINE2:#F51D30FF:"Expired leases" \
GPRINT::LAST:" Current\:%8.2lf%s" \
GPRINT::AVERAGE:"Average\:%8.2lf%s" \
GPRINT::MAX:"Maximum\:%8.2lf%s\n" \
LINE2:#CCBB00FF:"Pool size" \
GPRINT::LAST:" Current\:%8.2lf%s" \
GPRINT::AVERAGE:"Average\:%8.2lf%s" \
GPRINT::MAX:"Maximum\:%8.2lf%s\n"

RRDTool Says:

ERROR: parameter '#4444FFFF' does not represent a number in line LINE2:#4444FFFF:Active leases


Thanks!
blueman176
Posts: 19
Joined: Fri Mar 05, 2010 8:18 am

Post by blueman176 »

An other question.
Is there any mean to use this script when the DHCP server gives only static IP addresses?
Because when DHCP server doesn't give dynamic IP, the /var/lib/dhcpd.leases file is empty. And I see that the script needs this file.

Thanks for your reply.
eqqchau
Posts: 44
Joined: Fri Nov 05, 2010 3:58 am

Re: dhcpd-snmp

Post by eqqchau »

Hi all, I am new in cacti. Could anyone give me detailed information about how to use dhcpd-snmp??

I should just import the *.xml to templates or I have to something else????

Thanks.
niobe
Cacti User
Posts: 228
Joined: Mon Mar 10, 2008 6:52 pm
Location: Australia

Re: dhcpd-snmp

Post by niobe »

Cactiers,
I have made some changes to the graph template to reflect my preferences. I think this version is easy to scan and see what is going via the 'Max Load' item. This will always display the max load for the period on-screen and is consiladated as a maximum since the main purpose (for me) is to see if I need to increase my pool size. Hopefully the CDEF used is included in the template below.
cheers,
niobe

Edit: The CDEF in the original version was not going to work on most systems. New templates and xml attached.
Attachments
cacti_graph_template_dhcpd_statistics_snmp(niobe).zip
import this
(3.96 KiB) Downloaded 1002 times
example graph
example graph
resnetdhcpload.png (30.38 KiB) Viewed 11069 times
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: dhcpd-snmp

Post by tosage »

Hello all,

Can you explain if you have load a mib in the dhcp server or on the cacti server ?
I have load the nettrack.mib and the nettrack-dhcpd-snmp.mib on my two servers but when i launch my snmpwalk i have this reurn of the command :

Code: Select all

sudo snmpwalk 10.x.x.x -c toto -v 2c .1.3.6.1.4.1.21695.1
NETTRACK-MIB::public = No Such Object available on this agent at this OID
Thanks for your help :roll:
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
niobe
Cacti User
Posts: 228
Joined: Mon Mar 10, 2008 6:52 pm
Location: Australia

Re: dhcpd-snmp

Post by niobe »

You don't need a MIB because you have the OID. The MIB is working in your example as the OID is being translated.
The problem is that your device can not find that OID in it's internal data tree, so in other words the dhcp script does not seem to have been loaded by snmpd.
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: dhcpd-snmp

Post by tosage »

Hello niobe,

You have reason, I had some difficulty understanding that I had created a file dhcpd-snmpd.conf and put my pools.
Now well configured, my server responds well at all OID :D

Now i understand what information i must put in Output Type ID / Index value / index Type

Anyway thanks you for your answer :wink:

EDIT : I forgot to import the data query that I adapted for the graph template of Niobe and it works great now :)
Thanks !
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: dhcpd-snmp

Post by tosage »

Hello people :)

I wish graph all network in a shared-network to have the availibity per network and not for all the shared-network.
Do you think is possible ? If it is possible, i need to modify the perl dhcp-snmp script ?

Thanks for yours reply :roll:

Bye
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
dahl1632
Posts: 2
Joined: Sun Nov 13, 2011 4:26 pm

Re: dhcpd-snmp

Post by dahl1632 »

Hi, got a problem with dhcpd-snmp.
Everything works OK when i start dhcpd-snmp manually. But when i debug my snmpd it says following:

ucd-snmp/pass_persist: open_persist_pipe(2,'/usr/local/sbin/dhcpd-snmp /etc/dhcpd-snmp.conf')
ucd-snmp/pass_persist: open_persist_pipe: PONG not received!

Thank you in advance
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests