License expiration nearing-radware-alteon-os

warn
alteon-os
radware
License expiration nearing-radware-alteon-os
0

#1

License expiration nearing-radware-alteon-os

Vendor: radware

OS: alteon-os

Description:
indeni will trigger an issue when a license is about to expire.

Remediation Steps:
Renew any licenses that need to be renewed.

alteon-api-config-AgLicenseInfoTable

#! META
name: alteon-api-config-AgLicenseInfoTable
description: Determine which loadbalancer features that are enabled
type: monitoring
monitoring_interval: 59 minutes
requires:
    os.name: "alteon-os"
    vendor: "radware"
    or:
        -
            vsx: "true"
        -
            standalone: "true"
#! COMMENTS
features-enabled:
    why: |
        The alteon loadbalancer has a set of features that can be enabled for each loadbalancer. These feature sets can be used in the critical infrastructure and are not enabled by default for each device. Usually, adding the license enables these features, but if the licenses generated for each unique Radware device has different featuresets enabled, this can become a problem should there be a failover and features such as the Web Application Firewall or the anti-DDoS are not enabled. We want to know ahead of time so that clustered loadbalancers do not experience any major issues.
    how: |
        This script runs the API query AgLicenseInfoTable and pulls the features that are enabled and identifies which ones are expiring.
    without-indeni: |
        An administrator would access the GUI->Configurations -> System -> Licenses -> Licensed Features.
    can-with-snmp: true
    can-with-syslog: false
    vendor-provided-management: |
        Can be done through Management GUI (Vision or Alteon VX).
#! REMOTE::HTTP
url: /config/AgLicenseInfoTable?props=SoftwareKey,TimeBasedLicenseStatus
protocol: HTTPS
#! PARSER::JSON
_metrics:
    -
        _groups:
            "$.AgLicenseInfoTable[0:]":
                _temp:
                    "name":
                        _value: "SoftwareKey"
                _tags:
                    "im.name":
                        _constant: "features-enabled"
                    "live-config":
                        _constant: "true"
                    "display-name":
                        _constant: "Features Enabled"
                    "im.identity-tags":
                        _constant: "Feature"
        _transform:
            _value.complex:
                "license": |
                    {
                    
                        #Let's define some friendly names for the known modules
                        moduleDictionary["global"] = "Global Server Load Balancing"
                        moduleDictionary["bwm"] = "Bandwidth Management"
                        moduleDictionary["ados"] = "Anti-DDos"
                        moduleDictionary["apm"] = "Application Performance Monitoring"
                        moduleDictionary["va"] = "Virtual Appliance"
                        moduleDictionary["fastview"] = "Fastview"
                        moduleDictionary["fastview+"] = "Fastview+"
                        moduleDictionary["fastview++"] = "Fastview++"
                        moduleDictionary["AppWall"] = "AppWall"
                        moduleDictionary["AppWall+"] = "AppWall+"
                        moduleDictionary["AppWall++"] = "AppWall++"
                        
                        #Look up the module in the moduleDictionary. If it does not exist, resort to the original value
                        if (temp("name") in moduleDictionary){
                            print moduleDictionary[temp("name")]
                        } else {
                            print temp("name")
                        }
                        
                    }
        _value: complex-array
    -
        _groups:
            "$.AgLicenseInfoTable[0:][?(@.TimeBasedLicenseStatus != 'Permanent')]":
                _tags:
                    "im.name":
                        _constant: "license-expiration"
                _temp:
                    "expiredDate":
                        _value: "TimeBasedLicenseStatus"
                    "name":
                        _value: "SoftwareKey"
        _transform:
            _tags:
                "name": |
                    {
                    
                        #Let's define some friendly names for the known modules
                        moduleDictionary["global"] = "Global Server Load Balancing"
                        moduleDictionary["bwm"] = "Bandwidth Management"
                        moduleDictionary["ados"] = "Anti-DDos"
                        moduleDictionary["apm"] = "Application Performance Monitoring"
                        moduleDictionary["va"] = "Virtual Appliance"
                        moduleDictionary["fastview"] = "Fastview"
                        moduleDictionary["fastview+"] = "Fastview+"
                        moduleDictionary["fastview++"] = "Fastview++"
                        moduleDictionary["AppWall"] = "AppWall"
                        moduleDictionary["AppWall+"] = "AppWall+"
                        moduleDictionary["AppWall++"] = "AppWall++"
                        
                        #Look up the module in the moduleDictionary. If it does not exist, resort to the original value
                        if(temp("name") in moduleDictionary){
                            print moduleDictionary[temp("name")]
                        } else {
                            print temp("name")
                        }
                        
                    }
            _value.double: |
                {
                
                    #Expires on 13-MAY-2018
                    split(temp("expiredDate"), lineArr, " ")
                    split(lineArr[3], dateArr, "-")
                    
                    #["13", "MAY", "2018"]
                    day = dateArr[1]
                    month = parseMonthThreeLetter(dateArr[2])
                    year = dateArr[3]
                    #Convert the dates to seconds since epoch
                    secondSinceEpoch = date(year, month, day)
                    
                    print secondSinceEpoch
                    
                }

RuleMetadata

.builder("cross_vendor_license_expiration
Failed to fetch the data: https://bitbucket.org/indeni/indeni-knowledge/src/master/rules/sync_core_rules/LicenseWillExpireRule.scala