TX packets experienced errors-paloaltonetworks-panos

error
health-checks
panos
paloaltonetworks
TX packets experienced errors-paloaltonetworks-panos
0

#1

TX packets experienced errors-paloaltonetworks-panos

Vendor: paloaltonetworks

OS: panos

Description:
Indeni tracks the number of packets that had issues and alerts if the ratio is too high.

Remediation Steps:
Packet errors usually occur when there is a mismatch in the speed and duplex settings on two sides of a cable, or a damaged cable.

How does this work?
This script logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of egress errors on an interface.

Why is this important?
If outgoing packets are being dropped on a network interface, it is important to be aware of it. This may be due to egress errors on an interface.

Without Indeni how would you find this?
The traffic statistics of network interfaces can be retrieved through SNMP in newer versions of PAN-OS (7.x).

panos-show-high-availability-interface-ha3

#! META
name: panos-show-high-availability-interface-ha3
description: Fetch HA3 interface stats
type: monitoring
monitoring_interval: 5 minute
requires:
    vendor: "paloaltonetworks"
    os.name: "panos"
    high-availability: "true"

#! COMMENTS
network-interface-admin-state:
    why: |
        If a network interface is set to be up (what's known as "admin up") but is actually down (a cable is not connected, the device on the other side is down, etc.) it is important to know.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for interfaces that are set to be up, but are actually down.
    without-indeni: |
        The status of network interfaces can be retrieved through SNMP.
    can-with-snmp: true
    can-with-syslog: true
network-interface-speed:
    why: |
        Generally, these days network interfaces are set at 1Gbps or more. Sometimes, due to a configuration or device issue, an interface can be set below that (to 100mbps or even 10mbps). As that is usually _not_ the intended behavior, it is important to track the speed of all network interfaces.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the actual runtime speed of each interface.
    without-indeni: |
        The speed of network interfaces can be retrieved through SNMP.
    can-with-snmp: true
    can-with-syslog: true
network-interface-duplex:
    why: |
        Generally, these days network interfaces are set at full duplex. Sometimes, due to a configuration or device issue, an interface can be set to half duplex. As that is usually _not_ the intended behavior, it is important to track the duplex setting of all network interfaces.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the actual runtime duplex of each interface.
    without-indeni: |
        The duplex of network interfaces can be retrieved through SNMP.
    can-with-snmp: true
    can-with-syslog: true
network-interface-tx-packets:
    why: |
        Tracking the number of packets flowing through each network interface is important to identify potential issues, spikes in traffic, etc.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of packets transmitted through the interface.
    without-indeni: |
        The traffic statistics of network interfaces can be retrieved through SNMP in newer versions of PAN-OS (7.x).
    can-with-snmp: true
    can-with-syslog: true
network-interface-tx-bytes:
    why: |
        Tracking the amount of data flowing through each network interface is important to identify potential issues, spikes in traffic, etc.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of bytes transmitted through the interface.
    without-indeni: |
        The traffic statistics of network interfaces can be retrieved through SNMP in newer versions of PAN-OS (7.x).
    can-with-snmp: true
    can-with-syslog: true
network-interface-rx-packets:
    why: |
        Tracking the number of packets flowing through each network interface is important to identify potential issues, spikes in traffic, etc.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of packets received through the interface.
    without-indeni: |
        The traffic statistics of network interfaces can be retrieved through SNMP in newer versions of PAN-OS (7.x).
    can-with-snmp: true
    can-with-syslog: true
network-interface-rx-bytes:
    why: |
        Tracking the amount of data flowing through each network interface is important to identify potential issues, spikes in traffic, etc.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of bytes received through the interface.
    without-indeni: |
        The traffic statistics of network interfaces can be retrieved through SNMP in newer versions of PAN-OS (7.x).
    can-with-snmp: true
    can-with-syslog: true
network-interface-tx-dropped:
    why: |
        If outgoing packets are being dropped on a network interface, it is important to be aware of it. This may be due to a high load on the firewall, or another capacity issue.
    how: |
        This script logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of packets dropped on an interface.
    without-indeni: |
        The traffic statistics of network interfaces can be retrieved through SNMP in newer versions of PAN-OS (7.x).
    can-with-snmp: true
    can-with-syslog: true
network-interface-tx-errors:
    why: |
        If outgoing packets are being dropped on a network interface, it is important to be aware of it. This may be due to egress errors on an interface.
    how: |
        This script logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of egress errors on an interface.
    without-indeni: |
        The traffic statistics of network interfaces can be retrieved through SNMP in newer versions of PAN-OS (7.x).
    can-with-snmp: true
    can-with-syslog: true
network-interface-tx-carrier:
    why: |
        If outgoing packets are being dropped on a network interface, it is important to be aware of it. This may be due to a signal issue on an interface.
    how: |
        This script logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of carrier transitions on an interface.
    without-indeni: |
        The traffic statistics of network interfaces can be retrieved through SNMP in newer versions of PAN-OS (7.x).
    can-with-snmp: true
    can-with-syslog: true
network-interface-rx-dropped:
    why: |
        If incoming packets are being dropped on a network interface, it is important to be aware of it. This may be due to a high load on the firewall, or another capacity issue.
    how: |
        This script logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of packets dropped on an interface.
    without-indeni: |
        The traffic statistics of network interfaces can be retrieved through SNMP in newer versions of PAN-OS (7.x).
    can-with-snmp: true
    can-with-syslog: true
network-interface-rx-frame:
    why: |
        If incoming frames are being dropped on a network interface, it is important to be aware of it. This may be due to a framing errors on the link, or another cabling issue.
    how: |
        This script logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of frames dropped on an interface.
    without-indeni: |
        The traffic statistics of network interfaces can be retrieved through SNMP in newer versions of PAN-OS (7.x).
    can-with-snmp: true
    can-with-syslog: true
network-interface-state:
    skip-documentation: true
network-interface-mac:
    skip-documentation: true
network-interface-rx-errors:
    skip-documentation: true
network-interfaces:
    skip-documentation: true

#! REMOTE::HTTP
url: /api?type=op&cmd=<show><high-availability><interface>ha3</interface></high-availability></show>&key=${api-key}
protocol: HTTPS

#! PARSER::XML
_vars:
    root: /response/result/entry
_optional_metrics:
    -
        _tags:
            "im.name":
                _constant: "network-interface-state"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
        _temp:
            "state":
                _text: "${root}/hw/state"
        _transform:
            _value.double: |
                {
                    if (temp("state") == "up") {
                        print "1"
                    } else {
                        print "0"
                    }
                }
    -

        _tags:
            "im.name":
                _constant: "network-interface-admin-state"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
        _temp:
            "state_c":
                _text: "${root}/hw/state_c"
        _transform:
            _value.double: |
                {
                    if (temp("state_c") == "up" || temp("state_c") == "auto") {
                        print "1"
                    } else {
                        print "0"
                    }
                }
    -
        _tags:
            "im.name":
                _constant: "network-interface-duplex"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
        _value.complex:
            value:
                _text: "${root}/hw[not(duplex = 'unknown')]/duplex"
    -
        _tags:
            "im.name":
                _constant: "network-interface-speed"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
        _temp:
            "speed":
                _text: ${root}/hw[not(speed = 'unknown')]/speed
        _transform:
            _tags:
                "alert-item-port-speed": |
                    {
                        print tag("name") "-" temp("speed") "M"
                    }
            _value.complex:
                value: |
                    {
                        print temp("speed") "M"
                    }
    -
        _tags:
            "im.name":
                _constant: "network-interface-mac"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
        _value.complex:
            value:
                _text: "${root}/hw/mac"
    -
        _tags:
            "im.name":
                _constant: "network-interface-tx-bytes"
            "name":
                _text: "${root}/hw/name"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/tx-bytes"
    -
        _tags:
            "im.name":
                _constant: "network-interface-rx-bytes"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/rx-bytes"
    -
        _tags:
            "im.name":
                _constant: "network-interface-tx-packets"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/tx-packets"
    -
        _tags:
            "im.name":
                _constant: "network-interface-rx-packets"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/rx-packets"
    -
        _tags:
            "im.name":
                _constant: "network-interface-rx-errors"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/rx-errs"
    -
        _tags:
            "im.name":
                _constant: "network-interface-tx-errors"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/tx-errs"
    -
        _tags:
            "im.name":
                _constant: "network-interface-rx-dropped"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/rx-drop"
    -
        _tags:
            "im.name":
                _constant: "network-interface-tx-dropped"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/tx-drop"
    -
        _tags:
            "im.name":
                _constant: "network-interface-tx-carrier"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/tx-carrier"
    -
        _tags:
            "im.name":
                _constant: "network-interface-rx-frame"
            "name":
                _text: "${root}/hw/name"
            "high-availability-interface":
                _constant: "true"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/rx-frame"
    -
        _tags:
            "im.name":
                _constant: "network-interfaces"
            "high-availability-interface":
                _constant: "true"
        _value.complex:
            "name":
                _text: "${root}/hw/name"
        _value: complex-array

panos-show-interface

#! META
name: panos-show-interface
description: Fetch interface information and stats
type: monitoring
monitoring_interval: 5 minute
requires:
    vendor: paloaltonetworks
    os.name: panos
    product: firewall

#! COMMENTS
network-interface-admin-state:
    why: |
        If a network interface is set to be up (what's known as "admin up") but is actually down (a cable is not connected, the device on the other side is down, etc.) it is important to know.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for interfaces that are set to be up, but are actually down.
    without-indeni: |
        An administrator would normally use SNMP or write a script to poll the status and details of network interfaces and alert accordingly.
    can-with-snmp: true
    can-with-syslog: true
network-interface-speed:
    why: |
        Generally, these days network interfaces are set at 1Gbps or more. Sometimes, due to a configuration or device issue, an interface can be set below that (to 100mbps or even 10mbps). As that is usually _not_ the intended behavior, it is important to track the speed of all network interfaces.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the actual runtime speed of each interface.
    without-indeni: |
        The status of network interfaces is visible through the web interface. If a configured interface is down, it will appear with a red indicator.
    can-with-snmp: true
    can-with-syslog: true
network-interface-bandwidth-mbps:
    why: |
        This is similar to network-interface-speed but returns double value for alerting purpose.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the actual runtime speed of each interface.
    without-indeni: |
        The status of network interfaces is visible through the web interface. If a configured interface is down, it will appear with a red indicator.
    can-with-snmp: true
    can-with-syslog: true
network-interface-duplex:
    why: |
        Generally, these days network interfaces are set at full duplex. Sometimes, due to a configuration or device issue, an interface can be set to half duplex. As that is usually _not_ the intended behavior, it is important to track the duplex setting of all network interfaces.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the actual runtime duplex of each interface.
    without-indeni: |
        The duplex setting of network interfaces can be manually reviewed through the CLI.
    can-with-snmp: true
    can-with-syslog: true
network-interface-tx-packets:
    why: |
        Tracking the number of packets flowing through each network interface is important to identify potential issues, spikes in traffic, etc.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of packets transmitted through the interface.
    without-indeni: |
        The traffic statistics of network interfaces can be manually reviewed through the CLI.
    can-with-snmp: true
    can-with-syslog: true
network-interface-tx-bytes:
    why: |
        Tracking the amount of data flowing through each network interface is important to identify potential issues, spikes in traffic, etc.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of bytes transmitted through the interface.
    without-indeni: |
        The traffic statistics of network interfaces can be manually reviewed through the CLI.
    can-with-snmp: true
    can-with-syslog: true
network-interface-rx-packets:
    why: |
        Tracking the number of packets flowing through each network interface is important to identify potential issues, spikes in traffic, etc.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of packets received through the interface.
    without-indeni: |
        The traffic statistics of network interfaces can be manually reviewed through the CLI.
    can-with-snmp: true
    can-with-syslog: true
network-interface-rx-bytes:
    why: |
        Tracking the amount of data flowing through each network interface is important to identify potential issues, spikes in traffic, etc.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of bytes received through the interface.
    without-indeni: |
        The traffic statistics of network interfaces can be manually reviewed through the CLI.
    can-with-snmp: true
    can-with-syslog: true
network-interface-rx-dropped:
    why: |
        If incoming packets are being dropped on a network interface, it is important to be aware of it. This may be due to a high load on the firewall, or another capacity issue.
    how: |
        This script logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for the number of packets dropped on an interface.
    without-indeni: |
        The traffic statistics of network interfaces can be manually reviewed through the CLI.
    can-with-snmp: true
    can-with-syslog: true
network-interface-state:
    why: |
        If a network interface is set to be up (what's known as "admin up") but is actually down (a cable is not connected, the device on the other side is down, etc.) it is important to know.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it looks for interfaces that are set to be up, but are actually down.
    without-indeni: |
        An administrator would normally use SNMP or write a script to poll the status and details of network interfaces and alert accordingly.
    can-with-snmp: true
    can-with-syslog: true
network-interface-mtu:
    why: |
        The MTU of an interface may be inadvertently set to a low value. It's important to know if this happens and fix it.
    how: |
        This alert logs into the Palo Alto Networks firewall through SSH and retrieves the status of all network interfaces. In that output, it retrieves the MTU values.
    without-indeni: |
        Alerting on low MTU values normally requires scripting to be done by the administrator.
    can-with-snmp: true
    can-with-syslog: true
network-interface-mac:
    skip-documentation: true
network-interface-rx-errors:
    skip-documentation: true
network-interfaces:
    skip-documentation: true

#! REMOTE::HTTP
url: /api?type=op&cmd=<show><interface>all</interface></show>&key=${api-key}
protocol: HTTPS

#! PARSER::XML
_vars:
    root: /response/result
_dynamic_vars:
    _dynamic:
        nic:
            _text: "${root}/ifnet/entry[contains(name, '/')]/name"

#! REMOTE::HTTP
url: /api?type=op&cmd=<show><interface>${nic}</interface></show>&key=${api-key}
protocol: HTTPS

#! PARSER::XML
_vars:
    root: /response/result
_metrics:
    -
        _tags:
            "im.name":
                _constant: "network-interface-state"
            "name":
                _text: "${root}/ifnet/name"
            "live-config":
                _constant: "true"
            "display-name":
                _constant: "Interface state"
            "im.dstype.displayType":
                _constant: "state"
            "im.identity-tags":
                _constant: "name"
        _temp:
            "state":
                _text: "${root}/hw/state"
        _transform:
            _value.double: |
                {
                    if (temp("state") == "up") {
                        print "1"
                    } else {
                        print "0"
                    }
                }
    -
        _tags:
            "im.name":
                _constant: "network-interface-admin-state"
            "name":
                _text: "${root}/ifnet/name"
            "live-config":
                _constant: "true"
            "display-name":
                _constant: "Interface admin states"
            "im.dstype.displayType":
                _constant: "state"
            "im.identity-tags":
                _constant: "name"
        _temp:
            "state_c":
                _text: "${root}/hw/state_c"
        _transform:
            _value.double: |
                {
                    if (temp("state_c") == "up" || temp("state_c") == "auto") {
                        print "1"
                    } else {
                        print "0"
                    }
                }
    -
        _tags:
            "im.name":
                _constant: "network-interface-duplex"
            "name":
                _text: "${root}/ifnet/name"
            "live-config":
                _constant: "true"
            "display-name":
                _constant: "Interface duplex settings"
            "im.identity-tags":
                _constant: "name"
        _value.complex:
            value:
                _text: "${root}/hw[not(duplex = 'unknown')]/duplex"
    -
        _tags:
            "im.name":
                _constant: "network-interface-speed"
            "name":
                _text: "${root}/ifnet/name"
            "live-config":
                _constant: "true"
            "display-name":
                _constant: "Interface speeds"
            "im.identity-tags":
                _constant: "name"
        _temp:
            "speed":
                _text: ${root}/hw[not(speed = 'unknown')]/speed
        _transform:
            _value.complex:
                value: |
                    {
                        print temp("speed") "M"
                    }
    -
        _tags:
            "im.name":
                _constant: "network-interface-bandwidth-mbps"
            "name":
                _text: "${root}/ifnet/name"
        _transform:
            _tags:
                "name": |
                    {
                        print dynamic("nic")
                    }
        _value.double:
            _text: ${root}/hw[not(speed = 'unknown')]/speed
    -
        _tags:
            "im.name":
                _constant: "network-interface-mtu"
            "name":
                _text: "${root}/ifnet/name"
            "live-config":
                _constant: "true"
            "display-name":
                _constant: "Interface MTU settings"
            "im.dstype.displayType":
                _constant: "number"
            "im.identity-tags":
                _constant: "name"
        _value.complex:
            value:
                _text: "${root}/ifnet/mtu"
    -
        _tags:
            "im.name":
                _constant: "network-interface-mac"
            "name":
                _text: "${root}/ifnet/name"
            "live-config":
                _constant: "true"
            "display-name":
                _constant: "Interface mac addresses"
            "im.identity-tags":
                _constant: "name"
        _value.complex:
            value:
                _text: "${root}/hw/mac"
    -
        _tags:
            "im.name":
                _constant: "network-interface-tx-bytes"
            "name":
                _text: "${root}/ifnet/name"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/hw/entry/obytes"
    -
        _tags:
            "im.name":
                _constant: "network-interface-rx-bytes"
            "name":
                _text: "${root}/ifnet/name"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/hw/entry/ibytes"
    -
        _tags:
            "im.name":
                _constant: "network-interface-tx-packets"
            "name":
                _text: "${root}/ifnet/name"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/hw/entry/opackets"
    -
        _tags:
            "im.name":
                _constant: "network-interface-rx-packets"
            "name":
                _text: "${root}/ifnet/name"
            "im.dsType":
                _constant: "counter"
        _value.double:
            _text: "${root}/ifnet/counters/hw/entry/ipackets"
    -
        _tags:
            "im.name":
                _constant: "network-interface-rx-errors"
            "name":
                _text: "${root}/ifnet/name"
            "live-config":
                _constant: "true"
            "im.dsType":
                _constant: "counter"
            "display-name":
                _constant: "Interface RX errors"
            "im.dstype.displayType":
                _constant: "number"
            "im.identity-tags":
                _constant: "name"
        _value.double:
            _text: "${root}/ifnet/counters/hw/entry/ierrors"
    -
        _tags:
            "im.name":
                _constant: "network-interface-rx-dropped"
            "name":
                _text: "${root}/ifnet/name"
            "live-config":
                _constant: "true"
            "display-name":
                _constant: "Interface rx dropped"
            "im.dsType":
                _constant: "counter"
            "im.dstype.displayType":
                _constant: "number"
            "im.identity-tags":
                _constant: "name"
        _value.double:
            _text: "${root}/ifnet/counters/hw/entry/idrops"
    -
        _tags:
            "im.name":
                _constant: "network-interfaces"
        _value.complex:
            "name":
                _text: "${root}/ifnet/name"
        _value: complex-array

cross_vendor_tx_error

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

import com.indeni.server.rules.RuleContext
import com.indeni.server.rules.library.{ConditionalRemediationSteps, NearingCapacityWithItemsTemplateRule}

/**
  *
  */
case class CrossVendorTxError() extends NearingCapacityWithItemsTemplateRule(
  ruleName = "cross_vendor_tx_error",
  ruleFriendlyName = "All Devices: TX packets experienced errors",
  ruleDescription = "Indeni tracks the number of packets that had issues and alerts if the ratio is too high.",
  usageMetricName = "network-interface-tx-errors",
  limitMetricName = "network-interface-tx-packets",
  applicableMetricTag = "name",
  threshold = 0.5,
  minimumValueToAlert = 100.0, // We don't want to alert if the number of error packets is really low
  alertDescription = "Some network interfaces and ports are experiencing a high error rate. Review the ports below.",
  alertItemDescriptionFormat = "%.0f error packets identified out of a total of %.0f transmitted.",
  baseRemediationText = "Packet errors usually occur when there is a mismatch in the speed and duplex settings on two sides of a cable, or a damaged cable.",
  alertItemsHeader = "Affected Ports")(
  ConditionalRemediationSteps.OS_NXOS ->
    """|
       |1. Run the "show interface" command to review the interface error counters and the bitrate. Consider to configure the "load-interval 30" interface sub command to improve the accuracy of the interface measurements.
       |2. Check for a mismatch in the speed and duplex interface settings on two sides of a cable, or for a damaged cable.
       |3. Use the "show interface counters errors" NX-OS command to display detailed interface error counters. If you do not specify an interface, this command displays information about all Layer 2 interfaces.""".stripMargin,
  ConditionalRemediationSteps.VENDOR_JUNIPER ->
    """|1. Run the "show interface extensive" command to review the interface error counters.

       |2. Check for a mismatch in the speed and duplex interface settings on the both sides.
       |3. Check the physical cable. It might be damaged or incorrect type is used.
       |4. Review the following article on Juniper tech support site: <a target="_blank" href="https://www.juniper.net/documentation/en_US/junos/topics/reference/command-summary/show-interfaces-security.html#jd0e1772">Operational Commands</a>
       |5. If the problem persists, contact the Juniper Networks Technical Assistance Center (JTAC)""".stripMargin,
  ConditionalRemediationSteps.VENDOR_FORTINET ->
    """
       |1. Run "diag hardware deviceinfo nic <interface>" command to display a list of hardware related error names and values. Review  the next link for more details: http://help.fortinet.com/fos50hlp/54/Content/FortiOS/fortigate-toubleshooting-54/troubleshooting_tools.htm
       |2. Run command "fnsysctl cat /proc/net/dev" to get a summary of the interface statistics.
       |3. Check for speed and duplex mismatch in the interface settings on both sides of a cable, and check for a damaged cable. Review the next link for more info: http://kb.fortinet.com/kb/documentLink.do?externalID=10653""".stripMargin
)