Skip to content

Commit 8ba901b

Browse files
Merge pull request #207 from splunk/ACD-4532-Updating-field-type-in-Network-Traffic
ACD-4532: Updating field type in Network Traffic data model
2 parents dd3fbd4 + 2bd6c44 commit 8ba901b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pytest_splunk_addon/standard_lib/data_models/Network_Traffic.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@
6464
{
6565
"name": "dest_ip",
6666
"type": "conditional",
67-
"condition": "| regex dest=\"(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\\.|$)){4}\"",
68-
"validity": "if(dest_ip==dest,dest_ip,null())",
67+
"condition": "dest_ip=*",
68+
"validity": "if(match(dest_ip, \"(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\\.|$)){4}\"),dest_ip,null())",
6969
"comment": "The IP address of the destination."
7070
},
7171
{
7272
"name": "dest_mac",
7373
"type": "conditional",
74-
"condition": "| regex dest=\"^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$\"",
75-
"validity": "if(dest==dest_mac,dest_mac,null())",
74+
"condition": "dest_mac=*",
75+
"validity": "if(match(dest_mac,\"^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$\"),dest_mac,null())",
7676
"comment": "The destination TCP/IP layer 2 Media Access Control (MAC) address of a packet's destination, such as 06:10:9f:eb:8f:14. Note: Always force lower case on this field and use colons instead of dashes, spaces, or no separator."
7777
},
7878
{
@@ -269,15 +269,15 @@
269269
{
270270
"name": "src_ip",
271271
"type": "conditional",
272-
"condition": "| regex src=\"(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\\.|$)){4}\"",
273-
"validity": "if(src_ip==src,src_ip,null())",
272+
"condition": "src_ip=*",
273+
"validity": "if(match(src_ip, \"(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\\.|$)){4}\"),src_ip,null())",
274274
"comment": "The ip address of the source."
275275
},
276276
{
277277
"name": "src_mac",
278278
"type": "conditional",
279-
"condition": "| regex src=\"^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$\"",
280-
"validity": "if(src==src_mac,src_mac,null())",
279+
"condition": "src_mac=*",
280+
"validity": "if(match(src_mac,\"^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$\"),src_mac,null())",
281281
"comment": "The source TCP/IP layer 2 Media Access Control (MAC) address of a packet's destination, such as 06:10:9f:eb:8f:14. Note: Always force lower case on this field and use colons instead of dashes, spaces, or no separator."
282282
},
283283
{

0 commit comments

Comments
 (0)