Traffic between 2 peers

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

Moderators: Moderators, Developers

Author
Message
jaguar
Posts: 11
Joined: Fri Jun 02, 2006 9:26 am

Traffic between 2 peers

#1 Post by jaguar » Fri Jun 02, 2006 9:52 am

Hello,

I'm looking for a template (with XML I think) which can monitor traffic between 2 peers (2 BGP sessions at IX).

On GigaEthernet 0/1, I'm connected on a switch and traffic can be monitored with MAC address.

*** On Cisco 7200 ***
Router# conf t
Router(config)# interface gi0/1
Router(config-if)# ip accounting mac-address input
Router(config-if)# ip accounting mac-address output
Router(config-if)# exit
Router(config)# exit
***

Can somebody help me ?

Thanks.
Jerome Descoux.

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#2 Post by gandalf » Fri Jun 02, 2006 1:01 pm

There's no need for cross-posting. So I deleted the other one ...
Reinhard

jaguar
Posts: 11
Joined: Fri Jun 02, 2006 9:26 am

#3 Post by jaguar » Mon Jun 12, 2006 2:53 pm

OK. All is OK. I have created XML + PHP for monitoring traffic between peering sessions in an IX for example (Panap, FreeIX, AMSIX ...) with ip accounting.

CACTI USERS:
Please contact me if you are interested in it.
Jerome Descoux.

Wunk
Posts: 37
Joined: Fri Mar 05, 2004 8:34 am
Contact:

#4 Post by Wunk » Mon Jun 19, 2006 10:19 am

I'm interested.., how are you monitoring it ?
Jeroen Wunnink
Easyhosting.nl Sysadmin

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#5 Post by gandalf » Mon Jun 19, 2006 12:21 pm

jaguar wrote:OK. All is OK. I have created XML + PHP for monitoring traffic between peering sessions in an IX for example (Panap, FreeIX, AMSIX ...) with ip accounting.

CACTI USERS:
Please contact me if you are interested in it.
Would it be an option to publish this under Scripts and Templates?
cheers
Reinhard

jaguar
Posts: 11
Joined: Fri Jun 02, 2006 9:26 am

#6 Post by jaguar » Mon Jun 19, 2006 2:25 pm

Dear Cacti users,

Please see my page http://staff0.as30781.net/cacti/

Regards.
Jerome Descoux.

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#7 Post by gandalf » Tue Jun 20, 2006 12:29 pm

jaguar wrote:Dear Cacti users,

Please see my page http://staff0.as30781.net/cacti/

Regards.
I'm sorry to step in again. We try to keep all stuff here, in the forums. Cause in the past, external links were abandoned. So it would be very kind to create a new topic at this forum and attach your stuff. Scripts, XML, exported templates, perhaps a little readme with a graph showing your work would be fine
Reinhard

jaguar
Posts: 11
Joined: Fri Jun 02, 2006 9:26 am

#8 Post by jaguar » Wed Jun 21, 2006 7:22 am

OK !

I have joined the files :)
Attachments
peering-neuftelecom.png
Generated graph
peering-neuftelecom.png (44.51 KiB) Viewed 44798 times
traffic_between_peer.tar.gz
All files :)
(4.93 KiB) Downloaded 2023 times
Jerome Descoux.

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#9 Post by gandalf » Wed Jun 21, 2006 11:43 am

Thank you for your effort
Reinhard

jaguar
Posts: 11
Joined: Fri Jun 02, 2006 9:26 am

#10 Post by jaguar » Thu Jun 29, 2006 11:17 am

jaguar wrote:OK !

I have joined the files :)
Update: 20060630
Here, a new version which run on all the interfaces !!!

Kind regards.
Attachments
traffic_between_peer.tar.gz
(5.62 KiB) Downloaded 1505 times
Jerome Descoux.

Lojak
Posts: 14
Joined: Thu Sep 30, 2004 10:38 pm

#11 Post by Lojak » Thu Jul 06, 2006 10:59 am

I'm having difficulty with your latest version. When adding the associated data query to either a 7206 or 6506, the process just hangs. After a while the HTTP request times out and I can see that the query has been added to the device, but the query returned 0 rows.

Running the ss_host_mac.php script manually as per the readme.txt file returns the expected information for the main index command, but every other command returns duplicates of each peer. I also do not see anything for the query in/out commands:

Cisco 7206 running IOS v12.4

Code: Select all

bash-2.05b# /usr/bin/php ./ss_host_mac.php N.N.N.N 0 "2:161:10:SNMP_STRING:::[MD5]:None" index
198.32.245.2

etc

bash-2.05b# /usr/bin/php ./ss_host_mac.php N.N.N.N 0 "2:161:10:SNMP_STRING:::[MD5]:None" query index
198.32.245.2!198.32.245.2
198.32.245.2!198.32.245.2

etc

bash-2.05b# /usr/bin/php ./ss_host_mac.php N.N.N.N 0 "2:161:10:SNMP_STRING:::[MD5]:None" query as
198.32.245.2!7271
198.32.245.2!7271

etc..

bash-2.05b# /usr/bin/php ./ss_host_mac.php N.N.N.N 0 "2:161:10:SNMP_STRING:::[MD5]:None" query hostname
198.32.245.2!gw-look.torontointernetxchange.net
198.32.245.2!gw-look.torontointernetxchange.net

etc ..

On a 6506, the peer is not duplicated, but it does not return anything for in/out and the process also hangs.

Ideas?

Thanks,

-- Stephen.

jaguar
Posts: 11
Joined: Fri Jun 02, 2006 9:26 am

#12 Post by jaguar » Mon Jul 10, 2006 3:50 am

Lojak wrote:I'm having difficulty with your latest version. When adding the associated data query to either a 7206 or 6506, the process just hangs. After a while the HTTP request times out and I can see that the query has been added to the device, but the query returned 0 rows.
Hi,

It's strange because I have just tested again my script and it works !

Cacti returns "Success [75 Items, 25 Rows]" when I'm adding the Associated Data Queries.
Lojak wrote:Running the ss_host_mac.php script manually as per the readme.txt file returns the expected information for the main index command, but every other command returns duplicates of each peer. I also do not see anything for the query in/out commands:

Cisco 7206 running IOS v12.4

On a 6506, the peer is not duplicated, but it does not return anything for in/out and the process also hangs.
I'm running IOS v12.2. What about :

% /usr/bin/php ./ss_host_mac.php N.N.N.N 0 "2:161:10:SNMP_STRING:::[MD5]:None" query in
% /usr/bin/php ./ss_host_mac.php N.N.N.N 0 "2:161:10:SNMP_STRING:::[MD5]:None" query out

Does Cacti return you some values like :

10.11.12.1!3276838592
10.11.12.2!1299632083
10.11.12.3!1181788175
10.11.12.6!489124051
10.11.12.9!1545992878
10.11.12.10!884392037
10.11.12.12!3228375103
10.11.12.14!109308465
10.11.12.15!2506033437

Try with snmpwalk :

% snmpwalk -v 2c -c SNMP_STRING N.N.N.N 1.3.6.1.4.1.9.9.84.1.2.1.1.4

Have you got some values from snmpwalk ?
Jerome Descoux.

Lojak
Posts: 14
Joined: Thu Sep 30, 2004 10:38 pm

#13 Post by Lojak » Mon Jul 10, 2006 7:48 am

jaguar wrote: I'm running IOS v12.2. What about :

% /usr/bin/php ./ss_host_mac.php N.N.N.N 0 "2:161:10:SNMP_STRING:::[MD5]:None" query in
% /usr/bin/php ./ss_host_mac.php N.N.N.N 0 "2:161:10:SNMP_STRING:::[MD5]:None" query out
Nothing is returned.

Try with snmpwalk :

% snmpwalk -v 2c -c SNMP_STRING N.N.N.N 1.3.6.1.4.1.9.9.84.1.2.1.1.4

Have you got some values from snmpwalk ?
Yes, I did have data returned on the 7206, not the 6506.

Code: Select all

SNMPv2-SMI-v1::enterprises.9.9.84.1.2.1.1.4.2.2.0.208.192.240.212.17 = Counter32: 312455933
Thanks,

jaguar
Posts: 11
Joined: Fri Jun 02, 2006 9:26 am

#14 Post by jaguar » Tue Jul 11, 2006 2:33 pm

I have no idea about wich OID I have to parse for Cisco 6500.

Can I have access to your 6k via SNMP (read-only of course) for analysing it ?

Kind regards.
Jerome Descoux.

User avatar
fmendez75
Posts: 7
Joined: Tue Dec 05, 2006 1:25 pm
Location: NYC, NY

#15 Post by fmendez75 » Tue Dec 05, 2006 1:33 pm

jaguar wrote:
Lojak wrote:I'm having difficulty with your latest version. When adding the associated data query to either a 7206 or 6506, the process just hangs. After a while the HTTP request times out and I can see that the query has been added to the device, but the query returned 0 rows.
Hi,

It's strange because I have just tested again my script and it works !

Cacti returns "Success [75 Items, 25 Rows]" when I'm adding the Associated Data Queries.
Lojak wrote:Running the ss_host_mac.php script manually as per the readme.txt file returns the expected information for the main index command, but every other command returns duplicates of each peer. I also do not see anything for the query in/out commands:

Cisco 7206 running IOS v12.4

On a 6506, the peer is not duplicated, but it does not return anything for in/out and the process also hangs.
I'm running IOS v12.2. What about :

% /usr/bin/php ./ss_host_mac.php N.N.N.N 0 "2:161:10:SNMP_STRING:::[MD5]:None" query in
% /usr/bin/php ./ss_host_mac.php N.N.N.N 0 "2:161:10:SNMP_STRING:::[MD5]:None" query out

Does Cacti return you some values like :

10.11.12.1!3276838592
10.11.12.2!1299632083
10.11.12.3!1181788175
10.11.12.6!489124051
10.11.12.9!1545992878
10.11.12.10!884392037
10.11.12.12!3228375103
10.11.12.14!109308465
10.11.12.15!2506033437

Try with snmpwalk :

% snmpwalk -v 2c -c SNMP_STRING N.N.N.N 1.3.6.1.4.1.9.9.84.1.2.1.1.4

Have you got some values from snmpwalk ?
I am having almost the same problem. I can't get the template to graph.
When I test the script through the command line it does work.
e.g. /usr/local/share/cacti/scripts% php ./ss_host_mac.php [hostname] 0 "2:161:10:[community]:::[MD5]:None" [command]
When I try to create the graph I don't see any Host MIB- Peering under the "Associated Data Queries" I see it under "Associated Graph Templates"
I did follow your instructions in the readme.txt

What can I do to fix this? Thanks in advance.

Post Reply