Create widget for bioc and ioc rule numbers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create widget for bioc and ioc rule numbers

L1 Bithead

Hello everyone,

 

I am trying to get numbers of bioc and ioc rules from our xdr integration. I want to create a widget to see that how many ioc and bioc rules added week by week. Do anyone have idea for this?

 

Thanks in advance.

 

Cortex XDR Cortex XSOAR

1 accepted solution

Accepted Solutions

L4 Transporter

Hi @ZuleyhaAy ,

 

Unfortunately, there is no OOTB command to get the rules. However, you can make use of xdr-get-audit-management-logs command. If you are heavily creating rules, please check the commands limitation for example for limit parameter, it says "

limit: Maximum number of audit logs to return per page. The default and maximum is 30." I am pasting here a sample script which could get the number of created BIOC rules and if you want to develop something else please use the below resources.
res = demisto.executeCommand("xdr-get-audit-management-logs", {"type": "Rules", "sub_type":"CREATE"})
count = 0
for rule in res[0]["Contents"]:
    if 'BIOC created' in rule['AUDIT_DESCRIPTION']:
        count += 1
demisto.results(count)
gyldz_0-1692613497009.png

 


https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/6.5/Cortex-XSOAR-Administrator-Guide/Script-...

I hope this answers your question.

View solution in original post

1 REPLY 1

L4 Transporter

Hi @ZuleyhaAy ,

 

Unfortunately, there is no OOTB command to get the rules. However, you can make use of xdr-get-audit-management-logs command. If you are heavily creating rules, please check the commands limitation for example for limit parameter, it says "

limit: Maximum number of audit logs to return per page. The default and maximum is 30." I am pasting here a sample script which could get the number of created BIOC rules and if you want to develop something else please use the below resources.
res = demisto.executeCommand("xdr-get-audit-management-logs", {"type": "Rules", "sub_type":"CREATE"})
count = 0
for rule in res[0]["Contents"]:
    if 'BIOC created' in rule['AUDIT_DESCRIPTION']:
        count += 1
demisto.results(count)
gyldz_0-1692613497009.png

 


https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/6.5/Cortex-XSOAR-Administrator-Guide/Script-...

I hope this answers your question.
  • 1 accepted solution
  • 1146 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!