You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add missing VRL functions to Custom Processor doc [WEB-7892] (#37611)
* Add missing VRL functions to Custom Processor doc [WEB-7892]
Adds four VRL functions that exist in Vector but were missing from the
OP Custom Processor reference: pop (Array), encrypt_ip (IP), decrypt_ip
(IP), and haversine (new Map category).
* Update content/en/observability_pipelines/processors/custom_processor.md
Co-authored-by: Rosa Trieu <107086888+rtrieu@users.noreply.github.com>
* Update data/reference/functions.json
Co-authored-by: Rosa Trieu <107086888+rtrieu@users.noreply.github.com>
* Update data/reference/functions.json
Co-authored-by: Rosa Trieu <107086888+rtrieu@users.noreply.github.com>
---------
Co-authored-by: Rosa Trieu <107086888+rtrieu@users.noreply.github.com>
Copy file name to clipboardExpand all lines: content/en/observability_pipelines/processors/custom_processor.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,7 @@ Use this processor with Vector Remap Language (VRL) to modify and enrich your lo
30
30
-[Convert syslog values](#convert) to read-able values.
31
31
- Enrich values by using [enrichment tables](#enrichment).
32
32
-[Manipulate IP values](#ip).
33
+
- Calculate [geographic distances](#map) and bearing with haversine.
33
34
-[Parse](#parse) values with custom rules (for example, grok, regex, and so on) and out-of-the-box functions (for example, syslog, apache, VPC flow logs, and so on). See [Writing Effective Grok Parsing Rules with Regular Expressions][3] for information.
"description": "Decrypts an IP address encrypted with `encrypt_ip`, returning the original IP address.\n\nSupported modes:\n\n* `aes128` - Reverses AES-128 ipcrypt-deterministic encryption. Key must be exactly 16 bytes.\n* `pfx` - Reverses prefix-preserving ipcrypt-pfx encryption. Key must be exactly 32 bytes.\n\nThe key and mode must match those used during encryption.",
6216
+
"notices": [],
6217
+
"arguments": [
6218
+
{
6219
+
"name": "ip",
6220
+
"description": "The encrypted IP address to decrypt (IPv4 or IPv6).",
6221
+
"required": true,
6222
+
"type": [
6223
+
"string"
6224
+
]
6225
+
},
6226
+
{
6227
+
"name": "key",
6228
+
"description": "The decryption key as raw bytes. Must match the key used for encryption: 16 bytes for `aes128`, 32 bytes for `pfx`.",
6229
+
"required": true,
6230
+
"type": [
6231
+
"string"
6232
+
]
6233
+
},
6234
+
{
6235
+
"name": "mode",
6236
+
"description": "The decryption mode: `aes128` or `pfx`. Must match the mode used for encryption.",
6237
+
"required": true,
6238
+
"type": [
6239
+
"string"
6240
+
]
6241
+
}
6242
+
],
6243
+
"internal_failure_reasons": [
6244
+
"`ip` is not a valid IP address.",
6245
+
"`mode` is not a supported mode (`aes128` or `pfx`).",
6246
+
"`key` length does not match the mode requirements (16 bytes for `aes128`, 32 bytes for `pfx`)."
"description": "Encrypts an IP address, transforming it into a different valid IP address of the same version.\n\nSupported modes:\n\n* `aes128` - Scrambles the IP using AES-128 encryption (ipcrypt-deterministic). Accepts IPv4 or IPv6; key must be exactly 16 bytes.\n* `pfx` - Prefix-preserving encryption (ipcrypt-pfx), that maintains network hierarchy so addresses in the same subnet encrypt to addresses sharing the same prefix. Key must be exactly 32 bytes.\n\nEncryption is deterministic: the same input IP, key, and mode always produce the same output.",
6268
+
"notices": [],
6269
+
"arguments": [
6270
+
{
6271
+
"name": "ip",
6272
+
"description": "The IP address to encrypt (IPv4 or IPv6).",
6273
+
"required": true,
6274
+
"type": [
6275
+
"string"
6276
+
]
6277
+
},
6278
+
{
6279
+
"name": "key",
6280
+
"description": "The encryption key as raw bytes. Must be 16 bytes for `aes128` mode or 32 bytes for `pfx` mode.",
6281
+
"required": true,
6282
+
"type": [
6283
+
"string"
6284
+
]
6285
+
},
6286
+
{
6287
+
"name": "mode",
6288
+
"description": "The encryption mode: `aes128` or `pfx`.",
6289
+
"required": true,
6290
+
"type": [
6291
+
"string"
6292
+
]
6293
+
}
6294
+
],
6295
+
"internal_failure_reasons": [
6296
+
"`ip` is not a valid IP address.",
6297
+
"`mode` is not a supported mode (`aes128` or `pfx`).",
6298
+
"`key` length does not match the mode requirements (16 bytes for `aes128`, 32 bytes for `pfx`)."
"ns": "Nanoseconds (1 billion nanoseconds in a second)",
7399
7535
"us": "Microseconds (1 million microseconds in a second)",
7400
-
"µs": "Microseconds (1 million microseconds in a second)",
7536
+
"\u00b5s": "Microseconds (1 million microseconds in a second)",
7401
7537
"ms": "Milliseconds (1 thousand microseconds in a second)",
7402
7538
"cs": "Centiseconds (100 centiseconds in a second)",
7403
7539
"ds": "Deciseconds (10 deciseconds in a second)",
@@ -7775,7 +7911,7 @@
7775
7911
},
7776
7912
{
7777
7913
"name": "lossy",
7778
-
"description": "Whether to parse the JSON in a lossy manner. Replaces invalid UTF-8 characters\nwith the Unicode character `�` (U+FFFD) if set to true, otherwise returns an error\nif there are any invalid UTF-8 characters present.",
7914
+
"description": "Whether to parse the JSON in a lossy manner. Replaces invalid UTF-8 characters\nwith the Unicode character `\ufffd` (U+FFFD) if set to true, otherwise returns an error\nif there are any invalid UTF-8 characters present.",
7779
7915
"required": false,
7780
7916
"default": true,
7781
7917
"type": [
@@ -8512,12 +8648,12 @@
8512
8648
},
8513
8649
{
8514
8650
"title": "Parse URL with internationalized domain name",
"description": "Calculates the [haversine](https://en.wikipedia.org/wiki/Haversine_formula) great-circle distance and bearing between two geographic coordinates.",
9381
+
"notices": [],
9382
+
"arguments": [
9383
+
{
9384
+
"name": "latitude1",
9385
+
"description": "Latitude of the first point in decimal degrees.",
9386
+
"required": true,
9387
+
"type": [
9388
+
"float"
9389
+
]
9390
+
},
9391
+
{
9392
+
"name": "longitude1",
9393
+
"description": "Longitude of the first point in decimal degrees.",
9394
+
"required": true,
9395
+
"type": [
9396
+
"float"
9397
+
]
9398
+
},
9399
+
{
9400
+
"name": "latitude2",
9401
+
"description": "Latitude of the second point in decimal degrees.",
9402
+
"required": true,
9403
+
"type": [
9404
+
"float"
9405
+
]
9406
+
},
9407
+
{
9408
+
"name": "longitude2",
9409
+
"description": "Longitude of the second point in decimal degrees.",
9410
+
"required": true,
9411
+
"type": [
9412
+
"float"
9413
+
]
9414
+
},
9415
+
{
9416
+
"name": "measurement_unit",
9417
+
"description": "Unit for the returned distance: `kilometers` or `miles`.",
9418
+
"required": false,
9419
+
"type": [
9420
+
"string"
9421
+
],
9422
+
"default": "kilometers"
9423
+
}
9424
+
],
9425
+
"internal_failure_reasons": [],
9426
+
"return": {
9427
+
"types": [
9428
+
"object"
9429
+
]
9430
+
},
9431
+
"examples": [
9432
+
{
9433
+
"title": "Calculate distance and bearing in kilometers",
0 commit comments