Handlers
2 minute read
Handlers are performing an action based on the input parameters.
Different type of handlers supported by MyController.
Handler is a plugin component.
Type of Handlers
Note
Some of the configurations in the handler can be overrides by the input parameters.Noop Handler
Noop is a No Operation handler. It does nothing.
The idea behind Noop
handler is, in the future plan to introduce hidden handlers externally.
Right now, there is no use.
Resource Handler
Resource handler sends payload to the nodes, performs an actions on resource, operation, etc.,
Email Handler
Sends email to the recipients. Supports smtp server.
Form View
YAML View
type: email # (1)
spec:
host: smtp.example.com # (2)
port: 465 # (3)
insecureSkipVerify: true # (4)
username: username@example.com # (5)
password: mypassword # (6)
fromEmail: from@example.com # (7)
toEmails: to1@example.com,to2@example.com # (8)
type
should be selected asemail
host
- email server hostport
- email server portinsecureSkipVerify
- enables/disables insecureusername
of the accountpassword
of the accountfromEmail
from email addresstoEmails
to emails list comma separated
Telegram Handler
Sends telegram message to persons and/or groups.
Follow this guide to get the telegram token, chat_id and group_id
Form View
YAML View
type: telegram # (1)
spec:
token: 500000000:AAHKsdsdckwendlwwqNKJBmbjknm9jA # (2)
chatIds: # (3)
- '200000000'
- '300000000'
type
should be selected astelegram
token
of the telegram accountchatIds
- list of chat ids or group ids
Backup Handler
Backup handler performs backup operation and keeps the backup archives at the specified target location
Important
Backup covers only the storage database and firmware’s.Metrics data will not be backed up.
User has to handle metrics database backup/restore themselves.
Form View
YAML View
type: backup # (1)
spec:
providerType: disk # (2)
spec:
storageExportType: yaml # (3)
targetDirectory: /mc_home/backups/ # (4)
prefix: primary # (5)
retentionCount: 10 # (6)
type
should be selected asbackup
providerType
should be selected asdisk
. Only this provider supported nowstorageExportType
- storage database data will be exported in this format. options:yaml
,json
targetDirectory
- location to keep the backup archivesprefix
of the backup fileretentionCount
- If the number of backup archives goes beyond this count,older files will be deleted permanently.
Last modified May 12, 2021: add view header (9cb2477)