mirror of
https://github.com/nioc/xmpp-bot.git
synced 2024-11-14 05:46:49 +01:00
141 lines
3.9 KiB
JSON
141 lines
3.9 KiB
JSON
{
|
|
"logger": {
|
|
"level": "error",
|
|
"file": {
|
|
"active": true,
|
|
"pattern": "%d %p %m",
|
|
"path": "./",
|
|
"filename": "xmpp-bot.log"
|
|
},
|
|
"console": {
|
|
"active": false,
|
|
"coloured": true
|
|
},
|
|
"stdout": {
|
|
"active": false,
|
|
"pattern": "%p %m"
|
|
}
|
|
},
|
|
"webhooksListener": {
|
|
"path": "/webhooks",
|
|
"port": 8000,
|
|
"ssl": {
|
|
"port": null,
|
|
"certPath": "/etc/ssl/certs/ssl-cert-snakeoil.pem",
|
|
"keyPath": "/etc/ssl/private/ssl-cert-snakeoil.key"
|
|
},
|
|
"users": [
|
|
{
|
|
"login": "login1",
|
|
"password": "1pass"
|
|
},
|
|
{
|
|
"login": "login2",
|
|
"password": "2pass"
|
|
}
|
|
],
|
|
"accessLog": {
|
|
"active": true,
|
|
"path": "./",
|
|
"filename": "webhook.log"
|
|
}
|
|
},
|
|
"xmppServer": {
|
|
"service": "xmpps://domain-xmpp.ltd:5223",
|
|
"domain": "domain-xmpp.ltd",
|
|
"username": "bot@domain-xmpp.ltd",
|
|
"password": "botPass",
|
|
"resource": "botservice",
|
|
"errorReply": "Oops, something went wrong :(",
|
|
"rooms": [
|
|
{
|
|
"id": "roomname@conference.domain-xmpp.ltd",
|
|
"password": null
|
|
}
|
|
]
|
|
},
|
|
"incomingWebhooks": [
|
|
{
|
|
"path": "/webhooks/w1",
|
|
"action": "send_xmpp_message"
|
|
},
|
|
{
|
|
"path": "/webhooks/grafana",
|
|
"action": "send_xmpp_template",
|
|
"args": {
|
|
"destination": "grafana@conference.domain-xmpp.ltd",
|
|
"type": "groupchat"
|
|
},
|
|
"template": "${title}\r\n${message}\r\n${evalMatches[].metric}: ${evalMatches[].value}\r\n${imageUrl}"
|
|
},
|
|
{
|
|
"path": "/webhooks/dummy",
|
|
"action": "dummy"
|
|
}
|
|
],
|
|
"xmppHooks": [
|
|
{
|
|
"room": "bot@domain-xmpp.ltd",
|
|
"action": "outgoing_webhook",
|
|
"args": ["w1"]
|
|
},
|
|
{
|
|
"room": "roomname@conference.domain-xmpp.ltd",
|
|
"action": "outgoing_webhook",
|
|
"args": ["w1"]
|
|
}
|
|
],
|
|
"outgoingWebhooks": [
|
|
{
|
|
"code": "basic-json-reply",
|
|
"url": "https://domain.ltd:port/path/resource",
|
|
"strictSSL": true,
|
|
"contentType": "application/json",
|
|
"authMethod": "basic",
|
|
"user": "user3",
|
|
"password": "3pass",
|
|
"bearer": null
|
|
},
|
|
{
|
|
"code": "bearer-form",
|
|
"url": "https://domain.ltd:port/path/resource",
|
|
"strictSSL": true,
|
|
"contentType": "application/x-www-form-urlencoded",
|
|
"authMethod": "bearer",
|
|
"user": null,
|
|
"password": null,
|
|
"bearer": "abcdefgh"
|
|
},
|
|
{
|
|
"code": "protected",
|
|
"url": "https://domain.ltd:port/path/protectedresource",
|
|
"strictSSL": true,
|
|
"contentType": "application/json",
|
|
"authMethod": null,
|
|
"user": null,
|
|
"password": null,
|
|
"bearer": null
|
|
},
|
|
{
|
|
"code": "request-error",
|
|
"url": "https://domain.ltd:port/path/request-error",
|
|
"strictSSL": true,
|
|
"contentType": "application/json",
|
|
"authMethod": null,
|
|
"user": null,
|
|
"password": null,
|
|
"bearer": null
|
|
},
|
|
{
|
|
"code": "timeout-error",
|
|
"url": "https://domain.ltd:port/path/timeout-error",
|
|
"timeout": 500,
|
|
"strictSSL": true,
|
|
"contentType": "application/json",
|
|
"authMethod": null,
|
|
"user": null,
|
|
"password": null,
|
|
"bearer": null
|
|
}
|
|
]
|
|
}
|