License usage limit approaching-radware-alteon-os

error
ongoing-maintenance
alteon-os
radware
License usage limit approaching-radware-alteon-os
0

#1

License usage limit approaching-radware-alteon-os

Vendor: radware

OS: alteon-os

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 Alteon API “ip-address/config/AgLicenseCapacityInfoTable” to pull License Capacity Table and looks at the license utilization.

Why is this important?
Reaching the limit on number of virtual systems allowed, means no new virtual systems can be created.

Without Indeni how would you find this?
Login to the device through SSH and find license utilization, or run API command “ip-address/config/AgLicenseCapacityInfoTable”.

radware-api-config-aglicensecapacityinfotable

#! META
name: radware-api-config-aglicensecapacityinfotable
description: Determine license usage
type: monitoring
monitoring_interval: 1 minute 
requires:
    os.name: "alteon-os"
    vendor: "radware"

#! COMMENTS
license-elements-limit:
    why: |
        Depending on platform and license a unit may have a limit to how much it will handle. This metric keeps track of the usage of licenses with capacity limits.
    how: |
        This alert uses the Alteon API to pull License Capacity Table and looks at the license capacity.
    without-indeni: |
        Login to the device through SSH and find license utilization, or run API command ip-address/config/AgLicenseCapacityInfoTable.
    can-with-snmp: true
    can-with-syslog: false
    vendor-provided-management: |
        This can only be tested from the command line interface.
license-elements-used:
    why: |
        Reaching the limit on number of virtual systems allowed, means no new virtual systems can be created.
    how: |
        This alert uses the Alteon API "ip-address/config/AgLicenseCapacityInfoTable" to pull License Capacity Table and looks at the license utilization.
    without-indeni: |
        Login to the device through SSH and find license utilization, or run API command "ip-address/config/AgLicenseCapacityInfoTable".
    can-with-snmp: false
    can-with-syslog: false
    vendor-provided-management: |
        Listing the current number of installed virtual systems and the limit is available from the command line interface.

#! REMOTE::HTTP
url: /config/AgLicenseCapacityInfoTable
protocol: HTTPS

#! PARSER::AWK
BEGIN {
    FS = ":"
    idx = ""
}

# "LicenseCapacityInfoIdx": 9,
/LicenseCapacityInfoIdx/ {
    idx = cleanJsonValue($NF)
}

# "LicenseCapacitySize": 10000,
/LicenseCapacitySize/ {
    size_string = cleanJsonValue($NF)  
    limit = size_string
}

# "LicenseCapacityCurrUsage": "880.65 Mbps",
/LicenseCapacityCurrUsage/ {
    current_string = cleanJsonValue($NF)
    # example: current_string = "880.65 Mbps"
    split(current_string, vals, " ")
    current = vals[1]
    # example: current = 880.65
    if (arraylen(vals) == 2) {
        currentunit = vals[2]
        # unify the throughput unit to Mbps
        if (currentunit == "Gbps") {
            current = current * 1000
            currentunit = "Mbps"
        } else if (currentunit == "bps") {
            current = current / 1000000
            currentunit = "Mbps"
        }
    } else {
        currentunit = ""
    }
}

# },
/\}/ {
    if ( idx == "8" ) {
        licensetags["name"] = "vADC"
    } else if (idx == "9") {
        licensetags["name"] = "Throughput (Mbps)"
    } else if (idx == "10") {
        licensetags["name"] = "SSL (CPS)"
    } else if (idx == "11") {
        licensetags["name"] = "Compression (Mbps)"
    } else if (idx == "12") {
        licensetags["name"] = "APM (PgPM)"
    } else if (idx == "101") {
        licensetags["name"] = "Fastview (PgPS)"
    } else if (idx == "16") {
        licensetags["name"] = "AppWall (Mbps)"
    } else if (idx == "17") {
        licensetags["name"] = "Authentication (users)"
    } else {
        # next line
        next
    }

    if (current != "N/A") {
        writeDoubleMetricWithLiveConfig("license-elements-used", licensetags, "gauge", "60", current, "Licenses Usage", "number", "name")
    }
    if (limit != "N/A") {
        writeDoubleMetricWithLiveConfig("license-elements-limit", licensetags, "gauge", "60", limit, "Licenses Limit", "number", "name")
    }
}


radware-api-config-aglicensecapacityinfotable

#! META
name: radware-api-config-aglicensecapacityinfotable
description: Determine license usage
type: monitoring
monitoring_interval: 1 minute 
requires:
    os.name: "alteon-os"
    vendor: "radware"

#! COMMENTS
license-elements-limit:
    why: |
        Depending on platform and license a unit may have a limit to how much it will handle. This metric keeps track of the usage of licenses with capacity limits.
    how: |
        This alert uses the Alteon API to pull License Capacity Table and looks at the license capacity.
    without-indeni: |
        Login to the device through SSH and find license utilization, or run API command ip-address/config/AgLicenseCapacityInfoTable.
    can-with-snmp: true
    can-with-syslog: false
    vendor-provided-management: |
        This can only be tested from the command line interface.
license-elements-used:
    why: |
        Reaching the limit on number of virtual systems allowed, means no new virtual systems can be created.
    how: |
        This alert uses the Alteon API "ip-address/config/AgLicenseCapacityInfoTable" to pull License Capacity Table and looks at the license utilization.
    without-indeni: |
        Login to the device through SSH and find license utilization, or run API command "ip-address/config/AgLicenseCapacityInfoTable".
    can-with-snmp: false
    can-with-syslog: false
    vendor-provided-management: |
        Listing the current number of installed virtual systems and the limit is available from the command line interface.

#! REMOTE::HTTP
url: /config/AgLicenseCapacityInfoTable
protocol: HTTPS

#! PARSER::AWK
BEGIN {
    FS = ":"
    idx = ""
}

# "LicenseCapacityInfoIdx": 9,
/LicenseCapacityInfoIdx/ {
    idx = cleanJsonValue($NF)
}

# "LicenseCapacitySize": 10000,
/LicenseCapacitySize/ {
    size_string = cleanJsonValue($NF)  
    limit = size_string
}

# "LicenseCapacityCurrUsage": "880.65 Mbps",
/LicenseCapacityCurrUsage/ {
    current_string = cleanJsonValue($NF)
    # example: current_string = "880.65 Mbps"
    split(current_string, vals, " ")
    current = vals[1]
    # example: current = 880.65
    if (arraylen(vals) == 2) {
        currentunit = vals[2]
        # unify the throughput unit to Mbps
        if (currentunit == "Gbps") {
            current = current * 1000
            currentunit = "Mbps"
        } else if (currentunit == "bps") {
            current = current / 1000000
            currentunit = "Mbps"
        }
    } else {
        currentunit = ""
    }
}

# },
/\}/ {
    if ( idx == "8" ) {
        licensetags["name"] = "vADC"
    } else if (idx == "9") {
        licensetags["name"] = "Throughput (Mbps)"
    } else if (idx == "10") {
        licensetags["name"] = "SSL (CPS)"
    } else if (idx == "11") {
        licensetags["name"] = "Compression (Mbps)"
    } else if (idx == "12") {
        licensetags["name"] = "APM (PgPM)"
    } else if (idx == "101") {
        licensetags["name"] = "Fastview (PgPS)"
    } else if (idx == "16") {
        licensetags["name"] = "AppWall (Mbps)"
    } else if (idx == "17") {
        licensetags["name"] = "Authentication (users)"
    } else {
        # next line
        next
    }

    if (current != "N/A") {
        writeDoubleMetricWithLiveConfig("license-elements-used", licensetags, "gauge", "60", current, "Licenses Usage", "number", "name")
    }
    if (limit != "N/A") {
        writeDoubleMetricWithLiveConfig("license-elements-limit", licensetags, "gauge", "60", limit, "Licenses Limit", "number", "name")
    }
}


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
)