mattermost¶
Return Salt data via Mattermost
Important
Using this module requires the general setup.
Usage¶
To use the mattermost returner, append --return mattermost to the Salt command.
salt '*' test.ping --return mattermost
To override individual configuration items, append --return_kwargs '{'key:': 'value'}' to the Salt command.
salt '*' test.ping --return mattermost --return_kwargs '{'channel': '#random'}'
- saltext.mattermost.returners.mattermost_returner.returner(ret)[source]¶
- Send an mattermost message with the data 
- saltext.mattermost.returners.mattermost_returner.event_return(events)[source]¶
- Send the events to a mattermost room. - Parameters:
- events – List of events 
- Returns:
- Boolean if messages were sent successfully. 
 
- saltext.mattermost.returners.mattermost_returner.post_message(channel, message, username, api_url, hook)[source]¶
- Send a message to a mattermost room. - Parameters:
- channel – The room name. 
- message – The message to send to the mattermost room. 
- username – Specify who the message is from. 
- hook – The mattermost hook, if not specified in the configuration. 
 
- Returns:
- Boolean if message was sent successfully.