Some Power Supply Unit (PSU) slot is empty or PSU is down-paloaltonetworks-panos

warn
panos
paloaltonetworks
Some Power Supply Unit (PSU) slot is empty or PSU is down-paloaltonetworks-panos
0

#1

Some Power Supply Unit (PSU) slot is empty or PSU is down-paloaltonetworks-panos

Vendor: paloaltonetworks

OS: panos

Description:
Indeni will alert if some PSU slot is empty.

Remediation Steps:
No redundant power supply has been detected. It is best practice to run dual power supplies on two separate Power Distribution Units, separate UPS backup, and circuit breakers. This provides the greatest level of redundancy for power access.
Run the CLI command “show system environmentals” and check the Power Supply section for more details.

How does this work?
This script leverages the PAN-OS’s XML API to detect that all available PSU slots are in use. Detection of an empty PSU slot will trigger an alert.

Why is this important?
Network devices that do not have redundant power supplies are at risk for a complete service outage should there be a loss of power to the device. It is best practice to install multiple PSU’s with separate power sources whenever possible.

Without Indeni how would you find this?
An administrator would need to SSH into CLI on the device and run the command “show system environmentals” to clearly identify if a PSU is installed in each available slot.

panos-show-system-environmentals

#! META
name: panos-show-system-environmentals
description: fetch the status of the fan, power and temperature
type: monitoring
monitoring_interval: 10 minute
requires:
    vendor: paloaltonetworks
    os.name: panos

#! COMMENTS
hardware-element-status:
    why: |
        Network devices that lose functionality of core components are at risk for complete system failure. It is important to immediately address any symptoms leading up to a failure. This includes increased thermal levels and loss of redundant components.
    how: |
        This script leverages the PAN-OS's XML API to glean hardware status of specific components (e.g. fans, power supply, temperature). The API call is for "show system environmentals". Any reported hardware element issue or out of range value (e.g. temperature) will trigger an alert.
    without-indeni: |
        An administrator could physically view the LED lights for alarm status. Also, running the command "show system environmentals" at the CLI will show status of hardware components.
    can-with-snmp: true
    can-with-syslog: true
    vendor-provided-management: |
        PAN-OS appliances typically have a LED status light indicating alarms. Panorama will show if hardware status is in alarm.
power-supply-inserted:
    why: |
        Network devices that do not have redundant power supplies are at risk for a complete service outage should there be a loss of power to the device. It is best practice to install multiple PSU's with separate power sources whenever possible. 
    how: |
        This script leverages the PAN-OS's XML API to detect that all available PSU slots are in use. Detection of an empty PSU slot will trigger an alert. 
    without-indeni: |
        An administrator would need to SSH into CLI on the device and run the command "show system environmentals" to clearly identify if a PSU is installed in each available slot. 
    can-with-snmp: true
    can-with-syslog: false
 

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

#! PARSER::XML
_vars:
    root: /response/result
_optional_metrics:
    -
        _groups:
            ${root}/thermal/*/entry:
                _temp:
                    alarm:
                        _text: alarm
                _tags:
                    "name":
                        _text: "description"
                    "im.name":
                        _constant: "hardware-element-status"
                    "live-config":
                       _constant: "true"
                    "display-name":
                        _constant: "Hardware Elements State"
                    "im.dstype.displayType":
                        _constant: "state"
                    "im.identity-tags":
                        _constant: "name"
        _transform:
            _value.double: |
                {
                    if (temp("alarm") == "True") { print "0.0" } else { print "1.0" }
                }
    -
        _groups:
            ${root}/thermal/*/entry:
                _tags:
                    "name":
                        _text: "description"
                    "im.name":
                        _constant: "temperature-sensor-current"
                    "live-config":
                       _constant: "true"
                    "display-name":
                        _constant: "Temperature - Current"
                    "im.dstype.displayType":
                        _constant: "number"
                    "im.identity-tags":
                        _constant: "name"
                _value.double:
                    _text: "DegreesC"
    -
        _groups:
            ${root}/thermal/*/entry:
                _tags:
                    "name":
                        _text: "description"
                    "im.name":
                        _constant: "temperature-sensor-max"
                    "live-config":
                       _constant: "true"
                    "display-name":
                        _constant: "Temperature - Max Limit"
                    "im.dstype.displayType":
                        _constant: "number"
                    "im.identity-tags":
                        _constant: "name"
                _value.double:
                    _text: "max"
    -
        _groups:
            ${root}/fan/*/entry:
                _temp:
                    alarm:
                        _text: alarm
                _tags:
                    "name":
                        _text: "description"
                    "im.name":
                        _constant: "hardware-element-status"
                    "live-config":
                       _constant: "true"
                    "display-name":
                        _constant: "Hardware Elements State"
                    "im.dstype.displayType":
                        _constant: "state"
                    "im.identity-tags":
                        _constant: "name"
        _transform:
            _value.double: |
                {
                    if (temp("alarm") == "True") { print "0.0" } else { print "1.0" }
                }
    -
        _groups:
            ${root}/power/*/entry:
                _temp:
                    alarm:
                        _text: alarm
                _tags:
                    "name":
                        _text: "description"
                    "im.name":
                        _constant: "hardware-element-status"
                    "live-config":
                       _constant: "true"
                    "display-name":
                        _constant: "Hardware Elements State"
                    "im.dstype.displayType":
                        _constant: "state"
                    "im.identity-tags":
                        _constant: "name"
        _transform:
            _value.double: |
                {
                    if (temp("alarm") == "True") { print "0.0" } else { print "1.0" }
                }
    -
        _groups:
            ${root}/power-supply/*/entry:
                _temp:
                    alarm:
                        _text: alarm
                _tags:
                    "name":
                        _text: "description"
                    "im.name":
                        _constant: "hardware-element-status"
                    "live-config":
                       _constant: "true"
                    "display-name":
                        _constant: "Hardware Elements State"
                    "im.dstype.displayType":
                        _constant: "state"
                    "im.identity-tags":
                        _constant: "name"
        _transform:
            _value.double: |
                {
                    if (temp("alarm") == "True") { print "0.0" } else { print "1.0" }
                }
    -
        _groups:
            ${root}/power-supply/*/entry:
                _temp:
                    inserted:
                        _text: Inserted
                _tags:
                    "name":
                        _text: "description"
                    "im.name":
                        _constant: "power-supply-inserted"
                    "live-config":
                       _constant: "true"
                    "display-name":
                       _constant: "PSU Detected"
                    "im.dstype.displayType":
                        _constant: "state"
                    "im.identity-tags":
                        _constant: "name"
        _transform:
            _value.double: |
                {
                    if (temp("inserted") == "True") { print "1.0" } else { print "0.0" }
                }

CrossVendorPowerSupply

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

import com.indeni.server.rules.library.ConditionalRemediationSteps
import com.indeni.server.rules.library.templates.StateDownTemplateRule
import com.indeni.server.sensor.models.managementprocess.alerts.dto.AlertSeverity

/**
  *
  */
case class CrossVendorPowerSupply() extends StateDownTemplateRule(
  ruleName = "CrossVendorPowerSupply",
  ruleFriendlyName = "Devices with multiple PSU: Some Power Supply Unit (PSU) slot is empty or PSU is down",
  ruleDescription = "Indeni will alert if some PSU slot is empty.",
  severity = AlertSeverity.WARN,
  metricName = "power-supply-inserted",
  applicableMetricTag = "name",
  alertItemsHeader = "The following PSU(s) not installed or off line",
  alertDescription = "It is best practice to install multiple PSU with separate power sources whenever possible. Indeni will alert if a device has multiple PSU slots but some slot has no PSU installed or the PSU is off line.",
  baseRemediationText = "No redundant power supply has been detected. It is best practice to run dual power supplies on two separate Power Distribution Units, separate UPS backup, and circuit breakers. This provides the greatest level of redundancy for power access.")(
  ConditionalRemediationSteps.VENDOR_PANOS -> "Run the CLI command \"show system environmentals\" and check the Power Supply section for more details."
)