Repository: trafficserver
Updated Branches:
  refs/heads/master 78ded2618 -> c94f87216


TS-3409: Add stat to track number of SSL connections from ATS to origin server.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c94f8721
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c94f8721
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c94f8721

Branch: refs/heads/master
Commit: c94f87216543cb803f3367d7652ff7e69f9bf6d5
Parents: 78ded26
Author: shinrich <[email protected]>
Authored: Tue Feb 24 09:33:25 2015 -0600
Committer: shinrich <[email protected]>
Committed: Thu Feb 26 10:46:27 2015 -0600

----------------------------------------------------------------------
 CHANGES                               | 2 ++
 iocore/net/P_SSLUtils.h               | 3 ++-
 iocore/net/SSLNetVConnection.cc       | 3 ++-
 iocore/net/SSLUtils.cc                | 7 +++++--
 mgmt/RecordsConfig.cc                 | 4 ++++
 proxy/config/stats.config.xml.default | 8 ++++++++
 6 files changed, 23 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c94f8721/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index ff214fe..7ff6686 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.0
 
+  *) [TS-3409] Add metric to track number of SSL connections from ATS to 
Origin Servers.
+
   *) [TS-3410] Remove the traffic_ctl "bounce" command.
 
   *) [TS-3404] Handle race condition in handling delayed terminating chunk

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c94f8721/iocore/net/P_SSLUtils.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_SSLUtils.h b/iocore/net/P_SSLUtils.h
index 657a0dc..6d7697c 100644
--- a/iocore/net/P_SSLUtils.h
+++ b/iocore/net/P_SSLUtils.h
@@ -65,7 +65,7 @@ enum SSL_Stats
   ssl_user_agent_session_miss_stat,
   ssl_user_agent_session_timeout_stat,
   ssl_total_handshake_time_stat,
-  ssl_total_success_handshake_count_stat,
+  ssl_total_success_handshake_count_in_stat,
   ssl_total_tickets_created_stat,
   ssl_total_tickets_verified_stat,
   ssl_total_tickets_verified_old_key_stat, // verified with old key.
@@ -89,6 +89,7 @@ enum SSL_Stats
   ssl_error_zero_return,
   ssl_error_ssl,
   ssl_sni_name_set_failure,
+  ssl_total_success_handshake_count_out_stat,
 
   ssl_cipher_stats_start = 100,
   ssl_cipher_stats_end = 300,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c94f8721/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 470f433..50f790f 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -991,7 +991,7 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
       Debug("ssl", "ssl handshake time:%" PRId64, ssl_handshake_time);
       sslHandshakeBeginTime = 0;
       SSL_INCREMENT_DYN_STAT_EX(ssl_total_handshake_time_stat, 
ssl_handshake_time);
-      SSL_INCREMENT_DYN_STAT(ssl_total_success_handshake_count_stat);
+      SSL_INCREMENT_DYN_STAT(ssl_total_success_handshake_count_in_stat);
     }
 
     {
@@ -1109,6 +1109,7 @@ SSLNetVConnection::sslClientHandShakeEvent(int &err)
         X509_free(cert);
       }
     }
+    SSL_INCREMENT_DYN_STAT(ssl_total_success_handshake_count_out_stat);
 
     sslHandShakeComplete = true;
     return EVENT_DONE;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c94f8721/iocore/net/SSLUtils.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index 038e200..410915e 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -908,8 +908,11 @@ SSLInitializeStatistics()
   RecRegisterRawStat(ssl_rsb, RECT_PROCESS, 
"proxy.process.ssl.total_handshake_time",
                      RECD_INT, RECP_PERSISTENT, (int) 
ssl_total_handshake_time_stat,
                      RecRawStatSyncSum);
-  RecRegisterRawStat(ssl_rsb, RECT_PROCESS, 
"proxy.process.ssl.total_success_handshake_count",
-                     RECD_INT, RECP_PERSISTENT, (int) 
ssl_total_success_handshake_count_stat,
+  RecRegisterRawStat(ssl_rsb, RECT_PROCESS, 
"proxy.process.ssl.total_success_handshake_count_in",
+                     RECD_INT, RECP_PERSISTENT, (int) 
ssl_total_success_handshake_count_in_stat,
+                     RecRawStatSyncCount);
+  RecRegisterRawStat(ssl_rsb, RECT_PROCESS, 
"proxy.process.ssl.total_success_handshake_count_out",
+                     RECD_INT, RECP_PERSISTENT, (int) 
ssl_total_success_handshake_count_out_stat,
                      RecRawStatSyncCount);
 
   // TLS tickets

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c94f8721/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 4887a28..75cc5a8 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -1799,6 +1799,10 @@ static const RecordElement RecordsConfig[] =
   {RECT_NODE, "proxy.node.log.bytes_lost_before_written_to_disk", RECD_INT, 
"0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
 
+  
+  {RECT_NODE, "proxy.process.ssl.total_success_handshake_count", RECD_INT, 
"0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  ,
+
   //#
   //# Add CLUSTER    Records Here
   //#

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c94f8721/proxy/config/stats.config.xml.default
----------------------------------------------------------------------
diff --git a/proxy/config/stats.config.xml.default 
b/proxy/config/stats.config.xml.default
index 6d97a7a..507ba9f 100644
--- a/proxy/config/stats.config.xml.default
+++ b/proxy/config/stats.config.xml.default
@@ -1946,6 +1946,14 @@
         </expression>
     </statistics>
 
+    <statistics
+       minimum="0">
+        
<destination>proxy.process.ssl.total_success_handshake_count</destination>
+        <expression>
+            proxy.process.ssl.total_success_handshake_count_in
+        </expression>
+    </statistics>
+
 </ink:statistics>
 
 

Reply via email to