-
-
Notifications
You must be signed in to change notification settings - Fork 3
Update UDP docs for the new executor #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: topic/new-executor
Are you sure you want to change the base?
Changes from 4 commits
7a0828f
44d8406
139956b
da3fb7d
63be852
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -451,10 +451,6 @@ operators: | |
| description: 'Loads bytes from a TCP or TLS connection.' | ||
| example: 'load_tcp "0.0.0.0:8090" { read_json }' | ||
| path: 'reference/operators/load_tcp' | ||
| - name: 'load_udp' | ||
| description: 'Loads bytes from a UDP socket.' | ||
| example: 'load_udp "0.0.0.0:8090"' | ||
| path: 'reference/operators/load_udp' | ||
| - name: 'load_zmq' | ||
| description: 'Receives ZeroMQ messages.' | ||
| example: 'load_zmq' | ||
|
|
@@ -691,10 +687,10 @@ operators: | |
| description: 'Saves bytes to a TCP or TLS connection.' | ||
| example: 'save_tcp "0.0.0.0:8090", tls=true' | ||
| path: 'reference/operators/save_tcp' | ||
| - name: 'save_udp' | ||
| description: 'Saves bytes to a UDP socket.' | ||
| example: 'save_udp "0.0.0.0:8090"' | ||
| path: 'reference/operators/save_udp' | ||
| - name: 'to_udp' | ||
| description: 'Sends one UDP datagram per input event.' | ||
| example: 'to_udp "127.0.0.1:514"' | ||
| path: 'reference/operators/to_udp' | ||
| - name: 'save_zmq' | ||
| description: 'Sends bytes as ZeroMQ messages.' | ||
| example: 'save_zmq' | ||
|
|
@@ -2134,14 +2130,6 @@ load_tcp "0.0.0.0:8090" { read_json } | |
|
|
||
| </ReferenceCard> | ||
|
|
||
| <ReferenceCard title="load_udp" description="Loads bytes from a UDP socket." href="/reference/operators/load_udp"> | ||
|
|
||
| ```tql | ||
| load_udp "0.0.0.0:8090" | ||
| ``` | ||
|
|
||
| </ReferenceCard> | ||
|
|
||
| <ReferenceCard title="load_zmq" description="Receives ZeroMQ messages." href="/reference/operators/load_zmq"> | ||
|
|
||
| ```tql | ||
|
|
@@ -2490,10 +2478,10 @@ save_tcp "0.0.0.0:8090", tls=true | |
|
|
||
| </ReferenceCard> | ||
|
|
||
| <ReferenceCard title="save_udp" description="Saves bytes to a UDP socket." href="/reference/operators/save_udp"> | ||
| <ReferenceCard title="to_udp" description="Sends one UDP datagram per input event." href="/reference/operators/to_udp"> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This new card is inserted in the bytes CardGrid (between Useful? React with 👍 / 👎. |
||
|
|
||
| ```tql | ||
| save_udp "0.0.0.0:8090" | ||
| to_udp "127.0.0.1:514" | ||
| ``` | ||
|
|
||
| </ReferenceCard> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -150,7 +150,6 @@ load_tcp "tcp://0.0.0.0:12345", parallel=10 { | |
| | `s3` | <Op>load_s3</Op> | `from "s3://bucket/file.json"` | | ||
| | `sqs` | <Op>load_sqs</Op> | `from "sqs://my-queue" { read_json }` | | ||
| | `tcp` | <Op>load_tcp</Op> | `from "tcp://127.0.0.1:13245" { read_json }` | | ||
| | `udp` | <Op>load_udp</Op> | `from "udp://127.0.0.1:56789" { read_json }` | | ||
| | `zmq` | <Op>load_zmq</Op> | `from "zmq://127.0.0.1:56789" { read_json }` | | ||
|
Comment on lines
152
to
153
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Removing the Useful? React with 👍 / 👎. |
||
|
|
||
| Please see the respective operator pages for details on the URI's locator format. | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| --- | ||
| title: to_udp | ||
| category: Outputs/Events | ||
| example: 'to_udp "127.0.0.1:514"' | ||
| --- | ||
|
|
||
| import Integration from '@components/see-also/Integration.astro'; | ||
| import Op from '@components/see-also/Op.astro'; | ||
|
|
||
| Sends one UDP datagram per input event. | ||
|
|
||
| ```tql | ||
| to_udp endpoint:string, [message=string|blob|record] | ||
| ``` | ||
|
|
||
| ## Description | ||
|
|
||
| Sends one UDP datagram per input event to a fixed remote UDP endpoint. | ||
|
|
||
| ### `endpoint: string` | ||
|
|
||
| The address of the remote endpoint. Must be of the format `host:port`. The | ||
| optional `udp://` prefix is accepted but not required. | ||
|
|
||
| ### `message = string|blob|record (optional)` | ||
|
|
||
| An expression that is evaluated once per input event and must produce one of | ||
| the following types: | ||
|
|
||
| - `string` values are sent as UTF-8 bytes. | ||
| - `blob` values are sent verbatim. | ||
| - `record` values are serialized as compact JSON. | ||
| - `null` values are skipped with a warning. | ||
|
|
||
| All other result types are ignored with a warning. | ||
|
|
||
| If you omit `message`, the operator sends the whole event as compact JSON. | ||
|
|
||
| ## Examples | ||
|
|
||
| Send a field as a UDP datagram: | ||
|
|
||
| ```tql | ||
| from {message: "hello"} | ||
| to_udp "127.0.0.1:514", message=message | ||
| ``` | ||
|
|
||
| Send the full event as compact JSON: | ||
|
|
||
| ```tql | ||
| from {service: "dns", status: "ok"} | ||
| to_udp "127.0.0.1:514" | ||
| ``` | ||
|
|
||
| ## See Also | ||
|
|
||
| - <Op>from_udp</Op> | ||
| - <Integration>udp</Integration> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example now pipes
write_syslogdirectly intoto_udpwithout amessageargument, butto_udpdefaults to sending each input event as compact JSON whenmessageis omitted. In this specific pipeline, that changes the wire payload from a raw RFC 5424 syslog line to JSON-encoded output, so readers following the example will not actually emit the message format described below the snippet.Useful? React with 👍 / 👎.