dhcpd-snmp
Moderators: Developers, Moderators
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
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
- Attachments
-
- dhcpd-snmp.zip
- (4.3 KiB) Downloaded 5760 times
<Sigh>
of course I forgot to include the snmp_queries xml-file.
of course I forgot to include the snmp_queries xml-file.
- Attachments
-
- dhcpd-snmp.xml
- (1.76 KiB) Downloaded 4498 times
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
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
- Attachments
-
- cacti_graph_template_dhcp_snmp.xml
- My first cacti template :)
- (25.45 KiB) Downloaded 2950 times
-
- My dhcp-snmp graph
- graph_image.php.png (23.42 KiB) Viewed 73816 times
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
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
- Attachments
-
- cacti_graph_template_dhcp_statistics_snmp.xml
- Modified data template (all data sources in one template)
- (19.6 KiB) Downloaded 3438 times
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
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
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: Select all
/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
This is a really awesome script and we could definately make use of it, but not quite there yet..
thanks for your help
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
-
- Posts: 1
- Joined: Wed Apr 12, 2006 12:19 pm
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
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
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!
I've created a graph and host template to go with it.
Good luck!
- Attachments
-
- dhcp.png (14.98 KiB) Viewed 71977 times
-
- dhcpd-snmp.zip
- (6.04 KiB) Downloaded 5381 times
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.
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.
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
-
- Posts: 14
- Joined: Wed Sep 06, 2006 12:59 am
Re: About Custom datas fields ...
same question herescramatte 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
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
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
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
-
- Posts: 14
- Joined: Wed Sep 06, 2006 12:59 am
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.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.
CdG
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.
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.
Who is online
Users browsing this forum: No registered users and 0 guests