Hi Petr,
I used <AND "Offense Closed Reason" != 'null'> as criteria as whenever closing an offense you must give a reason. You should be able to further structure your report when differentiating the close reasons numbers, while reprorting over the different close reasons given. The search listed in here does work on 7.5 demo instance at IBM cloud. It does work as log activity search just as well. Please use the search given here or use standard search for user offenses and modify date and condition.
AQL code sample based on standard search (see screenshot)
SELECT "userName" AS 'Username', UniqueCount("CRE Name") AS 'CRE Name (custom) (Unique Count)', UniqueCount(qid) AS 'Event Name (Unique Count)', UniqueCount(category) AS 'Low Level Category (Unique Count)', UniqueCount("sourceIP") AS 'Source IP (Unique Count)', UniqueCount("destinationIP") AS 'Destination IP (Unique Count)', UniqueCount("destinationPort") AS 'Destination Port (Unique Count)', MIN("magnitude") AS 'Magnitude (Minimum)', SUM("eventCount") AS 'Event Count (Sum)', COUNT(*) AS 'Count' from events where ( ( "deviceType"='18' AND "hasOffense"='true' AND "Offense Closed Reason" != 'null') AND "userName" != 'null' ) GROUP BY "userName" order by "Event Count (Sum)" desc last 7 days
Regards
Karl
------------------------------
[Karl] [Jaeger] [Business Partner]
[QRadar Specialist]
[pro4bizz]
[Karlsruhe] [Germany]
[4972190981722]
------------------------------
Original Message:
Sent: Thu February 02, 2023 04:38 AM
From: Petr Kavalik
Subject: Report / Dashboard of open and closed offenses
Hi Karl,
This looks great, however seems like I'm getting error while using this search as AQL doesn't recognize "Offense Closed Reason" field:
The query_expression contains invalid AQL syntax.
The query_expression contains invalid AQL syntax. - Field "Offense Closed Reason" does not exist in catalog "events"
Could you please advice how to define / extract Status or Close Reason field from Offense so I can use it in AQL?
Thanks a lot for your help.
Best regards
Petr
------------------------------
Petr Kavalik
Original Message:
Sent: Wed February 01, 2023 11:59 AM
From: Karl Jaeger
Subject: Report / Dashboard of open and closed offenses
Petr,
I have used offenses by user and modified it like this:
SELECT "userName" AS 'Username', UniqueCount("CRE Name") AS 'CRE Name (custom) (Unique Count)', UniqueCount(qid) AS 'Event Name (Unique Count)', UniqueCount(category) AS 'Low Level Category (Unique Count)', UniqueCount("sourceIP") AS 'Source IP (Unique Count)', UniqueCount("destinationIP") AS 'Destination IP (Unique Count)', UniqueCount("destinationPort") AS 'Destination Port (Unique Count)', MIN("magnitude") AS 'Magnitude (Minimum)', SUM("eventCount") AS 'Event Count (Sum)', COUNT(*) AS 'Count' from events where ( ( "deviceType"='18' AND "hasOffense"='true' AND "Offense Closed Reason" != 'null') AND "userName" != 'null' ) GROUP BY "userName" order by "Event Count (Sum)" desc last 7 DAYS
when defining your custom dashboard inside pulse just copy your log activity AQL into your AQL statement window
all other parameters are default
Of course you can skip group by username if you like.
Hope this helps
------------------------------
[Karl] [Jaeger] [Business Partner]
[QRadar Specialist]
[pro4bizz]
[Karlsruhe] [Germany]
[4972190981722]
Original Message:
Sent: Wed February 01, 2023 08:40 AM
From: Petr Kavalik
Subject: Report / Dashboard of open and closed offenses
Hello,
I'm trying to create a dashboard (Pulse) or report (via Log Activity) to show open and closed offenses per week.
I've tried to use AQL search in Dashboard but was unable to find. way how to filter open and closed offenses.
Via "offense" filter (Pulse Dashboard) I can filter status, but have to manually update time each week.
Same goes for API, status, start / close time, id is fine but not sure how to set time, for example "last 7 days" etc.
Dashboard / Report just needs to show how many open or closed offenses there were past week.
Thanks in advance for any advice
b.r
Petr
------------------------------
Petr Kavalik
------------------------------