RX packets experienced errors-paloaltonetworks-panos

RX packets experienced errors-paloaltonetworks-panos
0

RX 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 device using SSH and retrieves the output of the “show system state filter sys.s1.p*.detail” command. The output includes the interface related information and statistics.

Why is this important?
Capture the counter of interface Receive Errors that prevented packets from being delivered to a higher-layer protocol. If this counter increases an alarm will be raised.

Without Indeni how would you find this?
It is possible to poll this data through ssh and API. SNMP provides a global counter “receive discarded” " ifInErrors .1.3.6.1.2.1.2.2.1.14" which is the sum of mac_rcv_error and rcv_fifo_overrun

panos-show-system-state-filter-sys.s.p.detail

name: panos-show-system-state-filter-sys.s.p.detail
description: Fetch interface state information
type: monitoring
monitoring_interval: 10 minutes
requires:
    vendor: paloaltonetworks
    os.name: panos
    product: firewall
comments:
    network-interface-rx-frame:
        why: |
            Capture the counter of interface Receive Discarded that was caused by invalid CRC. If this counter increases an alarm will be raised.
        how: |
            This script logs into the Palo Alto Networks device using SSH and retrieves the output of the "show system state filter sys.s1.p*.detail" command. The output includes the interface related information and statistics.
        can-with-snmp: false
        can-with-syslog: false
    network-interface-rx-errors:
        why: |
            Capture the counter of interface Receive Errors that prevented packets from being delivered to a higher-layer protocol. If this counter increases an alarm will be raised.
        how: |
            This script logs into the Palo Alto Networks device using SSH and retrieves the output of the "show system state filter sys.s1.p*.detail" command. The output includes the interface related information and statistics.
        can-with-snmp: false
        can-with-syslog: false
steps:
-   run:
        type: SSH
        command: show system state filter sys.s*.p*.detail
    parse:
        type: AWK
        file: show-system-state-filter-sys.s.p.detail.parser.1.awk

panos-show-interface

name: panos-show-interface
description: Fetch interface information and statistics
type: monitoring
monitoring_interval: 15 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 api 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.
        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 api and retrieves the status of all network interfaces. In that output, it looks for the actual runtime speed of each interface.
        can-with-snmp: true
        can-with-syslog: true
    network-interface-bandwidth-mbps:
        why: |
            Generally, 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 bandwidth of all network interfaces.
        how: |
            This alert logs into the Palo Alto Networks firewall through ssh and retrieves the status of all network interfaces and their speeds/bandwidth. In that output, it looks for the actual bandwidth of each interface.
        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 api and retrieves the status of all network interfaces. In that output, it looks for the actual runtime duplex of each interface.
        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 api and retrieves the status of all network interfaces. In that output, it looks for the number of packets transmitted through the interface.
        can-with-snmp: true
        can-with-syslog: true
    network-interface-tx-bits:
        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 api and retrieves the status of all network interfaces. In that output, it looks for the number of bits transmitted through the interface.
        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 api and retrieves the status of all network interfaces. In that output, it looks for the number of packets received through the interface.
        can-with-snmp: true
        can-with-syslog: true
    network-interface-rx-bits:
        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 api and retrieves the status of all network interfaces. In that output, it looks for the number of bits received through the interface.
        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 api and retrieves the status of all network interfaces. In that output, it looks for the number of packets dropped on an interface.
        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 api 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.
        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 api and retrieves the status of all network interfaces. In that output, it retrieves the MTU values.
        can-with-snmp: true
        can-with-syslog: true
    network-interface-mac:
        why: |
            Capture the MAC address for the interface. This information is important to be able to search for MAC addresses, inventoring and troubleshooting purposes.
        how: |
            Indeni logs into the Palo Alto Networks firewall through api and retrieves the status of all network interfaces. In that output, it retrieves the MAC address.
        can-with-snmp: true
        can-with-syslog: false
    network-interface-rx-errors:
        why: |
            Capture the interface receive errors counter. Receive errors indicate an issue with duplex/speed matching.
        how: |
            Indeni logs into the Palo Alto Networks firewall through api and retrieves the status of all network interfaces. In that output, it retrieves the interface receive errors counter.
        can-with-snmp: true
        can-with-syslog: false
    network-interfaces:
        why: |
            Capture the interface name.
        how: |
            Indeni logs into the Palo Alto Networks firewall through api and retrieves the network interfaces.
        can-with-snmp: true
        can-with-syslog: false
steps:
-   run:
        type: HTTP
        command: /api?type=op&cmd=<show><interface>all</interface></show>&key=${api-key}
    parse:
        type: XML
        file: show-interface.parser.1.xml.yaml
-   run:
        type: HTTP
        command: /api?type=op&cmd=<show><interface>${nic}</interface></show>&key=${api-key}
    parse:
        type: XML
        file: show-interface.parser.2.xml.yaml

cross_vendor_rx_error

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

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

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

/**
  *
  */
case class CrossVendorRxError() extends NearingCapacityWithItemsTemplateRule(
  ruleName = "cross_vendor_rx_error",
  ruleFriendlyName = "All Devices: RX packets experienced errors",
  ruleDescription = "Indeni tracks the number of packets that had issues and alerts if the ratio is too high.",
  usageMetricName = "network-interface-rx-errors",
  limitMetricName = "network-interface-rx-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 received.",
  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")(
  RemediationStepCondition.VENDOR_CISCO ->
    """|
       |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,
  RemediationStepCondition.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)""",
  RemediationStepCondition.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
)