If you’re interested in other ways to identify non-compliant devices, check out this article I wrote:
The End-of-Life (EOL) and End-of-Sale (EOS) Checker is a streamlined tool that identifies network devices nearing or past their vendor support lifecycle. By cross-referencing inventory data with a list of outdated devices sourced from vendor sites, such as Cisco’s EOL/EOS database, the query ensures administrators are aware of devices that may pose operational risks. This proactive approach enables organizations to plan replacements, reduce downtime, and ensure ongoing compliance with industry standards.
Benefits of Using this NQE:
- Proactive Replacement Planning: Identifies aging devices before they become liabilities, reducing unplanned downtime.
- Streamlined Compliance: Ensures devices meet organizational and vendor standards, avoiding security and support gaps.
- Optimized Team Collaboration: Role-based access and automated alerts keep relevant stakeholders informed and responsive.
How the NQE Works
The EOL/EOS Checker works by importing a curated list of outdated hardware models from external sources, like vendor websites or centralized repositories, and matching it against the network's inventory. Devices flagged as outdated are highlighted in the query’s output, offering a clear picture of what needs attention. The tool supports role-based access control, allowing designated teams, such as hardware specialists, to update the EOL/EOS list without impacting the query's functionality. This ensures accuracy and keeps the NQE aligned with current organizational policies.
Taking the Query to the Next Level
Organizations can elevate the functionality of the EOL/EOS Checker by integrating it into broader automation workflows. For example, the query can trigger automated service tickets in tools like ServiceNow to notify teams about outdated devices, complete with the location, device details, and replacement recommendations. Administrators can also track trends by exporting the data to repositories like GitLab for historical comparisons, enabling better lifecycle management over time. Combining the NQE with dashboards or monitoring systems can further enhance visibility and support strategic decision-making.
NQE Scripts
Here are a couple of options when it comes to implementing this NQE:
- The first script contains the device list and the query to find the devices in your network. It’s easy to implement in a single script.
- The second option is to put the device list in one query and then import it into a second query that looks for matching devices. This is better to use the list in multiple queries and manage access to the list.Â
Option #1: All in One:
/**
* @intent Find End of life Cisco devices
* @description source https://www.cisco.com/c/en/us/products/eos-eol-listing.html
*/
export cisco_eol_devices =
s"CGS-2520-24TC",
"CGS-2520-16S-8PC",
"SF550X-48",
"SF550X-48MP",
"SF550X-48P",
"SF550X-24",
"SF550X-24MP",
"SF550X-24P",
"SG550X-48",
"SG550X-48MP",
"SG550X-48P",
"SG550X-24",
"SG550X-24MP",
"SG550X-24MPP",
"SG550X-24P",
"SG550XG-48T",
"SG550XG-24F",
"SG550XG-24T",
"SG550XG-8F8T",
"SX550X-52",
"SX550X-24",
"SX550X-24F",
"SX550X-24FT",
"SX550X-16FT",
"SX550X-12F",
"SF352-08",
"SF352-08MP",
"SF350-48",
"SF350-48MP",
"SF350-08",
"SG355-10P",
"SG350-52",
"SG350-52MP",
"SG350-52P",
"SG350-28",
"SG350-28MP",
"SG350-28P",
"SG350-28SFP",
"SG350-20",
"SG350-10",
"SG350-10MP",
"SG350-10P",
"SG350-10SFP",
"SG350-8PD",
"SG350X-48",
"SG350X-48MP",
"SG350X-48P",
"SG350X-48PV",
"SG350X-24",
"SG350X-24MP",
"SG350X-24P",
"SG350X-24PD",
"SG350X-24PV",
"SG350X-12PMV",
"SG350X-8PMD",
"SG350XG-48T",
"SG350XG-24F",
"SG350XG-24T",
"SG350XG-2F10",
"SX350X-52",
"SX350X-24",
"SX350X-24F",
"SX350X-12",
"SX350X-08",
"SF250-48",
"SF250-48HP",
"SF250-24",
"SF250-24P",
"SG250-50",
"SG250-50HP",
"SG250-50P",
"SG250-26",
"SG250-26HP",
"SG250-26P",
"SG250-18",
"SG250-10P",
"SG250-08",
"SG250-08HP",
"SG250X-48",
"SG250X-48P",
"SG250X-24",
"SG250X-24P",
"SF220-48",
"SF220-48P",
"SF220-24",
"SF220-24P",
"SG220-52",
"SG220-50",
"SG220-50P",
"SG220-28",
"SG220-28MP",
"SG220-26",
"SG220-26P",
"6880-X",
"6840-X",
"6807-XL",
"C6840-X-LE-40G",
"C6832-X-LE",
"C6824-X-LE-40G",
"C6816-X-LE",
"6513-E",
"6509-E",
"6509-NEB-A",
"6509-V-E",
"6506-E",
"6504-E",
"6503-E",
"4506-E",
"4503-E",
"4500-X",
"4500X-40",
"4500X-32",
"4500X-24",
"4500X-16",
"4500X-F-32",
"4500X-F-16",
"3850-48F-E",
"3850-48F-L",
"3850-48F-S",
"3850-48P-E",
"3850-48P-L",
"3850-48P-S",
"3850-48T-E",
"3850-48T-L",
"3850-48T-S",
"3850-48U-E",
"3850-48U-L",
"3850-48U-S",
"3850-48XS-E",
"3850-48XS-F-E",
"3850-48XS-F-S",
"3850-48XS-S",
"3850-32XS-E",
"3850-32XS-S",
"3850-24P-E",
"3850-24P-L",
"3850-24P-S",
"3850-24S-E",
"3850-24S-S",
"3850-24T-E",
"3850-24T-L",
"3850-24T-S",
"3850-24U-E",
"3850-24U-L",
"3850-24U-S",
"3850-24XS-E",
"3850-24XS-S",
"3850-24XU-E",
"3850-24XU-L",
"3850-24XU-S",
"3850-16XS-E",
"3850-16XS-S",
"3850-12S-E",
"3850-12S-S",
"3850-12XS-E",
"3850-12XS-S",
"C3850-12X48U-E",
"C3850-12X48U-L",
"C3850-12X48U-S",
"3750V2-48PS",
"3750V2-48TS",
"3750V2-24FS",
"3750V2-24PS",
"3750V2-24TS",
"3750-X",
"3750X-48P-E",
"3750X-48P-L",
"3750X-48P-S",
"3750X-48PF-E",
"3750X-48PF-L",
"3750X-48PF-S",
"3750X-48T-E",
"3750X-48T-L",
"3750X-48T-S",
"3750X-48U-E",
"3750X-48U-L",
"3750X-48U-S",
"3750X-24P-E",
"3750X-24P-L",
"3750X-24P-S",
"3750X-24S-E",
"3750X-24S-S",
"3750X-24T-E",
"3750X-24T-L",
"3750X-24T-S",
"3750X-24U-E",
"3750X-24U-L",
"3750X-24U-S",
"3750X-12S-E",
"3750X-12S-S",
"3650-48FD-E",
"3650-48FD-L",
"3650-48FD-S",
"3650-48FQ-E",
"3650-48FQ-L",
"3650-48FQ-S",
"3650-48FS-E",
"3650-48FS-L",
"3650-48FS-S",
"3650-48PD-E",
"3650-48PD-L",
"3650-48PD-S",
"3650-48PQ-E",
"3650-48PQ-L",
"3650-48PQ-S",
"3650-48PS-E",
"3650-48PS-L",
"3650-48PS-S",
"3650-48TD-E",
"3650-48TD-L",
"3650-48TD-S",
"3650-48TQ-E",
"3650-48TQ-L",
"3650-48TQ-S",
"3650-48TS-E",
"3650-48TS-L",
"3650-48TS-S",
"3650-24PD-E",
"3650-24PD-L",
"3650-24PD-S",
"3650-24PS-E",
"3650-24PS-L",
"3650-24PS-S",
"3650-24TD-E",
"3650-24TD-L",
"3650-24TD-S",
"3650-24TS-E",
"3650-24TS-L",
"3650-24TS-S",
"3650-12X48FD-E",
"3650-12X48FD-L",
"3650-12X48FD-S",
"3650-12X48UQ-E",
"3650-12X48UQ-L",
"3650-12X48UQ-S",
"3650-12X48UR-E",
"3650-12X48UR-L",
"3650-12X48UR-S",
"3650-12X48UZ-E",
"3650-12X48UZ-L",
"3650-12X48UZ-S",
"3650-8X24PD-E",
"3650-8X24PD-L",
"3650-8X24PD-S",
"3650-8X24UQ-E",
"3650-8X24UQ-L",
"3650-8X24UQ-S",
"3560V2-48PS",
"3560V2-48TS",
"3560V2-24DC",
"3560V2-24PS",
"3560V2-24TS",
"3560-C",
"3560C-12PC-s",
"3560C-8PC-S",
"3560CG-8PC-S",
"3560CG-8TC-S",
"3560CPD-8PT-S",
"3560-X",
"3560X-48P-E",
"3560X-48P-L",
"3560X-48P-S",
"3560X-48PF-E",
"3560X-48PF-L",
"3560X-48PF-S",
"3560X-48T-E",
"3560X-48T-L",
"3560X-48T-S",
"3560X-48U-E",
"3560X-48U-L",
"3560X-48U-S",
"3560X-24P-E",
"3560X-24P-L",
"3560X-24P-S",
"3560X-24T-E",
"3560X-24T-L",
"3560X-24T-S",
"3560X-24U-E",
"3560X-24U-L",
"3560X-24U-S",
"2960-48PST-L",
"2960-48PST-S",
"2960-48TC-L",
"2960-48TC-S",
"2960-48TT-L",
"2960-48TT-S",
"2960-24-S",
"2960-24LC-S",
"2960-24LT-L",
"2960-24PC-L",
"2960-24PC-S",
"2960-24TC-L",
"2960-24TC-S",
"2960-24TT-L",
"2960-C",
"2960CG-8TC-L",
"2960-L",
"2960L-48PQ-LL",
"2960L-48PS-LL",
"2960L-48TQ-LL",
"2960L-48TS-LL",
"2960L-24PQ-LL",
"2960L-24PS-LL",
"2960L-24TQ-LL",
"2960L-24TS-LL",
"2960L-16PS-LL",
"2960L-16TS-LL",
"2960L-8PS-LL",
"2960L-8TS-LL",
"2960L-SM-48PQ",
"2960L-SM-48PS",
"2960L-SM-48TQ",
"2960L-SM-48TS",
"2960L-SM-24PQ",
"2960L-SM-24PS",
"2960L-SM-24TQ",
"2960L-SM-24TS",
"2960L-SM-16PS",
"2960L-SM-16TS",
"2960L-SM-8PS",
"2960L-SM-8TS",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-S",
"2960S-48FPD-L",
"2960S-48FPS-L",
"2960S-48LPD-L",
"2960S-48LPS-L",
"2960S-48TD-L",
"2960S-48TS-L",
"2960S-48TS-S",
"2960S-24PD-L",
"2960S-24PS-L",
"2960S-24TD-L",
"2960S-24TS-L",
"2960S-24TS-S",
"2960-SF",
"2960S-F48FPS-L",
"2960S-F48LPS-L",
"2960S-F48TS-L",
"2960S-F48TS-S",
"2960S-F24PS-L",
"2960S-F24TS-L",
"2960S-F24TS-S",
"2918-48TC-C",
"2918-48TT-C",
"2918-24TC-C",
"2918-24TT-C",
"3000-8TC",
"3000-4TC",
"2000-24T67",
"2000-16T67",
"2000-8T67",
"3800X-24FS-M",
"3600X-24CX-M",
"3600X-24FS-M",
"3600X-24TS-M",
"3400E-24TS-M",
"3400EG-12CS-M",
"3400EG-2CS-A",
"93180LC-EX",
"93180YC-EX",
"93180YC-EX-24",
"93108TC-EX",
"93108TC-EX-24",
"9372PX-E",
"9372TX-E",
"18-Slot",
"10-Slot",
"9-Slot",
"4-Slot",
"5672UP-16G",
"3548-X",
"3524-X",
"3264C-E",
"3172PQ-XL",
"3172TQ-32T",
"3172TQ-XL",
"3132C-Z",
"3132Q-XL",
"3064-T",
"Hyper-V",
"SF500-48",
"SF500-48MP",
"SF500-48P",
"SF500-24",
"SF500-24MP",
"SF500-24P",
"SG500-52",
"SG500-52MP",
"SG500-52P",
"SG500-52PP",
"SG500-28",
"SG500-28MPP",
"SG500-28P",
"SG500-28PP",
"SG500X-48",
"SG500X-48MPP",
"SG500X-48P",
"SG500X-24",
"SG500X-24MPP",
"SG500X-24P",
"SG500XG-8F8T",
"SF302-08",
"SF302-08MPP",
"SF302-08PP",
"SF300-48",
"SF300-48PP",
"SF300-24",
"SF300-24MP",
"SF300-24PP",
"SF300-08",
"SG300-52",
"SG300-52MP",
"SG300-52P",
"SG300-28",
"SG300-28MP",
"SG300-28PP",
"SG300-28SFP",
"SG300-20",
"SG300-10",
"SG300-10MPP",
"SG300-10PP",
"SG300-10SFP",
"SF200-48",
"SF200-48P",
"SF200-24",
"SF200-24FP",
"SF200-24P",
"SF200E-24P",
"SG200-50",
"SG200-50FP",
"SG200-50P",
"SG200-26",
"SG200-26FP",
"SG200-26P",
"SG200-18",
"SG200-10FP",
"SG200-08",
"SG200-08P",
"SF112-24",
"SF110-16",
"SF110D-16HP",
"SF110D-08HP",
"SG112-24",
"SG110-24",
"SG110-24HP",
"SG110-16",
"SG110-16HP",
"SG110D-08",
"SG110D-08HP",
"SG110D-05",
"SF102-24",
"SF100-24",
"SF100-16",
"SF100D-16",
"SF100D-16P",
"SF100D-08",
"SF100D-08P",
"SF100D-05",
"SG102-24",
"SG100-24",
"SG100-16",
"SG100D-08",
"SG100D-08P",
"SG100D-05",
"SG95-24",
"SG95-16",
"SG95D-08",
"SG95D-05",
"SF90-24",
"SF90D-16",
"SF90D-08",
"SF90D-08-M30",
"SF90D-05",
"SG92-24",
"SG92-16",
"SG90D-08",
"SG90D-08-M12",
"SG90D-05"
];
cisco_eol_patterns= (foreach i in cisco_eol_devices select "*"+i+"*");
foreach d in network.devices
where isPresent(d.platform.model)
let model = toUpperCase(d.platform.model)
foreach i in cisco_eol_patterns
where matches(model, i)
select distinct{
name: d.name,
vendor: d.platform.vendor,
model: d.platform.model,
osType: d.platform.os,
osVersion: d.platform.osVersion,
status: "EOL",
violation: true
}
Â
It’s a straight forward script, but a bit long.Â
Â
Option #2: Break it Up
Alternatively, you can place the list of EoLÂ device models in a separate query so it can be imported into multiple queries. This allows you to update the list in one place rather than managing multiple copies. Additionally, with Role Based Access Control (RBAC), one team can manage the list with read-write permissions and other teams can have read-only access to the list for their NQE queries.Â
Â
Here’s the list of devices in one NQE:
/**
* @intent Enter your intent here (one line, 50 characters max)
* @description Enter your description here (multiple lines are possible)
*/
export cisco_eol_devices =
e"CGS-2520-24TC",
"CGS-2520-16S-8PC",
"SF550X-48",
"SF550X-48MP",
"SF550X-48P",
"SF550X-24",
"SF550X-24MP",
"SF550X-24P",
"SG550X-48",
"SG550X-48MP",
"SG550X-48P",
"SG550X-24",
"SG550X-24MP",
"SG550X-24MPP",
"SG550X-24P",
"SG550XG-48T",
"SG550XG-24F",
"SG550XG-24T",
"SG550XG-8F8T",
"SX550X-52",
"SX550X-24",
"SX550X-24F",
"SX550X-24FT",
"SX550X-16FT",
"SX550X-12F",
"SF352-08",
"SF352-08MP",
"SF350-48",
"SF350-48MP",
"SF350-08",
"SG355-10P",
"SG350-52",
"SG350-52MP",
"SG350-52P",
"SG350-28",
"SG350-28MP",
"SG350-28P",
"SG350-28SFP",
"SG350-20",
"SG350-10",
"SG350-10MP",
"SG350-10P",
"SG350-10SFP",
"SG350-8PD",
"SG350X-48",
"SG350X-48MP",
"SG350X-48P",
"SG350X-48PV",
"SG350X-24",
"SG350X-24MP",
"SG350X-24P",
"SG350X-24PD",
"SG350X-24PV",
"SG350X-12PMV",
"SG350X-8PMD",
"SG350XG-48T",
"SG350XG-24F",
"SG350XG-24T",
"SG350XG-2F10",
"SX350X-52",
"SX350X-24",
"SX350X-24F",
"SX350X-12",
"SX350X-08",
"SF250-48",
"SF250-48HP",
"SF250-24",
"SF250-24P",
"SG250-50",
"SG250-50HP",
"SG250-50P",
"SG250-26",
"SG250-26HP",
"SG250-26P",
"SG250-18",
"SG250-10P",
"SG250-08",
"SG250-08HP",
"SG250X-48",
"SG250X-48P",
"SG250X-24",
"SG250X-24P",
"SF220-48",
"SF220-48P",
"SF220-24",
"SF220-24P",
"SG220-52",
"SG220-50",
"SG220-50P",
"SG220-28",
"SG220-28MP",
"SG220-26",
"SG220-26P",
"6880-X",
"6840-X",
"6807-XL",
"C6840-X-LE-40G",
"C6832-X-LE",
"C6824-X-LE-40G",
"C6816-X-LE",
"6513-E",
"6509-E",
"6509-NEB-A",
"6509-V-E",
"6506-E",
"6504-E",
"6503-E",
"4506-E",
"4503-E",
"4500-X",
"4500X-40",
"4500X-32",
"4500X-24",
"4500X-16",
"4500X-F-32",
"4500X-F-16",
"3850-48F-E",
"3850-48F-L",
"3850-48F-S",
"3850-48P-E",
"3850-48P-L",
"3850-48P-S",
"3850-48T-E",
"3850-48T-L",
"3850-48T-S",
"3850-48U-E",
"3850-48U-L",
"3850-48U-S",
"3850-48XS-E",
"3850-48XS-F-E",
"3850-48XS-F-S",
"3850-48XS-S",
"3850-32XS-E",
"3850-32XS-S",
"3850-24P-E",
"3850-24P-L",
"3850-24P-S",
"3850-24S-E",
"3850-24S-S",
"3850-24T-E",
"3850-24T-L",
"3850-24T-S",
"3850-24U-E",
"3850-24U-L",
"3850-24U-S",
"3850-24XS-E",
"3850-24XS-S",
"3850-24XU-E",
"3850-24XU-L",
"3850-24XU-S",
"3850-16XS-E",
"3850-16XS-S",
"3850-12S-E",
"3850-12S-S",
"3850-12XS-E",
"3850-12XS-S",
"C3850-12X48U-E",
"C3850-12X48U-L",
"C3850-12X48U-S",
"3750V2-48PS",
"3750V2-48TS",
"3750V2-24FS",
"3750V2-24PS",
"3750V2-24TS",
"3750-X",
"3750X-48P-E",
"3750X-48P-L",
"3750X-48P-S",
"3750X-48PF-E",
"3750X-48PF-L",
"3750X-48PF-S",
"3750X-48T-E",
"3750X-48T-L",
"3750X-48T-S",
"3750X-48U-E",
"3750X-48U-L",
"3750X-48U-S",
"3750X-24P-E",
"3750X-24P-L",
"3750X-24P-S",
"3750X-24S-E",
"3750X-24S-S",
"3750X-24T-E",
"3750X-24T-L",
"3750X-24T-S",
"3750X-24U-E",
"3750X-24U-L",
"3750X-24U-S",
"3750X-12S-E",
"3750X-12S-S",
"3650-48FD-E",
"3650-48FD-L",
"3650-48FD-S",
"3650-48FQ-E",
"3650-48FQ-L",
"3650-48FQ-S",
"3650-48FS-E",
"3650-48FS-L",
"3650-48FS-S",
"3650-48PD-E",
"3650-48PD-L",
"3650-48PD-S",
"3650-48PQ-E",
"3650-48PQ-L",
"3650-48PQ-S",
"3650-48PS-E",
"3650-48PS-L",
"3650-48PS-S",
"3650-48TD-E",
"3650-48TD-L",
"3650-48TD-S",
"3650-48TQ-E",
"3650-48TQ-L",
"3650-48TQ-S",
"3650-48TS-E",
"3650-48TS-L",
"3650-48TS-S",
"3650-24PD-E",
"3650-24PD-L",
"3650-24PD-S",
"3650-24PS-E",
"3650-24PS-L",
"3650-24PS-S",
"3650-24TD-E",
"3650-24TD-L",
"3650-24TD-S",
"3650-24TS-E",
"3650-24TS-L",
"3650-24TS-S",
"3650-12X48FD-E",
"3650-12X48FD-L",
"3650-12X48FD-S",
"3650-12X48UQ-E",
"3650-12X48UQ-L",
"3650-12X48UQ-S",
"3650-12X48UR-E",
"3650-12X48UR-L",
"3650-12X48UR-S",
"3650-12X48UZ-E",
"3650-12X48UZ-L",
"3650-12X48UZ-S",
"3650-8X24PD-E",
"3650-8X24PD-L",
"3650-8X24PD-S",
"3650-8X24UQ-E",
"3650-8X24UQ-L",
"3650-8X24UQ-S",
"3560V2-48PS",
"3560V2-48TS",
"3560V2-24DC",
"3560V2-24PS",
"3560V2-24TS",
"3560-C",
"3560C-12PC-s",
"3560C-8PC-S",
"3560CG-8PC-S",
"3560CG-8TC-S",
"3560CPD-8PT-S",
"3560-X",
"3560X-48P-E",
"3560X-48P-L",
"3560X-48P-S",
"3560X-48PF-E",
"3560X-48PF-L",
"3560X-48PF-S",
"3560X-48T-E",
"3560X-48T-L",
"3560X-48T-S",
"3560X-48U-E",
"3560X-48U-L",
"3560X-48U-S",
"3560X-24P-E",
"3560X-24P-L",
"3560X-24P-S",
"3560X-24T-E",
"3560X-24T-L",
"3560X-24T-S",
"3560X-24U-E",
"3560X-24U-L",
"3560X-24U-S",
"2960-48PST-L",
"2960-48PST-S",
"2960-48TC-L",
"2960-48TC-S",
"2960-48TT-L",
"2960-48TT-S",
"2960-24-S",
"2960-24LC-S",
"2960-24LT-L",
"2960-24PC-L",
"2960-24PC-S",
"2960-24TC-L",
"2960-24TC-S",
"2960-24TT-L",
"2960-C",
"2960CG-8TC-L",
"2960-L",
"2960L-48PQ-LL",
"2960L-48PS-LL",
"2960L-48TQ-LL",
"2960L-48TS-LL",
"2960L-24PQ-LL",
"2960L-24PS-LL",
"2960L-24TQ-LL",
"2960L-24TS-LL",
"2960L-16PS-LL",
"2960L-16TS-LL",
"2960L-8PS-LL",
"2960L-8TS-LL",
"2960L-SM-48PQ",
"2960L-SM-48PS",
"2960L-SM-48TQ",
"2960L-SM-48TS",
"2960L-SM-24PQ",
"2960L-SM-24PS",
"2960L-SM-24TQ",
"2960L-SM-24TS",
"2960L-SM-16PS",
"2960L-SM-16TS",
"2960L-SM-8PS",
"2960L-SM-8TS",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-Plus",
"2960-S",
"2960S-48FPD-L",
"2960S-48FPS-L",
"2960S-48LPD-L",
"2960S-48LPS-L",
"2960S-48TD-L",
"2960S-48TS-L",
"2960S-48TS-S",
"2960S-24PD-L",
"2960S-24PS-L",
"2960S-24TD-L",
"2960S-24TS-L",
"2960S-24TS-S",
"2960-SF",
"2960S-F48FPS-L",
"2960S-F48LPS-L",
"2960S-F48TS-L",
"2960S-F48TS-S",
"2960S-F24PS-L",
"2960S-F24TS-L",
"2960S-F24TS-S",
"2918-48TC-C",
"2918-48TT-C",
"2918-24TC-C",
"2918-24TT-C",
"3000-8TC",
"3000-4TC",
"2000-24T67",
"2000-16T67",
"2000-8T67",
"3800X-24FS-M",
"3600X-24CX-M",
"3600X-24FS-M",
"3600X-24TS-M",
"3400E-24TS-M",
"3400EG-12CS-M",
"3400EG-2CS-A",
"93180LC-EX",
"93180YC-EX",
"93180YC-EX-24",
"93108TC-EX",
"93108TC-EX-24",
"9372PX-E",
"9372TX-E",
"18-Slot",
"10-Slot",
"9-Slot",
"4-Slot",
"5672UP-16G",
"3548-X",
"3524-X",
"3264C-E",
"3172PQ-XL",
"3172TQ-32T",
"3172TQ-XL",
"3132C-Z",
"3132Q-XL",
"3064-T",
"Hyper-V",
"SF500-48",
"SF500-48MP",
"SF500-48P",
"SF500-24",
"SF500-24MP",
"SF500-24P",
"SG500-52",
"SG500-52MP",
"SG500-52P",
"SG500-52PP",
"SG500-28",
"SG500-28MPP",
"SG500-28P",
"SG500-28PP",
"SG500X-48",
"SG500X-48MPP",
"SG500X-48P",
"SG500X-24",
"SG500X-24MPP",
"SG500X-24P",
"SG500XG-8F8T",
"SF302-08",
"SF302-08MPP",
"SF302-08PP",
"SF300-48",
"SF300-48PP",
"SF300-24",
"SF300-24MP",
"SF300-24PP",
"SF300-08",
"SG300-52",
"SG300-52MP",
"SG300-52P",
"SG300-28",
"SG300-28MP",
"SG300-28PP",
"SG300-28SFP",
"SG300-20",
"SG300-10",
"SG300-10MPP",
"SG300-10PP",
"SG300-10SFP",
"SF200-48",
"SF200-48P",
"SF200-24",
"SF200-24FP",
"SF200-24P",
"SF200E-24P",
"SG200-50",
"SG200-50FP",
"SG200-50P",
"SG200-26",
"SG200-26FP",
"SG200-26P",
"SG200-18",
"SG200-10FP",
"SG200-08",
"SG200-08P",
"SF112-24",
"SF110-16",
"SF110D-16HP",
"SF110D-08HP",
"SG112-24",
"SG110-24",
"SG110-24HP",
"SG110-16",
"SG110-16HP",
"SG110D-08",
"SG110D-08HP",
"SG110D-05",
"SF102-24",
"SF100-24",
"SF100-16",
"SF100D-16",
"SF100D-16P",
"SF100D-08",
"SF100D-08P",
"SF100D-05",
"SG102-24",
"SG100-24",
"SG100-16",
"SG100D-08",
"SG100D-08P",
"SG100D-05",
"SG95-24",
"SG95-16",
"SG95D-08",
"SG95D-05",
"SF90-24",
"SF90D-16",
"SF90D-08",
"SF90D-08-M30",
"SF90D-05",
"SG92-24",
"SG92-16",
"SG90D-08",
"SG90D-08-M12",
"SG90D-05"
];
Â
Now check out the query below. Much cleaner! The import
brings the list in from the other query and looks for devices matching the list.
/**
* @intent Find End of life Cisco devices
* @description source https://www.cisco.com/c/en/us/products/eos-eol-listing.html
*/
import "Customers/PSNET/Cisco_EOL_list";
cisco_eol_patterns= (foreach i in cisco_eol_devices select "*"+i+"*");
foreach d in network.devices
where isPresent(d.platform.model)
let model = toUpperCase(d.platform.model)
foreach i in cisco_eol_patterns
where matches(model, i)
select distinct{
name: d.name,
vendor: d.platform.vendor,
model: d.platform.model,
osType: d.platform.os,
osVersion: d.platform.osVersion,
status: "EOL",
violation: true
}
Â