Linux extended TCP statistics templates template and scripts

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

Moderators: Developers, Moderators

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

Linux extended TCP statistics templates template and scripts

Post by saurabhverma »

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 664 times
saurabhverma
Posts: 3
Joined: Fri May 08, 2009 12:57 am
Location: bangalore
Contact:

Post by saurabhverma »

And here's the sample graphs from a couple of systems :
Attachments
cacti_graphing_TCP.JPG
cacti_graphing_TCP.JPG (368.17 KiB) Viewed 5402 times
emrebilmuh
Posts: 7
Joined: Tue Jul 14, 2009 1:22 am

Post by emrebilmuh »

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

Post by webroxy »

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: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: Linux extended TCP statistics templates template and scr

Post by tosage »

@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

Who is online

Users browsing this forum: No registered users and 4 guests