Network interface mtu does not match across cluster members-paloaltonetworks-panos

error
high-availability
panos
paloaltonetworks
Network interface mtu does not match across cluster members-paloaltonetworks-panos
4.0 2

#1

Network interface mtu does not match across cluster members-paloaltonetworks-panos

Vendor: paloaltonetworks

OS: panos

Description:
Indeni will identify when two devices are part of a cluster and alert if their network interface mtu are different.

Remediation Steps:
Ensure the network interface mtu setting matches across devices in a cluster.

How does this work?
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.

Why is this important?
The MTU of an interface may be inadvertently set to a low value. It’s important to know if this happens and fix it.

Without Indeni how would you find this?
Alerting on low MTU values normally requires scripting to be done by the administrator.

panos-show-interface

#! META
name: panos-show-interface
description: Fetch interface information and statistics
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 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.
    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 api 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: |
        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.
    without-indeni: |
        The status of network interfaces is visible through the web interface, along with the state, speed and bandwidth parameters.
    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.
    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 api 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 api 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 api 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 api 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 api 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 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.
    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 api 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//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:
    -
        _groups:
            "/response/result/hw[state]":
                _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"
                    }
                }
    -
        _groups:
            "/response/result/hw[state_c]":
                _tags:
                    "im.name":
                        _constant: "network-interface-admin-state"
                    "name":
                        _text: "${root}/ifnet/name"
                    "live-config":
                        _constant: "true"
                    "display-name":
                        _constant: "Interface admin state"
                    "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"
                    }
                }
    -
        _groups:
            "/response/result/hw[duplex = 'full' or duplex = 'half']":
                _tags:
                    "im.name":
                        _constant: "network-interface-duplex"
                    "name":
                        _text: "name"
                    "live-config":
                        _constant: "true"
                    "display-name":
                        _constant: "Interface duplex settings"
                    "im.identity-tags":
                        _constant: "name"
                _value.complex:
                    value:
                        _text: "${root}/hw/duplex"
    -
        _groups:
            "/response/result/hw[not(speed = 'unknown') and not(speed = 'ukn') and not(speed = '[n/a]')]":
                _tags:
                    "im.name":
                        _constant: "network-interface-speed"
                    "name":
                        _text: "name"
                    "live-config":
                        _constant: "true"
                    "display-name":
                        _constant: "Interface speeds"
                    "im.identity-tags":
                        _constant: "name"
                _temp:
                    "speed":
                        _text: ${root}/hw/speed
        _transform:
            _value.complex:
                value: |
                    {
                        print temp("speed") "M"
                    }
    -
        _groups:
            "/response/result/hw[not(speed = 'unknown') and not(speed = 'ukn') and not(speed = '[n/a]')]":
                _tags:
                    "im.name":
                        _constant: "network-interface-bandwidth-mbps"
                    "name":
                        _text: "name"
                    "display-name":
                        _constant: "network-interface-bandwidth-mbps"
                    "im.identity-tags":
                        _constant: "name"
                _transform:
                    _tags:
                        "name": |
                            {
                                print dynamic("nic")
                            }
                _value.double:
                    _text: ${root}/hw/speed
    -
        _groups:
            "/response/result/ifnet[mtu]":
                _tags:
                    "im.name":
                        _constant: "network-interface-mtu"
                    "name":
                        _text: "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: "mtu"
    -
        _groups:
            "/response/result/hw[mac]":
                _tags:
                    "im.name":
                        _constant: "network-interface-mac"
                    "name":
                        _text: "name"
                    "live-config":
                        _constant: "true"
                    "display-name":
                        _constant: "Interface mac addresses"
                    "im.identity-tags":
                        _constant: "name"
                _value.complex:
                    value:
                        _text: "mac"
    -
        _tags:
            "im.name":
                _constant: "network-interface-tx-bytes"
            "name":
                _text: "${root}/ifnet/name"
            "im.dsType":
                _constant: "counter"
            "im.dstype.displaytype":
                _constant: "bytes"
        _value.double:
            _text: "${root}/ifnet/counters/ifnet/entry/obytes"
    -
        _tags:
            "im.name":
                _constant: "network-interface-rx-bytes"
            "name":
                _text: "${root}/ifnet/name"
            "im.dsType":
                _constant: "counter"
            "im.dstype.displaytype":
                _constant: "bytes"
        _value.double:
            _text: "${root}/ifnet/counters/ifnet/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/ifnet/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/ifnet/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/ifnet/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/ifnet/entry/idrops"
    -
        _tags:
            "im.name":
                _constant: "network-interfaces"
        _value.complex:
            "name":
                _text: "${root}/ifnet/name"
        _value: complex-array

CrossVendorClusterInterfaceMtuVsx

Failed to fetch the data: https://bitbucket.org/indeni/indeni-knowledge/src/master/rules/templatebased/crossvendor/CrossVendorClusterInterfaceMtu.scala

#2

While it is a best practice to have like hardware and capabilities connected to each HA cluster member, it is entirely possible that an Interface MTU on a Passive cluster member may need to mismatch that of the primary member.

The use case where this may exist for example is where you have a secondary ISP, Metro Ethernet or MPLS provider connected to the Passive HA box ready for a failover. If that secondary provider performs better with a lower MTU or higher for that matter, you’ll either have to choose to take the lower of the two MTU’s or allow them to be mismatched. Maybe one of your links allows for jumbo frames but the secondary link does not.

Keep in mind there are reasons why Palo Alto Networks does not synchronize these settings between HA devices. For these special cases you will need to disable the rule. You should only do so for those devices though or the value will be lost for other systems when you need it most!


#3

Absolutely Brad. Another use case is during software upgrades or when there is a need to do failover for operational or maintenance reasons.