dhcpd-snmp

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

Moderators: Developers, Moderators

barbereaus
Posts: 3
Joined: Thu Nov 24, 2011 3:10 am

Re: dhcpd-snmp

Post by barbereaus »

tosage wrote:Hello all,

I put my templates for graph dhcp3-server under Linux :D
I give you a little howto for the installation/configuration on your dhcp3 server and on your cacti server.

Good Luck :wink:

EDIT : Correction of the error recovery by andreukit, thanks ;)
Hi Tosage,
in your howto you mention some cacti graph templates (cacti_graph_template_dhcpd_-_shared_network_state.xml and cacti_graph_template_dhcpd_-_network_state.xml) but dont specify where to find them.
Can you let me know?

Thanks,
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: dhcpd-snmp

Post by tosage »

I have put the two Template, sorry for forgetting :oops:
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
barbereaus
Posts: 3
Joined: Thu Nov 24, 2011 3:10 am

Re: dhcpd-snmp

Post by barbereaus »

tosage wrote:I have put the two Template, sorry for forgetting :oops:
Thanks. That worked for me.
You may also want to provide the data query templates for people to import.

Anyway, merci.
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: dhcpd-snmp

Post by tosage »

OK, it's do :D

De rien ;)
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
gaudy2001
Posts: 3
Joined: Wed Mar 14, 2012 6:11 am
Location: Córdoba - España

Re: dhcpd-snmp

Post by gaudy2001 »

Hola,

perdonar que escriba en español, pero mi ingles es muy malo y no soy capaz de hacer funcionar estas gráficas.
Necesito urgentemente monitorizar el estado de los DHCP's de mi red. ¿Alquien me podria hechar una mano?.

Un saludo.
gymmarn
Posts: 2
Joined: Wed Sep 15, 2010 8:04 am

Re: dhcpd-snmp

Post by gymmarn »

tosage wrote:Hello all,

I put my templates for graph dhcp3-server under Linux :D
I give you a little howto for the installation/configuration on your dhcp3 server and on your cacti server.

Good Luck :wink:

EDIT : Correction of the error recovery by andreukit, thanks ;)
EDIT2 : Put the Zip with the two Graph Template and Data Queries, i had forgotten :/
Thank you for these scripts! I only have 1 tiny problem, the SNMP doesn't return all the pools to my cacti.

In my dhcpstats.csv I got 253 unique IP ranges. But when I try to get them via SNMP I only get 164.
Even tried checking it manually via cli on my cacti hos:

root@cacti-srv#snmpwalk -v1 -c public <MY IP> .1.3.6.1.4.1.2021.250.255.2 | wc -l
164 <- sigh :(

Probably the problem lies with the perl script, /etc/dhcp/dhcp-network-stat.pl

Any tips is greatly appreciated!
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: dhcpd-snmp

Post by tosage »

Hello gymmarn,

Can you put the Line 34
my $dbg=0;
to
my $dbg=1;

And put the result on the forum ?

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
sdankner
Posts: 2
Joined: Wed Feb 13, 2013 3:50 pm

Re: dhcpd-snmp

Post by sdankner »

Hello all,

Sorry to necro this thread, however I'm trying to implement the dhcpd-snmp method of getting statistics back on my Linux DHCP Server. I have the script working, and the values are coming in via SNMP when requested.

The problem is that the graph is adding the data as kilobytes instead of the real numbers. For example: If the number of addresses in the pol is 4096, it is added to the graph as 4.09k.

I've tried setting the GPRINT to Exact Number, and that does not solve the issue. Does anyone know what I can do to correct this?

Thank you
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: dhcpd-snmp

Post by tosage »

Hello,

Normally there is the value to change for each item.
Graph Template items.png
Graph Template items.png (30.42 KiB) Viewed 5098 times
I test on my installation now and I could see the changes in real time (after a refresh of my web page :))
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
sdankner
Posts: 2
Joined: Wed Feb 13, 2013 3:50 pm

Re: dhcpd-snmp

Post by sdankner »

I've tried matching your settings, but unfortunately my graph is still displaying the values as 4.09k.
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: dhcpd-snmp

Post by tosage »

@sdankner : Sorry to reply so late, your Gprint Preset Exact Numbers as below :
You can find it in Graph Management - Gprint Presets

%8.0lf
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
elbuit
Posts: 7
Joined: Tue Feb 15, 2011 7:37 am

Re: dhcpd-snmp

Post by elbuit »

gymmarn wrote: In my dhcpstats.csv I got 253 unique IP ranges. But when I try to get them via SNMP I only get 164.
Even tried checking it manually via cli on my cacti hos:
Same happens to me.
It's due a sort OID mechanism in dhcp-network-stat.pl.
If you have'nt more than 10 pools, nothing happens, but if you have more than ten:

Code: Select all

getnext
.1.3.6.1.4.1.2021.250.255.1.1
.1.3.6.1.4.1.2021.250.255.1.10
And not .1.3.6.1.4.1.2021.250.255.1.2.

To solve this, I sorted OIDs using this code:
http://codelab.ferrarihaines.com/archives/76

I attach dhcp-network-stat.pl pachetd.
Attachments
dhcp-network-stat.pl
(14.43 KiB) Downloaded 359 times
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: dhcpd-snmp

Post by tosage »

Thanks for your work :)
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
D43m0n
Posts: 7
Joined: Wed Jun 01, 2005 2:09 am

Re: dhcpd-snmp

Post by D43m0n »

Hi Tosage,

I've downloaded your much appreciated scripts and templates. I've got snmp output, except cacti isn't graphing yet (the rrd file isn't created).

So far I've followed your "HOWTO - Installation.txt" to the letter. The part in the "HOWTO" that confuses me, is action number 8, to go to Devices -> DHCP host -> Add Graph Template (which is what I assume is you advise us to do). In the manual it says:
Go on your DHCPD Server, select DHCPD Network if you want graph one or more network and Verbose.
If you want graph all your Shared Network, select DHCPD Shared Network and verbose
Click on Create Graphs for this host and select what you want graph.
I can't choose "Verbose" when adding a Graph Template. But when I choose one or both "DHCPD - Shared Network State" or "DHCPD - Network State" templates, I need to enter something:
add_graph_template.png
add_graph_template.png (20.96 KiB) Viewed 4350 times
What do I need to enter here?

I'm running Cacti 0.8.7g BTW
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: dhcpd-snmp

Post by tosage »

Hello,

Maybe is not "clear" in my HOW TO :) but to activate the dhcpd template you need to :

1 - Import all zipped xml in your CACTI server
2 - Put all perl script in your dhcpd server, etc...
3 - In the front-end Cacti, go in the sub menu Devices and enter in your dhcpd server
4 - In Associated Data Queries section, select the data query DHCPD - Network State or DHCPD - Shared Network State
5 - Click on Verbose to see if it's works :) (you should wait a few minutes that scripts are do theirs jobs)

David

PS : Sorry, my english is what it is :)
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
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests