|
|
| Author |
Message |
CdG
Joined: 20 Jun 2006 Posts: 13
|
Posted: Tue Jun 20, 2006 9:22 am Post subject: dhcpd-snmp |
|
|
Hi all,
I've created a template to monitor dhcp usage using the dhcpd-snmp you can find at:
http://www.net-track.ch/opensource/dhcpd-snmp/
The perlscript creates a configfile for dhcpd-snmp from dhcpd.conf.
Please see if you like it.
CdG
| Description: |
|
 Download |
| Filename: |
dhcpd-snmp.zip |
| Filesize: |
4.3 KB |
| Downloaded: |
1138 Time(s) |
|
|
| Back to top |
|
 |
CdG
Joined: 20 Jun 2006 Posts: 13
|
Posted: Tue Jun 20, 2006 10:22 am Post subject: |
|
|
<Sigh>
of course I forgot to include the snmp_queries xml-file.
| Description: |
|
 Download |
| Filename: |
dhcpd-snmp.xml |
| Filesize: |
1.76 KB |
| Downloaded: |
1161 Time(s) |
|
|
| Back to top |
|
 |
dw
Joined: 03 Aug 2006 Posts: 1
|
Posted: Thu Aug 03, 2006 10:04 am Post subject: |
|
|
I came a cross this post and was pleased to see some one made a nice .xml file for using the package dhcp-snmp. I haven't found anything else that could help me.
I downloaded the .xml file and tried importing it, cacti didn't show me the messages I was hoping to see "adding template ...", you probably know waht I mean.
I'm using the latest cact at the moment, which is 0.8.6h.
After some experimenting with the .xml file I finally noticed it's not a .xml template for a graph or data objects. It actually is a .xml "data query template" file. Which I placed at the <path_cacti>/resource/snmp_queries/ location and added it as a query file to cacti.
As you might have noticed I'm "new" to cacti, because I recently installed it and still getting new ideas to put into cacti.
I've been toying around with all kinds of different ways to get the info I wanted out of SNMP and finally managed to generate a nice graph.
I just finished the template and haven't had much testing yet.. The graph is included at this post.
I also included my graph template, so people who're interessted on this topic can try it out themselves. Maybe more experianced people could have a look at this and comment to this?
Before I forget: Tnx CdG for posting this .xml file, it did help me alot to go
investigate and understand cacti a bit more
,
DW
| Description: |
|
| Filesize: |
23.42 KB |
| Viewed: |
15217 Time(s) |

|
| Description: |
| My first cacti template :) |
|
 Download |
| Filename: |
cacti_graph_template_dhcp_snmp.xml |
| Filesize: |
25.45 KB |
| Downloaded: |
653 Time(s) |
|
|
| Back to top |
|
 |
fhuber
Joined: 07 Aug 2006 Posts: 1
|
Posted: Mon Aug 07, 2006 4:57 am Post subject: Modified Data Template |
|
|
Hi!
I checked out your template and modified it, so that all data sources are put together in one template. IMHO it is a little bit more handy.
Now you can create more pools in dhcpd-snmp.conf and when creating graphs, a list of available pools is autocreated by get-snmp-data (indexed).
Fhuber
| Description: |
| Modified data template (all data sources in one template) |
|
 Download |
| Filename: |
cacti_graph_template_dhcp_statistics_snmp.xml |
| Filesize: |
19.6 KB |
| Downloaded: |
864 Time(s) |
|
|
| Back to top |
|
 |
egarnel Cacti Pro User
Joined: 21 Nov 2002 Posts: 630 Location: Austin, TX
|
Posted: Wed Aug 09, 2006 10:04 am Post subject: |
|
|
Ok, I am trying this out.
I have the snmp part working fine, but I am a little confused on which xml file goes where...
Does the xml file inlcluded in the zip go under <cacti>/resource/snmp_queries ? that is where I put it.
and which of the posted xml files needs to be imported? I imported the last one for multple scopes without any problems.
Also, do I need to spec any custom data when creating the graph (OID, etc...)
So far this is what I get with graph debugging on
| Code: |
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="dhcp2 - DHCP |query_dhcpSnmpPoolDescription| Statistics" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="# leases" \
--slope-mode \
DEF:a="/var/www/html/rra/dhcp2_poolactive_1169.rrd":PoolActive:AVERAGE \
DEF:b="/var/www/html/rra/dhcp2_poolactive_1169.rrd":PoolAvailable:AVERAGE \
DEF:c="/var/www/html/rra/dhcp2_poolactive_1169.rrd":PoolExpire:AVERAGE \
DEF:d="/var/www/html/rra/dhcp2_poolactive_1169.rrd":PoolSize:AVERAGE \
LINE2:a#4444FF:"Active leases" \
GPRINT:a:LAST:" Current\:%8.2lf%s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n" \
LINE2:b#00CF00:"Available leases" \
GPRINT:b:LAST:"Current\:%8.2lf%s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:b:MAX:"Maximum\:%8.2lf%s\n" \
LINE2:c#F51D30:"Expired leases" \
GPRINT:c:LAST:" Current\:%8.2lf%s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:c:MAX:"Maximum\:%8.2lf%s\n" \
LINE2:d#CCBB00:"Pool size" \
GPRINT:d:LAST:" Current\:%8.2lf%s" \
GPRINT:d:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:d:MAX:"Maximum\:%8.2lf%s\n"
RRDTool Says:
ERROR: opening '/var/www/html/rra/dhcp2_poolactive_1169.rrd': No such file or directory |
No entries in cacti.log, but I need to bump up the logging level and check again
This is a really awesome script and we could definately make use of it, but not quite there yet..
thanks for your help
|
|
| Back to top |
|
 |
EvolutionW
Joined: 12 Apr 2006 Posts: 1
|
Posted: Fri Aug 11, 2006 5:40 pm Post subject: |
|
|
| Same problem here, I put the first .xml in the path dw specified but can't import the template egarnel or fhuber made, but thank you for the files, nice work.
|
|
| Back to top |
|
 |
kagoryu
Joined: 08 Dec 2005 Posts: 6
|
Posted: Tue Aug 15, 2006 4:33 am Post subject: |
|
|
i'm having problems installing the dhcpd-snmp script.
when i test it :
[root@devbox]# dhcpd-snmp dhcpd-snmp.conf
PING
PONG
get
.1.3.6.1.4.1.21695.1.2.1
NONE
from the readme it says i should be getting three lines: the OID, ``integer'', and the number of configured pools.
thanks.
|
|
| Back to top |
|
 |
scramatte
Joined: 14 Oct 2006 Posts: 2
|
Posted: Sat Oct 14, 2006 10:20 am Post subject: About Custom datas fields ... |
|
|
Hello,
Does anyone know which values I must put in 3 custom fields :
Index Type
Index Value
Output Type ID
Seems that without this values the template can't works ...
Regards
|
|
| Back to top |
|
 |
CdG
Joined: 20 Jun 2006 Posts: 13
|
Posted: Thu Oct 26, 2006 5:45 am Post subject: |
|
|
OK, I realise that my original post was a bit premature.
I've created a graph and host template to go with it.
Good luck!
| Description: |
|
| Filesize: |
14.98 KB |
| Viewed: |
13379 Time(s) |

|
| Description: |
|
 Download |
| Filename: |
dhcpd-snmp.zip |
| Filesize: |
6.04 KB |
| Downloaded: |
1150 Time(s) |
|
|
| Back to top |
|
 |
egarnel Cacti Pro User
Joined: 21 Nov 2002 Posts: 630 Location: Austin, TX
|
Posted: Thu Oct 26, 2006 8:10 am Post subject: |
|
|
Under the data template, you have the Max value set to 254. This is great if the lease is for a 24bit subnet, but I have a 16 bit subnet dhcp scope being dished out from the same dhcp server as well.
I can duplicate the templates and mod the new one for the 16 bit graph and use seperate templates for the different scopes, but I was wondering if there is an easier way? Perhaps make use of the "Use Per-Data Source Value (Ignore this Value)"?
Either way, I have graphs now. Thank you for providing this template.
|
|
| Back to top |
|
 |
grumpf-dream
Joined: 06 Sep 2006 Posts: 14
|
Posted: Thu Oct 26, 2006 9:33 am Post subject: Re: About Custom datas fields ... |
|
|
| scramatte wrote: | Hello,
Does anyone know which values I must put in 3 custom fields :
Index Type
Index Value
Output Type ID
Seems that without this values the template can't works ...
Regards |
same question here
|
|
| Back to top |
|
 |
egarnel Cacti Pro User
Joined: 21 Nov 2002 Posts: 630 Location: Austin, TX
|
Posted: Thu Oct 26, 2006 10:27 am Post subject: |
|
|
Couldn't figure out why this was working on 1 dhcp server but not the other...
a quick look at /var/log/messages showed that selinux was blocking it.
a quick "setenforce Permissive" fixed it. I will go back and edit my policies to add the script
|
|
| Back to top |
|
 |
grumpf-dream
Joined: 06 Sep 2006 Posts: 14
|
Posted: Thu Oct 26, 2006 11:06 am Post subject: |
|
|
| CdG wrote: | OK, I realise that my original post was a bit premature.
I've created a graph and host template to go with it.
Good luck! |
great job!
working perfect
mv xml to snmp_queries import other one graphing
thx!
|
|
| Back to top |
|
 |
CdG
Joined: 20 Jun 2006 Posts: 13
|
Posted: Fri Oct 27, 2006 7:38 am Post subject: |
|
|
| egarnel wrote: | Under the data template, you have the Max value set to 254. This is great if the lease is for a 24bit subnet, but I have a 16 bit subnet dhcp scope being dished out from the same dhcp server as well.
I can duplicate the templates and mod the new one for the 16 bit graph and use seperate templates for the different scopes, but I was wondering if there is an easier way? Perhaps make use of the "Use Per-Data Source Value (Ignore this Value)"?
Either way, I have graphs now. Thank you for providing this template. |
This Max value is in the graph template posted by fhuber. The one in the zipfile I posted only has a Max value for expired leases, which I currently do not graph. But I agree: the 'Per-Data Source Value' might be better.
CdG
|
|
| Back to top |
|
 |
jokerz
Joined: 26 Oct 2006 Posts: 13
|
Posted: Fri Oct 27, 2006 2:28 pm Post subject: |
|
|
I am trying to follow the direction on how to import this into my cacti but it is just not working.. is there a how-to guide on proper importing of these scripts/ templates...
I keep getting this error msg:
Warning: file(c:/Inetpub/wwwroot/cacti/resource/snmp_queries/dhcpd-snmp.xml) [function.file]: failed to open stream: Permission denied in c:\Inetpub\wwwroot\cacti\lib\data_query.php on line 79
Warning: implode() [function.implode]: Bad arguments. in c:\Inetpub\wwwroot\cacti\lib\data_query.php on line 79
please note my dhcpd is a win2k3 server.
|
|
| Back to top |
|
 |
|