Linux extended TCP statistics templates template and scripts

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

Moderators: Moderators, Developers

Post Reply
Author
Message
saurabhverma
Posts: 3
Joined: Fri May 08, 2009 12:57 am
Location: bangalore
Contact:

Linux extended TCP statistics templates template and scripts

#1 Post by saurabhverma » Mon Aug 31, 2009 7:57 am

I've finished writing script for graphing Extended TCP statistics . I reports following stats for ports less than 1024 ( configurable )

ESTABLISHED
The socket has an established connection.

SYN_SENT
The socket is actively attempting to establish a connection.

SYN_RECV
A connection request has been received from the network.

FIN_WAIT1
The socket is closed, and the connection is shutting down.

FIN_WAIT2
Connection is closed, and the socket is waiting for a shutdown from the remote end.

TIME_WAIT
The socket is waiting after close to handle packets still in the network.

CLOSE_WAIT
The remote end has shut down, waiting for the socket to close.

LAST_ACK
The remote end has shut down, and the socket is closed. Waiting for acknowledgement.

LISTEN The socket is listening for incoming connections. Such sockets are not included in the output unless you specify the --listening (-l) or --all (-a) option.

CLOSING
Both sockets are shut down but we still don\u2019t have all our data sent.


Full instructions are included as a README in the attached archive - you just have to set up a cron job to gather the statistics on the target server, and extend the snmp.conf with my "portstats.pl" script.

The archive is attached below, and I'll post some sample graphs in a follow up. Hope someone finds this useful!

I'm new to cacti , so might have done some mistakes ( but graphs works for me
8) )
Attachments
cacti-TCP_extended-0.1.tar.gz
tar containing scripts and templates
(13.13 KiB) Downloaded 639 times

saurabhverma
Posts: 3
Joined: Fri May 08, 2009 12:57 am
Location: bangalore
Contact:

#2 Post by saurabhverma » Mon Aug 31, 2009 8:11 am

And here's the sample graphs from a couple of systems :
Attachments
cacti_graphing_TCP.JPG
cacti_graphing_TCP.JPG (368.17 KiB) Viewed 4915 times

emrebilmuh
Posts: 7
Joined: Tue Jul 14, 2009 1:22 am

#3 Post by emrebilmuh » Tue Jan 12, 2010 4:21 am

the script portstats.pl contains wrong '}' characters on lines 29 and 30. I fixed it and posted as attachment. Thanks for your script. Unfortunately i have Cacti version 0.8.7d and can't use the templates for now. I will use these after upgrading. Thanks!

webroxy
Posts: 5
Joined: Mon Jul 29, 2013 3:20 am

Re: Linux extended TCP statistics templates template and scr

#4 Post by webroxy » Fri Aug 02, 2013 10:55 am

In template you have to change <path_cacti> to <path_cacti> at line 5 of cacti_data_query_template_get_ports.xml.

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

Re: Linux extended TCP statistics templates template and scr

#5 Post by tosage » Sat Aug 10, 2013 11:41 am

@emrebilmuh : Why you don't use this template ? Hash problem ? http://docs.cacti.net/howto:determine_c ... te_version
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