Skip to content

Commit 6f786ea

Browse files
authored
Update README.md with update example [skip ci]
1 parent b62577b commit 6f786ea

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,3 +1583,26 @@ seqcli ingest -i http.log --invalid-data=ignore -x "{@t:w3cdt} {ServerIP} {@m:={
15831583
```
15841584

15851585
A nested `{@m:=` pattern is used to collect a substring of the log line for display as the event's message.
1586+
1587+
## Updating entities
1588+
1589+
The `seqcli * update` family of commands make it possible to perform arbitrary updates to many complex entity types.
1590+
1591+
The `update` commands, like `seqcli signal update` shown in the example below, receive an updated JSON representation of an
1592+
entity via `STDIN`.
1593+
1594+
This works particularly well with tools like `jq` and modern shells with native JSON support, such as PowerShell:
1595+
1596+
```
1597+
PS > $warnings = (seqcli signal list -i signal-m33302 --json | ConvertFrom-Json)
1598+
1599+
PS > $warnings.Title
1600+
Warnings
1601+
1602+
PS > $warnings.Title = "Alarms"
1603+
1604+
PS > (echo $warnings | ConvertTo-Json) | seqcli signal update --json-stdin
1605+
1606+
PS > seqcli signal list -i signal-m33302 --json
1607+
{"Title": "Alarms", "Description": "Automatically created", "Filters": [{"De...
1608+
```

0 commit comments

Comments
 (0)