License usage limit approaching-f5-False

error
false
ongoing-maintenance
f5
License usage limit approaching-f5-False
0

#1

License usage limit approaching-f5-False

Vendor: f5

OS: False

Description:
Some licenses are limited to a certain number of elements (such as maximum users). If any of the licenses is nearing its limit, an alert will be issued.

Remediation Steps:
Consider purchasing additional licenses.

How does this work?
This alert uses the iControl REST interface to extract the compression usage.

Why is this important?
Depending on platform and license a unit may have a limit to how much HTTP compression it will handle. This metric keeps track of the usage of HTTP compression.

Without Indeni how would you find this?
Login to the device through SSH, enter TMSH and execute the command “show ltm profile http-compression global”. The row “Total” and the column “Pre-Compress” shows the aggregated bytes compressed. This would then have to be calculated by taking the delta value between two measurements and divide it by the time between the two measurements.

f5-rest-mtmgt-tm-ltm-profile-http-compression-stats

 #! META
name: f5-rest-mtmgt-tm-ltm-profile-http-compression-stats
description: Determine compression usage
type: monitoring
monitoring_interval: 1 minute
requires:
    vendor: "f5"
    product: "load-balancer"
    rest-api: "true"

#! COMMENTS
license-elements-used:
    why: |
        Depending on platform and license a unit may have a limit to how much HTTP compression it will handle. This metric keeps track of the usage of HTTP compression.
    how: |
        This alert uses the iControl REST interface to extract the compression usage.
    without-indeni: |
        Login to the device through SSH, enter TMSH and execute the command "show ltm profile http-compression global". The row "Total" and the column "Pre-Compress" shows the aggregated bytes compressed. This would then have to be calculated by taking the delta value between two measurements and divide it by the time between the two measurements.
    can-with-snmp: true
    can-with-syslog: false

#! REMOTE::HTTP
url: /mgmt/tm/ltm/profile/http-compression/stats?options=global&$select=precompressBytes,nullCompressBytes
protocol: HTTPS

#! PARSER::JSON

_metrics:

    - # Gets the aggregated pre-compressed Mbits
        _tags:
            "im.name":
                _constant: "license-elements-used"
            "im.dstype.displaytype":
                _constant: "number"
            "im.dstype":
                _constant: "counter"
            "name":
                _constant: "Compression usage (Mbps)"
            "live-config":
                _constant: "true"
            "display-name":
                _constant: "License Utilization"
            "im.dstype.displayType":
                _constant: "number"
            "im.identity-tags":
                _constant: "name"
        _temp:
            "precompressBytes":
                _value: "$.entries.*.nestedStats.entries.precompressBytes.value"
        _transform:
            _value.double: |
                {
                    bits = temp("precompressBytes")*8
                    Mbits = bits/1000000

                    print Mbits
                }

f5-tmsh-show-sys-license-detail-show-sys-tmm-info-global

#! META
name: f5-tmsh-show-sys-license-detail-show-sys-tmm-info-global
description: Get the TPS limit, throughput limit and compression throughput limit
type: monitoring
monitoring_interval: 5 minutes
requires:
    vendor: "f5"
    product: "load-balancer"
    linux-based: "true"
    shell: "bash"

#! COMMENTS
license-elements-limit:
    why: |
        License-limits can be used to regulate for instance SSL Transactions per second, APM maximum simultaneous users, maximum throughput of an F5 VE Edition or maximum compressed Mbits per second. It is important to track these whenever possible to ensure that no traffic disruption is caused by the license reaching the set threshold.
    how: |
        This script logs into the device through SSH and extracts the license limits.
    without-indeni: |
        Manual tracking by an administrator is usually the only method for knowing if a license limit is set and what it is.
    can-with-snmp: false
    can-with-syslog: false
f5-service-check:
    why: |
        The service check date is located in the BIG-IP license and is the same as the date the license was last activated or the date the service contract for the device expires, whichever date is earlier. This alert would serve to let the administrators know that an upgrade to the latest version is not possible without a license reactivation.
    how: |
        This script logs into the device through SSH and extracts the service check date. The date is then compared to the latest entry in the official F5 list located at https://support.f5.com/csp/article/K7727.
    without-indeni: |
        Manual tracking by an administrator is usually the only method for knowing if a license reactivation is needed.
    can-with-snmp: false
    can-with-syslog: false
#! REMOTE::SSH
tmsh -q -c "show sys license detail;show sys tmm-info global"

#! PARSER::AWK

#perf_http_compression_Mbps
/^perf_http_compression_Mbps \[/ {
	
    maxCompressionThroughput = $2
    
	#Remove the brackets
	sub(/\[/,"", maxCompressionThroughput)
	sub(/\]/,"", maxCompressionThroughput)
	
    if(match(maxCompressionThroughput, /^\d+$/)){
    
        licenseElementsTag["name"] = "Maximum Compression Throughput (Mbps)"
        writeDoubleMetricWithLiveConfig("license-elements-limit", licenseElementsTag, "gauge", 300, maxCompressionThroughput, "License Limitation", "number", "name")
        
    }
    
}

#perf_VE_throughput_Mbps [10]
/^perf_VE_throughput_Mbps \[/ {
	
    maxThroughput = $2
    
	#Remove the brackets
	sub(/\[/,"", maxThroughput)
	sub(/\]/,"", maxThroughput)
    
    if(match(maxThroughput, /^\d+$/)){
    
        if(maxThroughput != 1){
        
            licenseElementsTag["name"] = "VE Edition Maximum Throughput (Mbps)"
            writeDoubleMetricWithLiveConfig("license-elements-limit", licenseElementsTag, "gauge", 300, maxThroughput, "License Limitation", "number", "name")
            
        }
        
    }
    
}

#perf_SSL_total_TPS [500]
/^perf_SSL_total_TPS \[/ {
	
    tpsPerCore = $2
    
	#Remove the brackets
	sub(/\[/,"", tpsPerCore)
	sub(/\]/,"", tpsPerCore)
    
}

#  TMM Count               2
/TMM Count/ {

    if(match(tpsPerCore, /^\d+$/)){
    
        licenseElementsTag["name"] = "SSL TPS"
        
        #License limit is multiplied by the tmm cores
        #  TMM Count               2
        
        tpsLimit = tpsPerCore * $3
        writeDoubleMetricWithLiveConfig("license-elements-limit", licenseElementsTag, "gauge", 300, tpsLimit, "License Limitation", "number", "name")
        
    }
    
}

#Service Check Date       2016/09/19
/Service Check Date/ {
    
    #Latest version service activation date
    #Found here: https://support.f5.com/csp/article/K7727
    
    latestServiceCheckDate = date("2017", "01", "13")
    
	#Split the date into an array
	split($4,serviceCheckDateArray, "/")
	
	year = serviceCheckDateArray[1]
	month = serviceCheckDateArray[2]
	day = serviceCheckDateArray[3]
    
    unitServiceCheckDatedate = date(year, month, day)
    
    #Check if the latest versions service check date is later than the units is
    if(latestServiceCheckDate > unitServiceCheckDatedate){
    
        status = 0
        
    } else {
    
        status = 1
    
    }
	
	writeDoubleMetric("f5-service-check", null, "gauge", 300, status)
    
}

license_usage_limit

package com.indeni.server.rules.library.templatebased.crossvendor

import com.indeni.server.rules.RuleContext
import com.indeni.server.rules.library.ConditionalRemediationSteps
import com.indeni.server.rules.library.templates.NearingCapacityWithItemsTemplateRule

/**
  *
  */
case class license_usage_limit() extends NearingCapacityWithItemsTemplateRule(
  ruleName = "license_usage_limit",
  ruleFriendlyName = "All Devices: License usage limit approaching",
  ruleDescription = "Some licenses are limited to a certain number of elements (such as maximum users). If any of the licenses is nearing its limit, an alert will be issued.",
  usageMetricName = "license-elements-used",
  limitMetricName = "license-elements-limit",
  applicableMetricTag = "name",
  threshold = 80.0,
  minimumValueToAlert = 2.0, // We don't want to alert if the license capacity is 1 and we're using one item, this is a common occurence and isn't an issue
  alertDescription = "Some licenses are nearing their limit. Review the list below.",
  alertItemDescriptionFormat = "The number of elements in use is %.0f where the limit is %.0f.",
  baseRemediationText = "Consider purchasing additional licenses.",
  alertItemsHeader = "Affected Licenses")(
  ConditionalRemediationSteps.OS_NXOS ->
    """|
      |1. Run the "show license usage" NX-OS command to display information about the current license usage and the expire date.
      |2. Run the "show license" NX-OS command to view the installed licenses.
      |3. Run the "show license usage XXX" NX-OS command e.g." sh license usage ENHANCED_LAYER2_PKG" to display information about the activated features which utilize this license.
      |4. Consider activate the grace-period for the license.
      |5. Order new license from the CISCO.
      |6. For more information please review the next Cisco guide:
      |https://www.cisco.com/c/m/en_us/techdoc/dc/reference/cli/nxos/commands/fund/show-license-usage.html
    """.stripMargin
)