Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Jun 27, 2019 5:21 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: FreeBSD Packet Filter flow templates.
PostPosted: Thu Feb 01, 2007 5:13 am 
Offline
Cacti User

Joined: Wed May 26, 2004 10:49 am
Posts: 70
Location: Barcelona
Hi!
This is templates for monitoring FreeBSD Packet Filter flow statistics. Tested on cacti-0.8.6h.
Works only on snmp version above 1.

For now I'v wrote only templates for querying bytes in/out, but there is(in pf-mib) also a lot of other info(altq,states,tables,etc), so someone could easy improvement this.
Feedback is appreciated.


Attachments:
pff.png
pff.png [ 35.18 KiB | Viewed 23944 times ]
pf_flow.xml [2.05 KiB]
Downloaded 2248 times
cacti_graph_template_bsd_packet_filter_flow.xml [20.52 KiB]
Downloaded 1798 times
cacti_data_template_packet_filter_statistic.xml [8.32 KiB]
Downloaded 1522 times
cacti_data_query_packet_filter_statistic.xml [22.29 KiB]
Downloaded 1548 times


Last edited by idle on Wed Jan 16, 2008 1:48 am, edited 3 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 02, 2007 8:38 am 
Offline
Cacti User

Joined: Fri Feb 02, 2007 8:36 am
Posts: 78
Location: Eindhoven/The Netherlands
Hello idle,

Looks great, but the data query looks for a pf_flow.xml.
Could you please include this file with you post?
Thank you!

--Mark


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 02, 2007 9:25 am 
Offline
Cacti User

Joined: Wed May 26, 2004 10:49 am
Posts: 70
Location: Barcelona
Oops, I thought all templates exporting from cacti interface... somehow its not true...
Added.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 02, 2007 8:31 pm 
Offline
Cacti User

Joined: Fri Feb 02, 2007 8:36 am
Posts: 78
Location: Eindhoven/The Netherlands
Seems to be working great! Thank you!

I'm using it now on a few pfSense firewalls.


Top
 Profile  
 
 Post subject: Re: FreeBSD Packet Filter flow templates.
PostPosted: Sun Mar 11, 2007 7:38 am 
Offline
Cacti User

Joined: Sat Oct 29, 2005 4:05 pm
Posts: 89
Location: Wuerzburg
idle wrote:
Hi!
This is templates for monitoring FreeBSD Packet Filter flow statistics. Tested on cacti-0.8.6h.
Image


Hi,
I have no Packetfilter mib for my FreeBSD. Where did you get yours? The mentioned pf-mib is just for OpenBSD.

Regards
Dagonet


Top
 Profile  
 
 Post subject: Re: FreeBSD Packet Filter flow templates.
PostPosted: Mon Mar 12, 2007 2:56 am 
Offline
Cacti User

Joined: Wed May 26, 2004 10:49 am
Posts: 70
Location: Barcelona
dagonet wrote:
Hi,
I have no Packetfilter mib for my FreeBSD. Where did you get yours? The mentioned pf-mib is just for OpenBSD.

Regards
Dagonet


Code:
[[email protected] ~]#locate BEGEMOT-PF-MIB
/usr/local/share/snmp/mibs/BEGEMOT-PF-MIB.txt
/usr/share/snmp/mibs/BEGEMOT-PF-MIB.txt
/usr/src/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt
[[email protected] ~]#uname -rs
FreeBSD 6.1-RELEASE


Top
 Profile  
 
 Post subject: Re: FreeBSD Packet Filter flow templates.
PostPosted: Wed Mar 28, 2007 2:57 pm 
Offline
Cacti User

Joined: Sat Oct 29, 2005 4:05 pm
Posts: 89
Location: Wuerzburg
Code:
[[email protected] ~]#locate BEGEMOT-PF-MIB
/usr/local/share/snmp/mibs/BEGEMOT-PF-MIB.txt
/usr/share/snmp/mibs/BEGEMOT-PF-MIB.txt
/usr/src/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt
[[email protected] ~]#uname -rs
FreeBSD 6.1-RELEASE
[/quote]
Thanks for your answer. So, as far as I can see, you are not using net-snmp but the bsnmpd of FreeBSD.

Dagonet


Top
 Profile  
 
 Post subject: Re: FreeBSD Packet Filter flow templates.
PostPosted: Thu Mar 29, 2007 1:38 am 
Offline
Cacti User

Joined: Wed May 26, 2004 10:49 am
Posts: 70
Location: Barcelona
dagonet wrote:
Thanks for your answer. So, as far as I can see, you are not using net-snmp but the bsnmpd of FreeBSD.

Dagonet

I'm using both.
I didn't found how to attach pf-mib to net-snmp, so I make it in a short/lazy way(although I guess there should be better one).
I'v bind bsnmpd to other port and setup snmp-proxy.
Following have to be done to make this work.
Edit /etc/snmp.config to change community string and port.
Code:
read := "community" # community string
begemotSnmpdPortStatus.127.0.0.1.3408 = 1 # I choose 3408 for differ port.
begemotSnmpdModulePath."pf"     = "/usr/lib/snmp_pf.so" # uncomment for pf stats

Edit /usr/local/share/snmp/snmpd.conf to add proxy string:
Code:
proxy -v 2c -c community localhost:3408 .1.3.6.1.4.1.12325

Restart bsnmpd, snmpd and check.
Good luck.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 07, 2007 12:20 pm 
Offline

Joined: Fri Sep 07, 2007 12:15 pm
Posts: 1
hi,

i get an error when running the poller
Code:
# php poller.php
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: .1.3.6.1.4.1.12325.1.200.1.8.2.1.7.4

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: .1.3.6.1.4.1.12325.1.200.1.8.2.1.10.4

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: .1.3.6.1.4.1.12325.1.200.1.8.2.1.8.4

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: .1.3.6.1.4.1.12325.1.200.1.8.2.1.9.4

OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.00 r:0.02
OK u:0.00 s:0.01 r:0.02


but when running snmpwalk it seems to work
Code:
snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.12325.1.200.1.8.2.1.8.4
SNMPv2-SMI::enterprises.12325.1.200.1.8.2.1.8.4 = Counter64: 126119760


i used the proxy method mentioned above.
(running a freebsd 6.2 system)

thx, Mike

----
D'oh!
should use snmp v2 in cacti ...
sorry for bothering you :)


Top
 Profile  
 
 Post subject: help con pf on freebsd
PostPosted: Sat Oct 13, 2007 10:18 am 
Offline

Joined: Thu Oct 04, 2007 6:35 pm
Posts: 4
Hello friends

I am trying to install your templates, and make it work, but did not get a result, when I want to create a plot, this is the message:

Data Query Debug Information
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/pf_flow.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.12325.1.200.1.8.2.1'
+ No SNMP data returned
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/pf_flow.xml'
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/pf_flow.xml'
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/pf_flow.xml'


My apology bad language, I am Cuban and used a translator
roylan


Top
 Profile  
 
 Post subject: Re: help con pf on freebsd
PostPosted: Mon Oct 15, 2007 12:44 am 
Offline
Cacti User

Joined: Wed May 26, 2004 10:49 am
Posts: 70
Location: Barcelona
linvix wrote:
+ No SNMP data returned

Check that you are using snmp above version 1.
For FreeBSD PF-MIB available through bsnmpd agent, so if you are using any other(net-snmpd as everyone) you have to hook PF-MIB into snmp-agent that you are using.
Read above for details.


Top
 Profile  
 
 Post subject: help with pf y cacti
PostPosted: Tue Oct 16, 2007 8:10 am 
Offline

Joined: Thu Oct 04, 2007 6:35 pm
Posts: 4
Hello.

Thank you for responding.

Estou using version 1 snmpd in cacti.
I read the instructions above but does not work for me.

Lso you attached files and snmp.config snmpd.conf, I ask whether this within your chances of the review ...

Thank you for help


Attachments:
File comment: net-snmpd.conf
net-snmpd.tar [2.03 KiB]
Downloaded 724 times
File comment: bsnmpd.config
bsnmpd.tar [1.19 KiB]
Downloaded 743 times
Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 16, 2007 8:48 am 
Offline
Cacti User

Joined: Wed May 26, 2004 10:49 am
Posts: 70
Location: Barcelona
Comment out first occurrence of begemotSnmpdPortStatus option in your bsnmpd.conf, you have it twice. Restart bsnmpd, check that its listen correct port:
Code:
[[email protected] ~]#sockstat -4l | grep bsnmpd
root     bsnmpd     1077  5  udp4   *:*                   *:*
root     bsnmpd     1077  7  udp4   127.0.0.1:3408        *:*
and check bsnmpd with snmpwalk:
Code:
snmpwalk -v 2c -c <community> localhost:3408 .1.3.6.1.4.1.12325
then check snmpd, same way, without port:
Code:
snmpwalk -v 2c -c <community> localhost .1.3.6.1.4.1.12325

When restarting both snmpd agents be careful - they trying to use same pid file. You have to manually edit one of them startup script, to fix it, or restart with command kill -HUP <pid>.


Last edited by idle on Wed Oct 17, 2007 12:29 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Thank you very much for your help, everything fuinciona very
PostPosted: Tue Oct 16, 2007 12:57 pm 
Offline

Joined: Thu Oct 04, 2007 6:35 pm
Posts: 4
Thank you very much for your help, everything fuinciona very well ..

roylan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 16, 2008 2:50 pm 
Offline

Joined: Sat Apr 02, 2005 3:27 am
Posts: 7
i´m running 0.8.7b Debian
cant seem to import the pf_flow_167.xml doesent return anything after import.

also when i´m trying to create graphs i get this

Data Query [Packet Filter statistic]
Error in data query.

regards /F


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group