-
Notifications
You must be signed in to change notification settings - Fork 6
/
goslmailer.conf.annotated_example
72 lines (72 loc) · 5.35 KB
/
goslmailer.conf.annotated_example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{ # don't forget to remove the '#' comments if using this template
"logfile": "/tmp/goslmailer.log", # if specified; append logs to this file; else; dump to stderr
"debugconfig": true, # if specified and true ; goslmailer and gobler will dump configuration to log; else; they won't
"binpaths": { # paths to slurm binaries (optional, will default to these if not specified)
"sacct":"/usr/bin/sacct",
"sstat":"/usr/bin/sstat"
},
"defaultconnector": "msteams", # default connector to be used for message delivery for receivers without full 'connector:user' specification
"connectors": { # map of connector configurations, remove any connectors that you don't wish to expose to the users
"msteams": { # each connector has it's own map of config attributes
"name": "dev channel", # unused
"renderToFile": "yes", # debug render of message to local file instead of sending ("yes" - render to file, "no" - send, "spool" - spool for gobler)
"spoolDir": "/tmp", # where to spool
"url": "https://msteams/webhook/url", # ms teams webhook url
"adaptiveCardTemplate": "/path/template.json",# full path to adaptive card template file
"useLookup": "GECOS" # which function from lookup package the connector uses to map cmdline userid to end-system userid
}, # available lookups ("GECOS", "none")
"mailto": {
"name": "original slurm mail functionality, extended.",
"mailCmd": "/usr/bin/mutt", # mail client to use
"mailCmdParams": "-s \"Job {{ .SlurmEnvironment.SLURM_JOB_ID }} ({{ .SlurmEnvironment.SLURM_JOB_NAME }}) {{ .SlurmEnvironment.SLURM_JOB_MAIL_TYPE }}\"",
"mailTemplate": "/etc/slurm/mailTemplate.tmpl", # message body template
"mailFormat": "HTML", # `HTML` or `text` (can use telegram html in templates/)
"allowList": ".+@(imp|imba.oeaw|gmi.oeaw).ac.at", # golang re2 expression : https://github.com/google/re2/wiki/Syntax
},
"telegram": {
"name": "telegram bot", # bot uses this in hello message "Welcome to "name""
"url": "", # unused, leave empty, might change in the future
"token": "PasteHereTelegramBotToken", # token obtained when creating the bot with botfather
"renderToFile": "no", # debug render of message to local file instead of sending ("yes" - render to file, "no" - send, "spool" - spool for gobler)
"spoolDir": "/tmp/telegramgobs", # where to spool
"messageTemplate": "/etc/slurm/telegramTemplate.md", # template file
"useLookup": "no", # remove if not using custom lookup functions
"format": "MarkdownV2" # options: "MarkdownV2", "HTML" ,depending on the template used
},
"discord": {
"name": "DiscoSlurmBot", # name that is used in the bot welcome message
"triggerString": "showmeslurm", # string (in channel or DM) that triggers the bot to respond with an instructional DM to the user
"token": "PasteBotTokenHere", # place to put the bot token
"messageTemplate": "/path/to/template.md" # template file to use
},
"mattermost": {
"name": "MatTheSlurmBot", # mandatory, name used in the bot welcome message
"serverUrl": "https://someSpaceName.cloud.mattermost.com", # mandatory, REST url which client uses to send messages
"wsUrl": "wss://someSpaceName.cloud.mattermost.com", # mandatory, websocket event delivery system endpoint
"token": "PasteBotTokenHere", # mandatory, bot access token
"triggerString": "showmeslurm", # string on which bot reacts with the --mail-user message
"messageTemplate" : "/path/to/mattermostTemplate.md" # markdown template (example in ./templates/mattermostTemplate.md)
},
"matrix": {
"username": "@myuser:matrix.org",
"token": "syt_dGRpZG9ib3QXXXXXXXEyQMBEmvOVp_10Jm93",
"homeserver": "matrix.org",
"template": "/path/to/matrix_template.md"
},
"slack": {
"token": "PasteSlackBotTokenHere", # Paste Slack Bot User OAuth Token here
"messageTemplate": "/path/to/template.md", # template file to use
"renderToFile": "spool", # debug render of message to local file instead of sending ("yes" - render to file, "no" - send, "spool" - spool for gobler)
"spoolDir": "/tmp" # where to spool
}
"textfile": { # fictitious "textfile" connector, package code for it doesn't exist, implementation left as the exercise for the reader
"path": "/tmp" # see above.
}
},
"qosmap": { # map of your sites configured QoSes, with their timelimits (seconds), used for hint generation
"RAPID": 3600,
"SHORT": 28800,
"MEDIUM": 172800,
"LONG": 1209600
}
}