Skip to content

Commit

Permalink
update config samples
Browse files Browse the repository at this point in the history
  • Loading branch information
karimra committed Oct 27, 2020
1 parent 26f67a0 commit 25735c7
Show file tree
Hide file tree
Showing 3 changed files with 175 additions and 195 deletions.
196 changes: 94 additions & 102 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,107 +1,99 @@
{
"username": "admin",
"password": "sros",
"port": 57400,
"timeout": "5s",
"skip-verify": true,
"tls-key": "/path/to/client.key",
"tls-cert": "/path/to/client.crt",
"tls-ca": "/path/to/ca.crt",
"targets": {
"172.17.0.100": {
"timeout": "2s",
"subscriptions": [
"sub1"
],
"outputs": [
"group1",
"group3"
]
"username": "admin",
"password": "sros",
"port": 57400,
"timeout": "5s",
"skip-verify": true,
"tls-key": "/path/to/client.key",
"tls-cert": "/path/to/client.crt",
"tls-ca": "/path/to/ca.crt",
"targets": {
"172.17.0.100": {
"timeout": "2s",
"subscriptions": [
"sub1"
],
"outputs": [
"output1",
"output3"
]
},
"172.17.0.101": {
"username": "sros",
"password": "sros",
"insecure": true,
"subscriptions": [
"sub2"
],
"outputs": [
"output2",
"output3"
]
},
"172.17.0.102:57000": {
"password": "sros123",
"tls-key": "/path/file1",
"tls-cert": "/path/file2"
},
"172.17.0.103": null
},
"172.17.0.101": {
"username": "sros",
"password": "sros",
"insecure": true,
"subscriptions": [
"sub2"
],
"outputs": [
"group2",
"group3"
]
"subscriptions": {
"sub1": {
"paths": [
"/configure/port[port-id=*]",
"/state/port[port-id=*]"
],
"stream-mode": "on_change"
},
"sub2": {
"paths": [
"/configure/port[port-id=*]/statistics"
],
"stream-mode": "sample",
"sample-interval": "10s"
}
},
"172.17.0.102:57000": {
"password": "sros123",
"tls-key": "/path/file1",
"tls-cert": "/path/file2"
},
"172.17.0.103": null
},
"subscriptions": {
"sub1": {
"paths": [
"/configure/port[port-id=*]",
"/state/port[port-id=*]"
],
"stream-mode": "on_change"
},
"sub2": {
"paths": [
"/configure/port[port-id=*]/statistics"
],
"stream-mode": "sample",
"sample-interval": "10s"
"outputs": {
"output1": {
"type": "file",
"file-type": "stdout"
},
"output2": {
"type": "file",
"filename": "local.log"
},
"output3": {
"type": "nats",
"address": "localhost:4222",
"subject-prefix": "telemetry",
"username": null,
"password": null
},
"output4": {
"type": "stan",
"address": "localhost:4223",
"subject": "telemetry",
"username": null,
"password": null,
"name": null,
"cluster-name": "test-cluster",
"timeout": null,
"ping-interval": null,
"ping-retry": null
},
"output5": {
"type": "kafka",
"address": "localhost:9092",
"topic": "telemetry",
"max-retry": null,
"timeout": null
},
"output6": {
"type": "nats",
"address": "localhost:4222",
"subject-prefix": "telemetry",
"username": null,
"password": null
}
}
},
"outputs": {
"group1": [
{
"type": "file",
"file-type": "stdout"
}
],
"group2": [
{
"type": "file",
"filename": "local.log"
},
{
"type": "nats",
"address": "localhost:4222",
"subject-prefix": "telemetry",
"username": null,
"password": null
}
],
"group3": [
{
"type": "stan",
"address": "localhost:4223",
"subject": "telemetry",
"username": null,
"password": null,
"name": null,
"cluster-name": "test-cluster",
"timeout": null,
"ping-interval": null,
"ping-retry": null
}
],
"group4": [
{
"type": "kafka",
"address": "localhost:9092",
"topic": "telemetry",
"max-retry": null,
"timeout": null
},
{
"type": "nats",
"address": "localhost:4222",
"subject-prefix": "telemetry",
"username": null,
"password": null
}
]
}
}
98 changes: 42 additions & 56 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,80 +8,66 @@ tls-cert = "/path/to/client.crt"
tls-ca = "/path/to/ca.crt"

[targets]

[targets."172.17.0.100"]
timeout = "2s"
subscriptions = [
"sub1"
]
ouputs = [
"group1",
"group3"
]
subscriptions = [ "sub1" ]
outputs = [
"output1",
"output3"
]

[targets."172.17.0.101"]
username = "sros"
password = "sros"
insecure = true
subscriptions = [
"sub2"
]
outputs = [
"group2",
"group3"
]
subscriptions = [ "sub2" ]
outputs = [
"output2",
"output3"
]

[targets."172.17.0.102:57000"]
password = "sros123"
tls-key = "/path/file1"
tls-cert = "/path/file2"

[targets."172.17.0.103"]

[subscriptions]

[subscriptions.sub1]
paths = [
"/configure/port[port-id=*]",
"/state/port[port-id=*]"
]
stream-mode = "on_change"

[subscriptions.sub2]
paths = [
"/configure/port[port-id=*]/statistics"
[subscriptions.sub1]
paths = [
"/configure/port[port-id=*]",
"/state/port[port-id=*]"
]
stream-mode = "sample"
sample-interval = "10s"
stream-mode = "on_change"

[outputs]
[subscriptions.sub2]
paths = [ "/configure/port[port-id=*]/statistics" ]
stream-mode = "sample"
sample-interval = "10s"

[[outputs.group1]]
type = "file"
file-type = "stdout"
[outputs.output1]
type = "file"
file-type = "stdout"

[[outputs.group2]]
type = "file"
filename = "local.log"
[outputs.output2]
type = "file"
filename = "local.log"

[[outputs.group2]]
type = "nats"
address = "localhost:4222"
subject-prefix = "telemetry"
[outputs.output3]
type = "nats"
address = "localhost:4222"
subject-prefix = "telemetry"

[[outputs.group3]]
type = "stan"
address = "localhost:4223"
subject = "telemetry"
cluster-name = "test-cluster"
[outputs.output4]
type = "stan"
address = "localhost:4223"
subject = "telemetry"
cluster-name = "test-cluster"

[[outputs.group4]]
type = "kafka"
address = "localhost:9092"
topic = "telemetry"
[outputs.output5]
type = "kafka"
address = "localhost:9092"
topic = "telemetry"

[[outputs.group4]]
type = "nats"
address = "localhost:4222"
subject-prefix = "telemetry"

[outputs.output6]
type = "nats"
address = "localhost:4222"
subject-prefix = "telemetry"
Loading

0 comments on commit 25735c7

Please sign in to comment.