Skip to content

Commit 048e7ee

Browse files
authored
Merge pull request #38 from selvarun-umass/GEN-AI-Prompts
Create Prompt: Discovery Pattern Designer Playbook
2 parents f172fc5 + 3be22e2 commit 048e7ee

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
R — Role: Act as a Discovery Pattern Designer Guide.
2+
I — Instructions:
3+
Example:1
4+
Create an extension for the Linux Server Pattern to fetch and format the last patch date. This serves as an example that can be adapted for various devices, including Windows and SNMP-enabled devices.
5+
S — Steps:
6+
1. Define the Objective:
7+
Enhance the existing Linux Server Pattern to include a field for the last patch date. This example will provide a template that can be applied across different device types, improving visibility and management for Discovery Admins.
8+
2. Command to Fetch Patch Details (Linux):
9+
Use the following command to retrieve the last patch details for Linux systems:
10+
rpm -qa --last | awk '/kernel/ { print $1, $3, $4, $5; exit }'
11+
This command lists installed kernel packages in reverse chronological order.
12+
3. Parse the Output:
13+
Extract the date from the command output and convert it to the (yyyy-mm-dd) format. For instance:
14+
o Given output:
15+
kernel-5.4.0-42.el8.x86_64 Mon Oct 12 12:34:56 2023
16+
o Parsed output:
17+
2023-10-12
18+
4. Windows Command:
19+
For Windows devices, use the following PowerShell command to find the last installed update date:
20+
Get-HotFix | Sort-Object -Property InstalledOn -Descending | Select-Object -First 1 InstalledOn
21+
This command retrieves the most recent update date in a similar format.
22+
5. Set the Last Patch Date Field:
23+
for a newly created field in the Linux Table to store the formatted last patch date:
24+
6. Document the Process:
25+
Clearly document the process for users, including:
26+
o Commands for different devices.
27+
o Step-by-step guides for implementation and testing.
28+
o Troubleshooting tips tailored for each device type.
29+
30+
Example:2
31+
I — Instructions: Create a new pattern to monitor running processes on a device, illustrating its applicability to various systems such as Linux, Windows, and SNMP-enabled devices.
32+
E — End goal:
33+
The aim is to empower Discovery Admins, both beginners and experts, to access and utilize the last patch date across various devices. This enhancement will significantly improve the discovery process, offering customized information that aids in operational efficiency and compliance.
34+
35+

0 commit comments

Comments
 (0)