Pure Storage FlashArray (Purity//FA REST)
v0.1.16Read-only access to a Pure Storage FlashArray over its Purity//FA REST API 2.x: array identity / capacity / performance, per-volume, per-host and per-interface performance with an optional history window, alerts, controller and hardware / drive health, volumes and per-volume space, protection groups, snapshots and membership, the host -> volume -> LUN connection map, host and target-port identities, per-controller network interface state, and replication / array-connection status. Drives a remote array via curl; every call is a GET.
curl
jq
Install
emisar pack install
fetches this pack, re-validates it, and verifies its content hash against the
--hash
below — the exact bytes this page was rendered against, so a tampered copy is
rejected — before copying it into the runner's packs dir. The command reloads a
running daemon itself; no manual restart.
sudo emisar pack install pure-flasharray --hash sha256:55cfc3eefd0e09e9b7aa8933f0c4a32d978676a453eac833fb74d762002780cf
Setup
Every action calls the FlashArray REST API 2.x at
$PURE_URL
via curl on the runner host. The array uses a two-step auth: the API token in
$PURE_API_TOKEN
is exchanged at /login for a short-lived session token, which is then sent on the read. Point
PURE_URL
at the array management endpoint and issue
PURE_API_TOKEN
for a readonly-role array user.
Environment
Set these on the runner host, then add each name to
execution.inherit_env
so the value reaches the action.
-
PURE_URLdefault https://192.168.1.1Array management endpoint — scheme + host[:port].
-
PURE_API_TOKENFlashArray API token for a readonly-role user; sent as the api-token header over curl stdin, never in argv or the audit log.
-
PURE_INSECUREtrue to skip TLS verification of the array's self-signed certificate.
Notes
-
Any of
PURE_URL/PURE_API_TOKEN/PURE_INSECUREyou set must also be allowlisted in the runner'sexecution.inherit_env— the action env is scrubbed to PATH/LANG/LC_ALL/TERM by default, so an env present on the host but not allowlisted is silently dropped (the action falls back to its local default or fails auth). - Every action is a read-only GET — none write, delete, or mutate array state.
- Issue the token from a readonly-role array user (Settings -> Users) as defense-in-depth, so the credential itself cannot change anything even though the pack only ever issues GETs.
- The session token auto-expires after ~30 min of inactivity; the script re-logins on every call, so there is no session to manage.
Verify it works
Runs pure.arrays, a low-risk
read that confirms the pack can reach its target. Run it on the host once the pack
is installed; pack install runs it for
you.
sudo emisar pack verify pure-flasharray
Install and configure a pack walks through the whole sequence on a host.
Actions 21 total
View on GitHub-
pure.alerts script low Low — read-only or trivially reversible
GET /alerts
List open (unresolved) array alerts, filtered to state='open' — each with its severity (info / warning / critical), component, and summary. Use to answer "what is the array complaining about right now?". Returns {items:[...], more_items_remaining, ...}, one item per open alert.
View source on GitHub -
pure.array_connections script low Low — read-only or trivially reversible
GET /array-connections
List connected-array / replication status — each peer array this array is connected to, the connection type (async / sync replication), and its status. Use to confirm replication peers are connected and healthy. Returns {items:[...], more_items_remaining, ...}, one item per connected array.
View source on GitHub -
pure.arrays script low Low — read-only or trivially reversible
GET /arrays
Show array identity and top-line health — array name, id, Purity//FA OS version, and the headline capacity fields. The starting point for "which array is this and is it healthy?". Returns {items:[...], more_items_remaining, ...}; one item per array.
View source on GitHub -
pure.arrays_performance script low Low — read-only or trivially reversible
GET /arrays/performance
Show array-wide performance — read/write/mirrored latency, IOPS, and bandwidth, either the latest sample or a window of history. Use to answer "is the array slow right now?", and with a window "was it slow when the incident started?". Returns {items:[...], more_items_remaining, ...}, one item per sample.
View source on GitHub -
pure.arrays_space script low Low — read-only or trivially reversible
GET /arrays/space
Show array-wide space accounting — total and used capacity, plus the data reduction and thin-provisioning ratios behind it. Use to answer "how full is the array and what is the effective reduction?". Returns {items:[...], more_items_remaining, ...} with a space breakdown per array.
View source on GitHub -
pure.connections script low Low — read-only or trivially reversible
GET /connections
Show the host -> volume -> LUN map: every connection between a host (or host group) and a volume, with the LUN the volume is presented at. This is the authoritative answer to "which host sees which volume, at which LUN?" — the first stop for any "my server can't see its LUN" or "is this volume even mapped?" question. Returns {items:[...], more_items_remaining, ...}, one item per host/volume connection; can be large on a busy array.
View source on GitHub -
pure.controllers script low Low — read-only or trivially reversible
GET /controllers
List the array's controllers — for each, its mode (primary / secondary), model, running Purity//FA version, and status. Use to confirm the HA pair is healthy and which controller is primary. Returns {items:[...], more_items_remaining, ...}, one item per controller.
View source on GitHub -
pure.default_protection script low Low — read-only or trivially reversible
Show FlashArray default protection
Show the protection groups automatically applied to newly created volumes on the local array and its pods. Results are bounded to one page.
View source on GitHub -
pure.drives script low Low — read-only or trivially reversible
GET /drives
List flash and NVRAM modules — for each drive, its type, capacity, and status (healthy / unhealthy / evacuating / unused). Use to find a failed or evacuating module. Returns {items:[...], more_items_remaining, ...}, one item per drive.
View source on GitHub -
pure.hardware script low Low — read-only or trivially reversible
GET /hardware
Show physical component health — chassis, power supplies, fans, temperature sensors, and other hardware items, each with its status and (where applicable) reading. Use to find a failed PSU/fan or a hot sensor. Returns {items:[...], more_items_remaining, ...}, one item per component.
View source on GitHub -
pure.hosts script low Low — read-only or trivially reversible
GET /hosts
List the host inventory — each host object and the initiator identities registered to it: iSCSI IQNs, Fibre Channel WWNs, and NVMe NQNs. Use to confirm an initiator is registered to the expected host. Returns {items:[...], more_items_remaining, ...}, one item per host.
View source on GitHub -
pure.hosts_performance script low Low — read-only or trivially reversible
GET /hosts/performance
Show per-host performance — read/write IOPS, bandwidth, and latency as seen by each host object, either the latest sample or a window of history. Use to answer "which server is generating the load?" and to compare what a host reports with what the array served it. Returns {items:[...], more_items_remaining, ...}, one item per host per sample.
View source on GitHub -
pure.network_interfaces script low Low — read-only or trivially reversible
GET /network-interfaces
List per-controller network interfaces — each interface's enabled / up-or-down state, speed, address, and the services it carries (management, iSCSI, replication, NVMe-oF). Use this to answer "is the target port up?" before chasing a host-side path problem. Returns {items:[...], more_items_remaining, ...}, one item per interface.
View source on GitHub -
pure.network_interfaces_performance script low Low — read-only or trivially reversible
GET /network-interfaces/performance
Show per-interface throughput — received and transmitted bytes and packets per second on each array network interface, either the latest sample or a window of history. Use to answer "is one target port carrying all the traffic?" or to confirm a port went quiet when a path failed. Returns {items:[...], more_items_remaining, ...}, one item per interface per sample.
View source on GitHub -
pure.pgroup_members script low Low — read-only or trivially reversible
List FlashArray protection-group members
List volume, host, or host-group membership in protection groups. Each item identifies the group and member; results are bounded to one page.
View source on GitHub -
pure.ports script low Low — read-only or trivially reversible
GET /ports
List target-port identities — the array-side iSCSI IQNs, Fibre Channel WWNs, and NVMe NQNs, with iSCSI portal IPs where applicable. Use to learn what addresses a host should be connecting to. Returns {items:[...], more_items_remaining, ...}, one item per target port.
View source on GitHub -
pure.protection_groups script low Low — read-only or trivially reversible
List FlashArray protection groups
List protection groups and their snapshot, replication, and retention configuration. Results are bounded to one page and include the API cursor when another page is available.
View source on GitHub -
pure.snapshots script low Low — read-only or trivially reversible
List FlashArray protection-group snapshots
List protection-group snapshots, including creation time, source group, destroyed state, and retention time. Results are bounded to one page.
View source on GitHub -
pure.volumes script low Low — read-only or trivially reversible
GET /volumes
List the volume inventory — each volume's name, id, provisioned (virtual) size, and whether it is destroyed / pending eradication. Use to confirm a volume exists and its size. Returns {items:[...], more_items_remaining, ...}, one item per volume; can be large on arrays with many volumes.
View source on GitHub -
pure.volumes_performance script low Low — read-only or trivially reversible
GET /volumes/performance
Show per-volume performance — read/write/mirrored IOPS, bandwidth, and latency for each volume, either the latest sample or a window of history. Use after pure.arrays_performance says the array is slow, to answer "which volume is driving it?" by comparing the volumes in the page. Returns {items:[...], more_items_remaining, ...}, one item per volume per sample.
View source on GitHub -
pure.volumes_space script low Low — read-only or trivially reversible
GET /volumes/space
Show per-volume space accounting — for each volume, the physical space used by its unique data and by snapshots, plus its data-reduction and total-reduction ratios. Use to find which volumes consume the most capacity. Returns {items:[...], more_items_remaining, ...}, one item per volume.
View source on GitHub