Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Stephens <[email protected]>
  • Loading branch information
patrick-stephens committed Nov 12, 2024
1 parent 30f2a5d commit 59d0072
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,39 @@ SYNTH_ALERT_PORT=
```

Once this is done, just run up `docker compose up` to start sending an alert and responding.

Once running, you will see a report of an issue like so and can tell it to fix it up:

![Example chatops slack responses](./docs/slack_example.png)

Specify a command to run using the syntax `FLBNode:<Hostname>:<Port> FLBCmd:<Command>`, this syntax is arbitrary and just an example for usage in the demo.

```shell
FLBNode:node1:8090 FLBCmd:fix_permissions
```

The command will show you it is running (just a dummy here as an example):

```shell
node1-1 | [0] alert: [[1731410091.996160421, {}], {"ERROR"=>"testfile.txt has incorrect permissions"}]
...
http-slack-server-1 | 2024.11.12 11:15:24 INFO com.oracle.flb.chatops.FLBSocialCommandResource VirtualThread[#63,[0x4de53a24 0x79177571] WebServer socket]/runnable@ForkJoinPool-1-worker-4: Actioning:
http-slack-server-1 | {"isOk" : "true", "command":"fix_permissions", "FLBNode"="node1:8090"}
http-slack-server-1 | 2024.11.12 11:15:24 INFO com.oracle.flb.chatops.FLBSocialCommandResource VirtualThread[#63,[0x4de53a24 0x79177571] WebServer socket]/runnable@ForkJoinPool-1-worker-4: Thread : [0x4de53a24 0x79177571] WebServer socket ending <<<<<<<<<<<<<
node1-1 | [2024/11/12 11:15:24] [ info] [output:http:http.1] http-slack-server:8080, HTTP status=200
node1-1 | {postAlertNoId= 11-14-53}
node1-1 | {
node1-1 | command = "fix_permissions",
node1-1 | tagged = "11-14-53",
node1-1 | time = "11-15-24",
node1-1 | <metatable> = {
node1-1 | type = 2
node1-1 | }
node1-1 | }
node1-1 | Will execute fix_permissions
node1-1 | running: /fluent-bit/etc/cmd_fix_permissions.sh > /logs//remoteCommand.lua.out
node1-1 | [0] command: [[1731410124.293250380, {}], {"command"=>"fix_permissions", "time"=>"11-15-24", "tagged"=>"11-14-53"}]
node1-1 | [2024/11/12 11:15:24] [ info] [input:tail:tail.3] inotify_fs_add(): inode=2 watch_fd=1 name=/logs//remoteCommand.lua.out
node1-1 | [0] results: [[1731410124.999926256, {}], {"log"=>"chmod a+w testfile.txt"}]
...
```
Binary file added docs/slack_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 59d0072

Please sign in to comment.