newrelic_f5_plugin 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +14 -0
- data/lib/newrelic_f5_plugin.rb +1 -0
- data/lib/newrelic_f5_plugin/agent.rb +60 -5
- data/lib/newrelic_f5_plugin/client_ssl.rb +219 -0
- data/lib/newrelic_f5_plugin/pools.rb +33 -1
- data/lib/newrelic_f5_plugin/rules.rb +1 -1
- data/lib/newrelic_f5_plugin/virtuals.rb +32 -0
- data/newrelic_f5_plugin.gemspec +3 -2
- metadata +6 -2
    
        data/CHANGES
    CHANGED
    
    | @@ -1,3 +1,17 @@ | |
| 1 | 
            +
            * 1.0.12
         | 
| 2 | 
            +
              - Added Virtual Servers and Pools statistics:
         | 
| 3 | 
            +
                - Inbound Packets per second
         | 
| 4 | 
            +
                - Outbound Packets per second
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            * 1.0.11
         | 
| 7 | 
            +
              - Add Client SSL profile statistics:
         | 
| 8 | 
            +
                - Current connections
         | 
| 9 | 
            +
                - Session Cache entries
         | 
| 10 | 
            +
                - Session Cache hits/sec
         | 
| 11 | 
            +
                - Session Cache lookups/sec
         | 
| 12 | 
            +
                - Session Cache invalidations/sec
         | 
| 13 | 
            +
              - Better logic for skipping metrics that do not exist
         | 
| 14 | 
            +
             | 
| 1 15 | 
             
            * 1.0.10
         | 
| 2 16 | 
             
              - Add iRule statistics:
         | 
| 3 17 | 
             
                - Executions per second
         | 
    
        data/lib/newrelic_f5_plugin.rb
    CHANGED
    
    
| @@ -4,7 +4,7 @@ require 'newrelic_plugin' | |
| 4 4 | 
             
            require 'snmp'
         | 
| 5 5 |  | 
| 6 6 | 
             
            module NewRelic::F5Plugin
         | 
| 7 | 
            -
              VERSION = '1.0. | 
| 7 | 
            +
              VERSION = '1.0.12'
         | 
| 8 8 |  | 
| 9 9 | 
             
              # Register and run the agent
         | 
| 10 10 | 
             
              def self.run
         | 
| @@ -127,7 +127,7 @@ module NewRelic::F5Plugin | |
| 127 127 | 
             
                  NewRelic::PlatformLogger.debug("Collecting Virtual Server stats")
         | 
| 128 128 | 
             
                  vs = NewRelic::F5Plugin::Virtuals.new snmp
         | 
| 129 129 |  | 
| 130 | 
            -
                   | 
| 130 | 
            +
                  unless vs.get_names.empty?
         | 
| 131 131 | 
             
                    virtual_requests = vs.get_requests
         | 
| 132 132 | 
             
                    virtual_requests.each_key { |m| report_counter_metric m, "req/sec", virtual_requests[m] } unless virtual_requests.nil?
         | 
| 133 133 |  | 
| @@ -137,6 +137,12 @@ module NewRelic::F5Plugin | |
| 137 137 | 
             
                    virtual_conns_total = vs.get_conns_total
         | 
| 138 138 | 
             
                    virtual_conns_total.each_key { |m| report_counter_metric m, "conn/sec", virtual_conns_total[m] } unless virtual_conns_total.nil?
         | 
| 139 139 |  | 
| 140 | 
            +
                    virtual_packets_in = vs.get_packets_in
         | 
| 141 | 
            +
                    virtual_packets_in.each_key { |m| report_counter_metric m, "packets/sec", virtual_packets_in[m] } unless virtual_packets_in.nil?
         | 
| 142 | 
            +
             | 
| 143 | 
            +
                    virtual_packets_out = vs.get_packets_out
         | 
| 144 | 
            +
                    virtual_packets_out.each_key { |m| report_counter_metric m, "packets/sec", virtual_packets_out[m] } unless virtual_packets_out.nil?
         | 
| 145 | 
            +
             | 
| 140 146 | 
             
                    virtual_throughput_in = vs.get_throughput_in
         | 
| 141 147 | 
             
                    virtual_throughput_in.each_key { |m| report_counter_metric m, "bits/sec", virtual_throughput_in[m] } unless virtual_throughput_in.nil?
         | 
| 142 148 |  | 
| @@ -153,7 +159,7 @@ module NewRelic::F5Plugin | |
| 153 159 | 
             
                  NewRelic::PlatformLogger.debug("Collecting Pool stats")
         | 
| 154 160 | 
             
                  pool = NewRelic::F5Plugin::Pools.new snmp
         | 
| 155 161 |  | 
| 156 | 
            -
                   | 
| 162 | 
            +
                  unless pool.get_names.empty?
         | 
| 157 163 | 
             
                    pool_requests = pool.get_requests
         | 
| 158 164 | 
             
                    pool_requests.each_key { |m| report_counter_metric m, "req/sec", pool_requests[m] } unless pool_requests.nil?
         | 
| 159 165 |  | 
| @@ -163,6 +169,12 @@ module NewRelic::F5Plugin | |
| 163 169 | 
             
                    pool_conns_total = pool.get_conns_total
         | 
| 164 170 | 
             
                    pool_conns_total.each_key { |m| report_counter_metric m, "conn/sec", pool_conns_total[m] } unless pool_conns_total.nil?
         | 
| 165 171 |  | 
| 172 | 
            +
                    pool_packets_in = pool.get_packets_in
         | 
| 173 | 
            +
                    pool_packets_in.each_key { |m| report_counter_metric m, "packets/sec", pool_packets_in[m] } unless pool_packets_in.nil?
         | 
| 174 | 
            +
             | 
| 175 | 
            +
                    pool_packets_out = pool.get_packets_out
         | 
| 176 | 
            +
                    pool_packets_out.each_key { |m| report_counter_metric m, "packets/sec", pool_packets_out[m] } unless pool_packets_out.nil?
         | 
| 177 | 
            +
             | 
| 166 178 | 
             
                    pool_throughput_in = pool.get_throughput_in
         | 
| 167 179 | 
             
                    pool_throughput_in.each_key { |m| report_counter_metric m, "bits/sec", pool_throughput_in[m] } unless pool_throughput_in.nil?
         | 
| 168 180 |  | 
| @@ -177,7 +189,7 @@ module NewRelic::F5Plugin | |
| 177 189 | 
             
                  NewRelic::PlatformLogger.debug("Collecting iRule stats")
         | 
| 178 190 | 
             
                  rule = NewRelic::F5Plugin::Rules.new snmp
         | 
| 179 191 |  | 
| 180 | 
            -
                   | 
| 192 | 
            +
                  unless rule.get_names.empty?
         | 
| 181 193 | 
             
                    rule_execs = rule.get_executions
         | 
| 182 194 | 
             
                    rule_execs.each_key { |m| report_counter_metric m, "execs/sec", rule_execs[m] } unless rule_execs.nil?
         | 
| 183 195 |  | 
| @@ -198,7 +210,7 @@ module NewRelic::F5Plugin | |
| 198 210 | 
             
                  NewRelic::PlatformLogger.debug("Collecting SNAT Pool stats")
         | 
| 199 211 | 
             
                  snatpool = NewRelic::F5Plugin::SnatPools.new snmp
         | 
| 200 212 |  | 
| 201 | 
            -
                   | 
| 213 | 
            +
                  unless snatpool.get_names.empty?
         | 
| 202 214 | 
             
                    snatpool_conns_max = snatpool.get_conns_max
         | 
| 203 215 | 
             
                    snatpool_conns_max.each_key { |m| report_metric m, "conns", snatpool_conns_max[m] } unless snatpool_conns_max.nil?
         | 
| 204 216 |  | 
| @@ -222,6 +234,49 @@ module NewRelic::F5Plugin | |
| 222 234 | 
             
                  end
         | 
| 223 235 |  | 
| 224 236 |  | 
| 237 | 
            +
                  #
         | 
| 238 | 
            +
                  # Collect Client SSL Profile statistics
         | 
| 239 | 
            +
                  #
         | 
| 240 | 
            +
                  NewRelic::PlatformLogger.debug("Collecting Client SSL Profile stats")
         | 
| 241 | 
            +
                  clientssl = NewRelic::F5Plugin::ClientSsl.new snmp
         | 
| 242 | 
            +
             | 
| 243 | 
            +
                  unless clientssl.get_names.empty?
         | 
| 244 | 
            +
                    clientssl_conns_current = clientssl.get_conns_current
         | 
| 245 | 
            +
                    clientssl_conns_current.each_key { |m| report_metric m, "conns", clientssl_conns_current[m] } unless clientssl_conns_current.nil?
         | 
| 246 | 
            +
             | 
| 247 | 
            +
                    clientssl_session_cache_current = clientssl.get_session_cache_current
         | 
| 248 | 
            +
                    clientssl_session_cache_current.each_key { |m| report_metric m, "entries", clientssl_session_cache_current[m] } unless clientssl_session_cache_current.nil?
         | 
| 249 | 
            +
             | 
| 250 | 
            +
                    clientssl_session_cache_hits = clientssl.get_session_cache_hits
         | 
| 251 | 
            +
                    clientssl_session_cache_hits.each_key { |m| report_counter_metric m, "hits/sec", clientssl_session_cache_hits[m] } unless clientssl_session_cache_hits.nil?
         | 
| 252 | 
            +
             | 
| 253 | 
            +
                    clientssl_session_cache_lookups = clientssl.get_session_cache_lookups
         | 
| 254 | 
            +
                    clientssl_session_cache_lookups.each_key { |m| report_counter_metric m, "lookups/sec", clientssl_session_cache_lookups[m] } unless clientssl_session_cache_lookups.nil?
         | 
| 255 | 
            +
             | 
| 256 | 
            +
                    NewRelic::PlatformLogger.debug("Calculating Client SSL Profile hit ratios")
         | 
| 257 | 
            +
                    clientssl_hit_ratio = { }
         | 
| 258 | 
            +
                    clientssl_session_cache_hits.each_key do |h|
         | 
| 259 | 
            +
                      key = h.gsub(/^Client SSL Profiles\/Session Cache Hits\//, '')
         | 
| 260 | 
            +
                      l = "Client SSL Profiles/Session Cache Lookups/#{key}"
         | 
| 261 | 
            +
                      p = "Client SSL Profiles/Session Cache Hit Ratio/#{key}"
         | 
| 262 | 
            +
                      unless clientssl_session_cache_lookups[l].nil?
         | 
| 263 | 
            +
                        if clientssl_session_cache_lookups[l].to_f > 0
         | 
| 264 | 
            +
                          clientssl_hit_ratio[p] = (clientssl_session_cache_hits[h].to_f / clientssl_session_cache_lookups[l].to_f) * 100
         | 
| 265 | 
            +
                        else
         | 
| 266 | 
            +
                          clientssl_hit_ratio[p] = 0.0
         | 
| 267 | 
            +
                        end
         | 
| 268 | 
            +
                      end
         | 
| 269 | 
            +
                    end
         | 
| 270 | 
            +
                    clientssl_hit_ratio.each_key { |m| report_metric m, "%", clientssl_hit_ratio[m] } unless clientssl_hit_ratio.empty?
         | 
| 271 | 
            +
             | 
| 272 | 
            +
                    clientssl_session_cache_overflows = clientssl.get_session_cache_overflows
         | 
| 273 | 
            +
                    clientssl_session_cache_overflows.each_key { |m| report_counter_metric m, "overflows/sec", clientssl_session_cache_overflows[m] } unless clientssl_session_cache_overflows.nil?
         | 
| 274 | 
            +
             | 
| 275 | 
            +
                    clientssl_session_cache_invalidations = clientssl.get_session_cache_invalidations
         | 
| 276 | 
            +
                    clientssl_session_cache_invalidations.each_key { |m| report_counter_metric m, "invld/sec", clientssl_session_cache_invalidations[m] } unless clientssl_session_cache_invalidations.nil?
         | 
| 277 | 
            +
                  end
         | 
| 278 | 
            +
             | 
| 279 | 
            +
             | 
| 225 280 | 
             
                  #
         | 
| 226 281 | 
             
                  # Cleanup snmp connection
         | 
| 227 282 | 
             
                  #
         | 
| @@ -0,0 +1,219 @@ | |
| 1 | 
            +
            #!/usr/bin/env ruby
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require 'newrelic_plugin'
         | 
| 4 | 
            +
            require 'snmp'
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            #LtmClientSslStatEntry
         | 
| 7 | 
            +
            #  ltmClientSslStatName                                   LongDisplayString,
         | 
| 8 | 
            +
            #  ltmClientSslStatCurConns                               CounterBasedGauge64,
         | 
| 9 | 
            +
            #  ltmClientSslStatMaxConns                               Counter64,
         | 
| 10 | 
            +
            #  ltmClientSslStatCurNativeConns                         CounterBasedGauge64,
         | 
| 11 | 
            +
            #  ltmClientSslStatMaxNativeConns                         Counter64,
         | 
| 12 | 
            +
            #  ltmClientSslStatTotNativeConns                         Counter64,
         | 
| 13 | 
            +
            #  ltmClientSslStatCurCompatConns                         CounterBasedGauge64,
         | 
| 14 | 
            +
            #  ltmClientSslStatMaxCompatConns                         Counter64,
         | 
| 15 | 
            +
            #  ltmClientSslStatTotCompatConns                         Counter64,
         | 
| 16 | 
            +
            #  ltmClientSslStatEncryptedBytesIn                       Counter64,
         | 
| 17 | 
            +
            #  ltmClientSslStatEncryptedBytesOut                      Counter64,
         | 
| 18 | 
            +
            #  ltmClientSslStatDecryptedBytesIn                       Counter64,
         | 
| 19 | 
            +
            #  ltmClientSslStatDecryptedBytesOut                      Counter64,
         | 
| 20 | 
            +
            #  ltmClientSslStatRecordsIn                              Counter64,
         | 
| 21 | 
            +
            #  ltmClientSslStatRecordsOut                             Counter64,
         | 
| 22 | 
            +
            #  ltmClientSslStatFullyHwAcceleratedConns                Counter64,
         | 
| 23 | 
            +
            #  ltmClientSslStatPartiallyHwAcceleratedConns            Counter64,
         | 
| 24 | 
            +
            #  ltmClientSslStatNonHwAcceleratedConns                  Counter64,
         | 
| 25 | 
            +
            #  ltmClientSslStatPrematureDisconnects                   Counter64,
         | 
| 26 | 
            +
            #  ltmClientSslStatMidstreamRenegotiations                Counter64,
         | 
| 27 | 
            +
            #  ltmClientSslStatSessCacheCurEntries                    CounterBasedGauge64,
         | 
| 28 | 
            +
            #  ltmClientSslStatSessCacheHits                          Counter64,
         | 
| 29 | 
            +
            #  ltmClientSslStatSessCacheLookups                       Counter64,
         | 
| 30 | 
            +
            #  ltmClientSslStatSessCacheOverflows                     Counter64,
         | 
| 31 | 
            +
            #  ltmClientSslStatSessCacheInvalidations                 Counter64,
         | 
| 32 | 
            +
            #  ltmClientSslStatPeercertValid                          Counter64,
         | 
| 33 | 
            +
            #  ltmClientSslStatPeercertInvalid                        Counter64,
         | 
| 34 | 
            +
            #  ltmClientSslStatPeercertNone                           Counter64,
         | 
| 35 | 
            +
            #  ltmClientSslStatHandshakeFailures                      Counter64,
         | 
| 36 | 
            +
            #  ltmClientSslStatBadRecords                             Counter64,
         | 
| 37 | 
            +
            #  ltmClientSslStatFatalAlerts                            Counter64,
         | 
| 38 | 
            +
            #  ltmClientSslStatSslv2                                  Counter64,
         | 
| 39 | 
            +
            #  ltmClientSslStatSslv3                                  Counter64,
         | 
| 40 | 
            +
            #  ltmClientSslStatTlsv1                                  Counter64,
         | 
| 41 | 
            +
            #  ltmClientSslStatAdhKeyxchg                             Counter64,
         | 
| 42 | 
            +
            #  ltmClientSslStatDhDssKeyxchg                           Counter64,
         | 
| 43 | 
            +
            #  ltmClientSslStatDhRsaKeyxchg                           Counter64,
         | 
| 44 | 
            +
            #  ltmClientSslStatDssKeyxchg                             Counter64,
         | 
| 45 | 
            +
            #  ltmClientSslStatEdhDssKeyxchg                          Counter64,
         | 
| 46 | 
            +
            #  ltmClientSslStatRsaKeyxchg                             Counter64,
         | 
| 47 | 
            +
            #  ltmClientSslStatNullBulk                               Counter64,
         | 
| 48 | 
            +
            #  ltmClientSslStatAesBulk                                Counter64,
         | 
| 49 | 
            +
            #  ltmClientSslStatDesBulk                                Counter64,
         | 
| 50 | 
            +
            #  ltmClientSslStatIdeaBulk                               Counter64,
         | 
| 51 | 
            +
            #  ltmClientSslStatRc2Bulk                                Counter64,
         | 
| 52 | 
            +
            #  ltmClientSslStatRc4Bulk                                Counter64,
         | 
| 53 | 
            +
            #  ltmClientSslStatNullDigest                             Counter64,
         | 
| 54 | 
            +
            #  ltmClientSslStatMd5Digest                              Counter64,
         | 
| 55 | 
            +
            #  ltmClientSslStatShaDigest                              Counter64,
         | 
| 56 | 
            +
            #  ltmClientSslStatNotssl                                 Counter64,
         | 
| 57 | 
            +
            #  ltmClientSslStatEdhRsaKeyxchg                          Counter64,
         | 
| 58 | 
            +
            #  ltmClientSslStatSecureHandshakes                       Counter64,
         | 
| 59 | 
            +
            #  ltmClientSslStatInsecureHandshakeAccepts               Counter64,
         | 
| 60 | 
            +
            #  ltmClientSslStatInsecureHandshakeRejects               Counter64,
         | 
| 61 | 
            +
            #  ltmClientSslStatInsecureRenegotiationRejects           Counter64,
         | 
| 62 | 
            +
            #  ltmClientSslStatSniRejects                             Counter64,
         | 
| 63 | 
            +
            #  ltmClientSslStatTlsv11                                 Counter64,
         | 
| 64 | 
            +
            #  ltmClientSslStatTlsv12                                 Counter64,
         | 
| 65 | 
            +
            #  ltmClientSslStatDtlsv1                                 Counter64
         | 
| 66 | 
            +
             | 
| 67 | 
            +
            module NewRelic
         | 
| 68 | 
            +
              module F5Plugin
         | 
| 69 | 
            +
             | 
| 70 | 
            +
                class ClientSsl
         | 
| 71 | 
            +
                  attr_accessor :names, :snmp_manager
         | 
| 72 | 
            +
             | 
| 73 | 
            +
                  OID_LTM_CLIENT_SSL                                     = "1.3.6.1.4.1.3375.2.2.6.2"
         | 
| 74 | 
            +
                  OID_LTM_CLIENT_SSL_PROFILE_STAT                        = "#{OID_LTM_CLIENT_SSL}.2"
         | 
| 75 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_ENTRY                          = "#{OID_LTM_CLIENT_SSL_PROFILE_STAT}.3.1"
         | 
| 76 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_NAME                           = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.1"
         | 
| 77 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_CUR_CONNS                      = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.2"
         | 
| 78 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_MAX_CONNS                      = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.3"
         | 
| 79 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_CUR_NATIVE_CONNS               = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.4"
         | 
| 80 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_MAX_NATIVE_CONNS               = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.5"
         | 
| 81 | 
            +
             | 
| 82 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_FULLY_HW_ACCELERATED_CONNS     = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.16"
         | 
| 83 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_PARTIALLY_HW_ACCELERATED_CONNS = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.17"
         | 
| 84 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_NON_HW_ACCELERATED_CONNS       = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.18"
         | 
| 85 | 
            +
             | 
| 86 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_SESS_CACHE_CUR_ENTRIES         = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.21"
         | 
| 87 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_SESS_CACHE_HITS                = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.22"
         | 
| 88 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_SESS_CACHE_LOOKUPS             = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.23"
         | 
| 89 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_SESS_CACHE_OVERFLOWS           = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.24"
         | 
| 90 | 
            +
                  OID_LTM_CLIENT_SSL_STAT_SESS_CACHE_INVALIDATIONS       = "#{OID_LTM_CLIENT_SSL_STAT_ENTRY}.25"
         | 
| 91 | 
            +
             | 
| 92 | 
            +
             | 
| 93 | 
            +
             | 
| 94 | 
            +
                  #
         | 
| 95 | 
            +
                  # Init
         | 
| 96 | 
            +
                  #
         | 
| 97 | 
            +
                  def initialize(snmp = nil)
         | 
| 98 | 
            +
                    @names = [ ]
         | 
| 99 | 
            +
             | 
| 100 | 
            +
                    if snmp
         | 
| 101 | 
            +
                      @snmp_manager = snmp
         | 
| 102 | 
            +
                    else
         | 
| 103 | 
            +
                      @snmp_manager = nil
         | 
| 104 | 
            +
                    end
         | 
| 105 | 
            +
                  end
         | 
| 106 | 
            +
             | 
| 107 | 
            +
             | 
| 108 | 
            +
             | 
| 109 | 
            +
                  #
         | 
| 110 | 
            +
                  # Get the list of iRule names
         | 
| 111 | 
            +
                  #
         | 
| 112 | 
            +
                  def get_names(snmp = nil)
         | 
| 113 | 
            +
                    snmp = snmp_manager unless snmp
         | 
| 114 | 
            +
             | 
| 115 | 
            +
                    if snmp
         | 
| 116 | 
            +
                      @names.clear
         | 
| 117 | 
            +
             | 
| 118 | 
            +
                      begin
         | 
| 119 | 
            +
                        snmp.walk([OID_LTM_CLIENT_SSL_STAT_NAME]) do |row|
         | 
| 120 | 
            +
                          row.each do |vb|
         | 
| 121 | 
            +
                            @names.push(vb.value)
         | 
| 122 | 
            +
                          end
         | 
| 123 | 
            +
                        end
         | 
| 124 | 
            +
                      rescue Exception => e
         | 
| 125 | 
            +
                        NewRelic::PlatformLogger.error("Unable to gather Client SSL Profile names with error: #{e}")
         | 
| 126 | 
            +
                      end
         | 
| 127 | 
            +
             | 
| 128 | 
            +
                      NewRelic::PlatformLogger.debug("Client SSL Profiles: Found #{@names.size}")
         | 
| 129 | 
            +
                      return @names
         | 
| 130 | 
            +
                    end
         | 
| 131 | 
            +
                  end
         | 
| 132 | 
            +
             | 
| 133 | 
            +
             | 
| 134 | 
            +
             | 
| 135 | 
            +
                  #
         | 
| 136 | 
            +
                  # Gather current connection count
         | 
| 137 | 
            +
                  #
         | 
| 138 | 
            +
                  def get_conns_current(snmp = nil)
         | 
| 139 | 
            +
                    snmp = snmp_manager unless snmp
         | 
| 140 | 
            +
             | 
| 141 | 
            +
                    get_names(snmp) if @names.empty?
         | 
| 142 | 
            +
                    res = gather_snmp_metrics_by_name("Client SSL Profiles/Current Connections", @names, OID_LTM_CLIENT_SSL_STAT_CUR_CONNS, snmp)
         | 
| 143 | 
            +
                    NewRelic::PlatformLogger.debug("Client SSL Profiles: Got #{res.size}/#{@names.size} Current Connection metrics")
         | 
| 144 | 
            +
                    return res
         | 
| 145 | 
            +
                  end
         | 
| 146 | 
            +
             | 
| 147 | 
            +
             | 
| 148 | 
            +
             | 
| 149 | 
            +
                  #
         | 
| 150 | 
            +
                  # Gather current cache entries
         | 
| 151 | 
            +
                  #
         | 
| 152 | 
            +
                  def get_session_cache_current(snmp = nil)
         | 
| 153 | 
            +
                    snmp = snmp_manager unless snmp
         | 
| 154 | 
            +
             | 
| 155 | 
            +
                    get_names(snmp) if @names.empty?
         | 
| 156 | 
            +
                    res = gather_snmp_metrics_by_name("Client SSL Profiles/Current Cache Entries", @names, OID_LTM_CLIENT_SSL_STAT_SESS_CACHE_CUR_ENTRIES, snmp)
         | 
| 157 | 
            +
                    NewRelic::PlatformLogger.debug("Client SSL Profiles: Got #{res.size}/#{@names.size} Current Session Cache metrics")
         | 
| 158 | 
            +
                    return res
         | 
| 159 | 
            +
                  end
         | 
| 160 | 
            +
             | 
| 161 | 
            +
             | 
| 162 | 
            +
             | 
| 163 | 
            +
                  #
         | 
| 164 | 
            +
                  # Gather session cache hits
         | 
| 165 | 
            +
                  #
         | 
| 166 | 
            +
                  def get_session_cache_hits(snmp = nil)
         | 
| 167 | 
            +
                    snmp = snmp_manager unless snmp
         | 
| 168 | 
            +
             | 
| 169 | 
            +
                    get_names(snmp) if @names.empty?
         | 
| 170 | 
            +
                    res = gather_snmp_metrics_by_name("Client SSL Profiles/Session Cache Hits", @names, OID_LTM_CLIENT_SSL_STAT_SESS_CACHE_HITS, snmp)
         | 
| 171 | 
            +
                    NewRelic::PlatformLogger.debug("Client SSL Profiles: Got #{res.size}/#{@names.size} Session Cache Hit metrics")
         | 
| 172 | 
            +
                    return res
         | 
| 173 | 
            +
                  end
         | 
| 174 | 
            +
             | 
| 175 | 
            +
             | 
| 176 | 
            +
             | 
| 177 | 
            +
                  #
         | 
| 178 | 
            +
                  # Gather session cache lookups
         | 
| 179 | 
            +
                  #
         | 
| 180 | 
            +
                  def get_session_cache_lookups(snmp = nil)
         | 
| 181 | 
            +
                    snmp = snmp_manager unless snmp
         | 
| 182 | 
            +
             | 
| 183 | 
            +
                    get_names(snmp) if @names.empty?
         | 
| 184 | 
            +
                    res = gather_snmp_metrics_by_name("Client SSL Profiles/Session Cache Lookups", @names, OID_LTM_CLIENT_SSL_STAT_SESS_CACHE_LOOKUPS, snmp)
         | 
| 185 | 
            +
                    NewRelic::PlatformLogger.debug("Client SSL Profiles: Got #{res.size}/#{@names.size} Session Cache Lookup metrics")
         | 
| 186 | 
            +
                    return res
         | 
| 187 | 
            +
                  end
         | 
| 188 | 
            +
             | 
| 189 | 
            +
             | 
| 190 | 
            +
             | 
| 191 | 
            +
                  #
         | 
| 192 | 
            +
                  # Gather session cache overflows
         | 
| 193 | 
            +
                  #
         | 
| 194 | 
            +
                  def get_session_cache_overflows(snmp = nil)
         | 
| 195 | 
            +
                    snmp = snmp_manager unless snmp
         | 
| 196 | 
            +
             | 
| 197 | 
            +
                    get_names(snmp) if @names.empty?
         | 
| 198 | 
            +
                    res = gather_snmp_metrics_by_name("Client SSL Profiles/Session Cache Overflows", @names, OID_LTM_CLIENT_SSL_STAT_SESS_CACHE_OVERFLOWS, snmp)
         | 
| 199 | 
            +
                    NewRelic::PlatformLogger.debug("Client SSL Profiles: Got #{res.size}/#{@names.size} Session Cache Overflow metrics")
         | 
| 200 | 
            +
                    return res
         | 
| 201 | 
            +
                  end
         | 
| 202 | 
            +
             | 
| 203 | 
            +
             | 
| 204 | 
            +
             | 
| 205 | 
            +
                  #
         | 
| 206 | 
            +
                  # Gather session cache invalidations
         | 
| 207 | 
            +
                  #
         | 
| 208 | 
            +
                  def get_session_cache_invalidations(snmp = nil)
         | 
| 209 | 
            +
                    snmp = snmp_manager unless snmp
         | 
| 210 | 
            +
             | 
| 211 | 
            +
                    get_names(snmp) if @names.empty?
         | 
| 212 | 
            +
                    res = gather_snmp_metrics_by_name("Client SSL Profiles/Session Cache Invalidations", @names, OID_LTM_CLIENT_SSL_STAT_SESS_CACHE_INVALIDATIONS, snmp)
         | 
| 213 | 
            +
                    NewRelic::PlatformLogger.debug("Client SSL Profiles: Got #{res.size}/#{@names.size} Session Cache Invalidation metrics")
         | 
| 214 | 
            +
                    return res
         | 
| 215 | 
            +
                  end
         | 
| 216 | 
            +
                end
         | 
| 217 | 
            +
              end
         | 
| 218 | 
            +
            end
         | 
| 219 | 
            +
             | 
| @@ -46,7 +46,9 @@ module NewRelic | |
| 46 46 | 
             
                  OID_LTM_POOL_STAT                  = "#{OID_LTM_POOLS}.2"
         | 
| 47 47 | 
             
                  OID_LTM_POOL_ENTRY                 = "#{OID_LTM_POOL_STAT}.3.1"
         | 
| 48 48 | 
             
                  OID_LTM_POOL_STAT_NAME             = "#{OID_LTM_POOL_ENTRY}.1"
         | 
| 49 | 
            +
                  OID_LTM_POOL_STAT_SERVER_PKTS_IN   = "#{OID_LTM_POOL_ENTRY}.2"
         | 
| 49 50 | 
             
                  OID_LTM_POOL_STAT_SERVER_BYTES_IN  = "#{OID_LTM_POOL_ENTRY}.3"
         | 
| 51 | 
            +
                  OID_LTM_POOL_STAT_SERVER_PKTS_OUT  = "#{OID_LTM_POOL_ENTRY}.4"
         | 
| 50 52 | 
             
                  OID_LTM_POOL_STAT_SERVER_BYTES_OUT = "#{OID_LTM_POOL_ENTRY}.5"
         | 
| 51 53 | 
             
                  OID_LTM_POOL_STAT_SERVER_TOT_CONNS = "#{OID_LTM_POOL_ENTRY}.7"
         | 
| 52 54 | 
             
                  OID_LTM_POOL_STAT_SERVER_CUR_CONNS = "#{OID_LTM_POOL_ENTRY}.8"
         | 
| @@ -137,6 +139,36 @@ module NewRelic | |
| 137 139 |  | 
| 138 140 |  | 
| 139 141 |  | 
| 142 | 
            +
                  #
         | 
| 143 | 
            +
                  # Gather Packets Inbound
         | 
| 144 | 
            +
                  #
         | 
| 145 | 
            +
                  def get_packets_in(snmp = nil)
         | 
| 146 | 
            +
                    snmp = snmp_manager unless snmp
         | 
| 147 | 
            +
             | 
| 148 | 
            +
                    get_names(snmp) if @pool_names.empty?
         | 
| 149 | 
            +
                    res = gather_snmp_metrics_by_name("Pools/Packets/In", @pool_names, OID_LTM_POOL_STAT_SERVER_PKTS_IN, snmp)
         | 
| 150 | 
            +
                    res = res.each_key { |n| res[n] *= 8 }
         | 
| 151 | 
            +
                    NewRelic::PlatformLogger.debug("Pools: Got #{res.size}/#{@pool_names.size} Inbound Packet metrics")
         | 
| 152 | 
            +
                    return res
         | 
| 153 | 
            +
                  end
         | 
| 154 | 
            +
             | 
| 155 | 
            +
             | 
| 156 | 
            +
             | 
| 157 | 
            +
                  #
         | 
| 158 | 
            +
                  # Gather Packets Outbound
         | 
| 159 | 
            +
                  #
         | 
| 160 | 
            +
                  def get_packets_out(snmp = nil)
         | 
| 161 | 
            +
                    snmp = snmp_manager unless snmp
         | 
| 162 | 
            +
             | 
| 163 | 
            +
                    get_names(snmp) if @pool_names.empty?
         | 
| 164 | 
            +
                    res = gather_snmp_metrics_by_name("Pools/Packets/Out", @pool_names, OID_LTM_POOL_STAT_SERVER_PKTS_OUT, snmp)
         | 
| 165 | 
            +
                    res = res.each_key { |n| res[n] *= 8 }
         | 
| 166 | 
            +
                    NewRelic::PlatformLogger.debug("Pools: Got #{res.size}/#{@pool_names.size} Outbound Packet metrics")
         | 
| 167 | 
            +
                    return res
         | 
| 168 | 
            +
                  end
         | 
| 169 | 
            +
             | 
| 170 | 
            +
             | 
| 171 | 
            +
             | 
| 140 172 | 
             
                  #
         | 
| 141 173 | 
             
                  # Gather Throughput Inbound (returns in bits)
         | 
| 142 174 | 
             
                  #
         | 
| @@ -153,7 +185,7 @@ module NewRelic | |
| 153 185 |  | 
| 154 186 |  | 
| 155 187 | 
             
                  #
         | 
| 156 | 
            -
                  # Gather Throughput  | 
| 188 | 
            +
                  # Gather Throughput Outbound (returns in bits)
         | 
| 157 189 | 
             
                  #
         | 
| 158 190 | 
             
                  def get_throughput_out(snmp = nil)
         | 
| 159 191 | 
             
                    snmp = snmp_manager unless snmp
         | 
| @@ -122,7 +122,7 @@ module NewRelic | |
| 122 122 |  | 
| 123 123 | 
             
                    get_names(snmp) if @rule_names.empty?
         | 
| 124 124 | 
             
                    res = gather_snmp_metrics_by_name("Rules/Time", @rule_names, OID_LTM_RULE_STAT_AVG_CYCLES, snmp)
         | 
| 125 | 
            -
                    NewRelic::PlatformLogger.debug("Rules: Got #{res.size}/#{@rule_names.size}  | 
| 125 | 
            +
                    NewRelic::PlatformLogger.debug("Rules: Got #{res.size}/#{@rule_names.size} Average Cycle metrics")
         | 
| 126 126 | 
             
                    return res
         | 
| 127 127 | 
             
                  end
         | 
| 128 128 |  | 
| @@ -49,7 +49,9 @@ module NewRelic | |
| 49 49 | 
             
                  OID_LTM_VIRTUAL_SERV_STAT                   = "#{OID_LTM_VIRTUAL_SERVERS}.2"
         | 
| 50 50 | 
             
                  OID_LTM_VIRTUAL_SERV_ENTRY                  = "#{OID_LTM_VIRTUAL_SERV_STAT}.3.1"
         | 
| 51 51 | 
             
                  OID_LTM_VIRTUAL_SERV_STAT_NAME              = "#{OID_LTM_VIRTUAL_SERV_ENTRY}.1"
         | 
| 52 | 
            +
                  OID_LTM_VIRTUAL_SERV_STAT_CLIENT_PKTS_IN    = "#{OID_LTM_VIRTUAL_SERV_ENTRY}.6"
         | 
| 52 53 | 
             
                  OID_LTM_VIRTUAL_SERV_STAT_CLIENT_BYTES_IN   = "#{OID_LTM_VIRTUAL_SERV_ENTRY}.7"
         | 
| 54 | 
            +
                  OID_LTM_VIRTUAL_SERV_STAT_CLIENT_PKTS_OUT   = "#{OID_LTM_VIRTUAL_SERV_ENTRY}.8"
         | 
| 53 55 | 
             
                  OID_LTM_VIRTUAL_SERV_STAT_CLIENT_BYTES_OUT  = "#{OID_LTM_VIRTUAL_SERV_ENTRY}.9"
         | 
| 54 56 | 
             
                  OID_LTM_VIRTUAL_SERV_STAT_CLIENT_TOT_CONNS  = "#{OID_LTM_VIRTUAL_SERV_ENTRY}.11"
         | 
| 55 57 | 
             
                  OID_LTM_VIRTUAL_SERV_STAT_CLIENT_CUR_CONNS  = "#{OID_LTM_VIRTUAL_SERV_ENTRY}.12"
         | 
| @@ -141,6 +143,36 @@ module NewRelic | |
| 141 143 |  | 
| 142 144 |  | 
| 143 145 |  | 
| 146 | 
            +
                  #
         | 
| 147 | 
            +
                  # Gather VS Packets Inbound
         | 
| 148 | 
            +
                  #
         | 
| 149 | 
            +
                  def get_packets_in (snmp = nil)
         | 
| 150 | 
            +
                    snmp = snmp_manager unless snmp
         | 
| 151 | 
            +
             | 
| 152 | 
            +
                    get_names(snmp) if @vs_names.empty?
         | 
| 153 | 
            +
                    res = gather_snmp_metrics_by_name("Virtual Servers/Packets/In", @vs_names, OID_LTM_VIRTUAL_SERV_STAT_CLIENT_PKTS_IN, snmp)
         | 
| 154 | 
            +
                    res = res.each_key { |n| res[n] *= 8 }
         | 
| 155 | 
            +
                    NewRelic::PlatformLogger.debug("Virtual Servers: Got #{res.size}/#{@vs_names.size} Inbound Packet metrics")
         | 
| 156 | 
            +
                    return res
         | 
| 157 | 
            +
                  end
         | 
| 158 | 
            +
             | 
| 159 | 
            +
             | 
| 160 | 
            +
             | 
| 161 | 
            +
                  #
         | 
| 162 | 
            +
                  # Gather VS Packets Outbound
         | 
| 163 | 
            +
                  #
         | 
| 164 | 
            +
                  def get_packets_out(snmp = nil)
         | 
| 165 | 
            +
                    snmp = snmp_manager unless snmp
         | 
| 166 | 
            +
             | 
| 167 | 
            +
                    get_names(snmp) if @vs_names.empty?
         | 
| 168 | 
            +
                    res = gather_snmp_metrics_by_name("Virtual Servers/Packets/Out", @vs_names, OID_LTM_VIRTUAL_SERV_STAT_CLIENT_PKTS_OUT, snmp)
         | 
| 169 | 
            +
                    res = res.each_key { |n| res[n] *= 8 }
         | 
| 170 | 
            +
                    NewRelic::PlatformLogger.debug("Virtual Servers: Got #{res.size}/#{@vs_names.size} Outbound Packet metrics")
         | 
| 171 | 
            +
                    return res
         | 
| 172 | 
            +
                  end
         | 
| 173 | 
            +
             | 
| 174 | 
            +
             | 
| 175 | 
            +
             | 
| 144 176 | 
             
                  #
         | 
| 145 177 | 
             
                  # Gather VS Throughput Inbound (returns in bits)
         | 
| 146 178 | 
             
                  #
         | 
    
        data/newrelic_f5_plugin.gemspec
    CHANGED
    
    | @@ -13,8 +13,8 @@ Gem::Specification.new do |s| | |
| 13 13 | 
             
              ## If your rubyforge_project name is different, then edit it and comment out
         | 
| 14 14 | 
             
              ## the sub! line in the Rakefile
         | 
| 15 15 | 
             
              s.name              = 'newrelic_f5_plugin'
         | 
| 16 | 
            -
              s.version           = '1.0. | 
| 17 | 
            -
              s.date              = '2014-02- | 
| 16 | 
            +
              s.version           = '1.0.12'
         | 
| 17 | 
            +
              s.date              = '2014-02-19'
         | 
| 18 18 | 
             
              s.rubyforge_project = 'newrelic_f5_plugin'
         | 
| 19 19 |  | 
| 20 20 | 
             
              ## Make sure your summary is short. The description may be as long
         | 
| @@ -75,6 +75,7 @@ to find out how to install and run the plugin agent. | |
| 75 75 | 
             
                config/newrelic_plugin.yml
         | 
| 76 76 | 
             
                lib/newrelic_f5_plugin.rb
         | 
| 77 77 | 
             
                lib/newrelic_f5_plugin/agent.rb
         | 
| 78 | 
            +
                lib/newrelic_f5_plugin/client_ssl.rb
         | 
| 78 79 | 
             
                lib/newrelic_f5_plugin/device.rb
         | 
| 79 80 | 
             
                lib/newrelic_f5_plugin/nodes.rb
         | 
| 80 81 | 
             
                lib/newrelic_f5_plugin/pools.rb
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: newrelic_f5_plugin
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.12
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2014-02- | 
| 12 | 
            +
            date: 2014-02-19 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: newrelic_plugin
         | 
| @@ -66,6 +66,7 @@ files: | |
| 66 66 | 
             
            - config/newrelic_plugin.yml
         | 
| 67 67 | 
             
            - lib/newrelic_f5_plugin.rb
         | 
| 68 68 | 
             
            - lib/newrelic_f5_plugin/agent.rb
         | 
| 69 | 
            +
            - lib/newrelic_f5_plugin/client_ssl.rb
         | 
| 69 70 | 
             
            - lib/newrelic_f5_plugin/device.rb
         | 
| 70 71 | 
             
            - lib/newrelic_f5_plugin/nodes.rb
         | 
| 71 72 | 
             
            - lib/newrelic_f5_plugin/pools.rb
         | 
| @@ -94,6 +95,9 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 94 95 | 
             
              - - ! '>='
         | 
| 95 96 | 
             
                - !ruby/object:Gem::Version
         | 
| 96 97 | 
             
                  version: '0'
         | 
| 98 | 
            +
                  segments:
         | 
| 99 | 
            +
                  - 0
         | 
| 100 | 
            +
                  hash: -1376077939883300417
         | 
| 97 101 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 98 102 | 
             
              none: false
         | 
| 99 103 | 
             
              requirements:
         |