Compression profile gzip level too high-f5-all

Compression profile gzip level too high-f5-all
0

Compression profile gzip level too high-f5-all

Vendor: f5

OS: all

Description:
Setting a higher compression level makes compressed content smaller, but the cost of higher CPU usage and longer time to compress the content. The difference in terms of percentage gets lower the higher the level and setting this too high is not recommended. indeni will alert if the gzip compression level is too high.

Remediation Steps:
Set the compression level to a value RuleEquals, or below 6 for the reported profiles\nhttps://support.f5.com/csp/article/K3393

How does this work?
This alert uses the iControl REST interface to extract compression levels set for each of the configured HTTP Compression Profiles.

Why is this important?
Setting a higher compression level makes compressed content smaller, but the cost of higher CPU usage and longer time to compress the content. The difference in terms of percentage gets lower the higher the level and setting this too high is not recommended. This metric would alert for any levels above 6.

Without Indeni how would you find this?
Login to the device’s web interface and click on “Local Traffic” -> “Profiles” -> “HTTP Compression”. This would show a list of the available compression profiles. For each profile in the list, check the option “gzip Compression Level”. In case the configuration is divided in multiple partitions changing to the “All [Read-only]” partition is recommended.

f5-rest-mgmt-tm-ltm-profile-http-compression

name: f5-rest-mgmt-tm-ltm-profile-http-compression
description: Determine compression level of compression profiles
type: monitoring
monitoring_interval: 60 minutes
requires:
    vendor: f5
    product: load-balancer
    rest-api: 'true'
comments:
    f5-high-compression-profile-high-gzip-level:
        why: |
            Setting a higher compression level makes compressed content smaller, but the cost of higher CPU usage and longer time to compress the content. The difference in terms of percentage gets lower the higher the level and setting this too high is not recommended. This metric would alert for any levels above 6.
        how: |
            This alert uses the iControl REST interface to extract compression levels set for each of the configured HTTP Compression Profiles.
        without-indeni: |
            Login to the device's web interface and click on "Local Traffic" -> "Profiles" -> "HTTP Compression". This would show a list of the available compression profiles. For each profile in the list, check the option "gzip Compression Level". In case the configuration is divided in multiple partitions changing to the "All [Read-only]" partition is recommended.
        can-with-snmp: true
        can-with-syslog: false
steps:
-   run:
        type: HTTP
        command: /mgmt/tm/ltm/profile/http-compression?$select=fullPath,gzipLevel,contentTypeInclude
    parse:
        type: JSON
        file: rest-mgmt-tm-ltm-profile-http-compression.parser.1.json.yaml

f5_high_compression_profile

// Deprecation warning : Scala template-based rules are deprecated. Please use YAML format rules instead.

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

import com.indeni.server.rules.RuleContext
import com.indeni.server.rules.library.templates.NumericThresholdOnComplexMetricWithItemsTemplateRule
import com.indeni.server.rules.ThresholdDirection

/**
  *
  */
case class f5_high_compression_profile() extends NumericThresholdOnComplexMetricWithItemsTemplateRule(
  ruleName = "f5_high_compression_profile",
  ruleFriendlyName = "F5 Devices: Compression profile gzip level too high",
  ruleDescription = "Setting a higher compression level makes compressed content smaller, but the cost of higher CPU usage and longer time to compress the content. The difference in terms of percentage gets lower the higher the level and setting this too high is not recommended. indeni will alert if the gzip compression level is too high.",
  metricName = "f5-high-compression-profile-high-gzip-level",
  threshold = 6.0,
  thresholdDirection = ThresholdDirection.ABOVE,
  applicableMetricTag = "name",
  alertItemsHeader = "Affected Profiles",
  alertDescription = "Setting a higher compression level makes compressed content smaller, but the cost of higher CPU usage and longer time to compress the content. The difference in terms of percentage gets lower the higher the level and setting this too high is not recommended. In general the increments after level 4 comes in the ranges of 0.15-0.25%. Of course this depends on the content being served.\n\nThis alert was added per the request of <a target=\"_blank\" href=\"https://se.linkedin.com/in/patrik-jonsson-6527932\">Patrik Jonsson</a>.",
  alertItemDescriptionFormat = "The compression level used is %.0f",
  baseRemediationText = "Set the compression level to a value RuleEquals, or below 6 for the reported profiles\nhttps://support.f5.com/csp/article/K3393")()