An engine that reads messages from Hipchat and sends them to the Salt
event bus. Alternatively Salt commands can be sent to the Salt master
via Hipchat by setting the control parameter to True
and using command
prefaced with a !
. Only token key is required, but room and control
keys make the engine interactive.
hypchat
Example configuration
engines:
- hipchat:
api_url: http://api.hipchat.myteam.com
token: 'XXXXXX'
room: 'salt'
control: True
valid_users:
- SomeUser
valid_commands:
- test.ping
- cmd.run
- list_jobs
- list_commands
aliases:
list_jobs:
cmd: jobs.list_jobs
list_commands:
cmd: pillar.get salt:engines:hipchat:valid_commands target=saltmaster
max_rooms: 0
wait_time: 1
salt.engines.hipchat.
start
(token, room='salt', aliases=None, valid_users=None, valid_commands=None, control=False, trigger='!', tag='salt/engines/hipchat/incoming', api_key=None, api_url=None, max_rooms=None, wait_time=None, output_type='file', outputter='nested')¶Listen to Hipchat messages and forward them to Salt.
The HipChat API key. It requires a key for global usgae, assigned per user, rather than room.
The HipChat room name.
Define custom aliases.
Restrict access only to certain users.
Restrict the execution to a limited set of commands.
Send commands to the master.
!
Special character that triggers the execution of salt commands.
salt/engines/hipchat/incoming
The event tag on the Salt bus.
https://api.hipchat.com
The URL to the HipChat API.
New in version 2017.7.0.
1000
Maximum number of rooms allowed to fetch. If set to 0, it is able to retrieve the entire list of rooms.
5
Maximum wait time, in seconds.
file
The type of the output. Choose bewteen:
file
: save the output into a temporary file and upload
html
: send the output as HTML
code
: send the output as code
This can be overridden when executing a command, using the --out-type
argument.
New in version 2017.7.0.
nested
The format to display the data, using the outputters available on the CLI.
This argument can also be overridden when executing a command, using the --out
option.
New in version 2017.7.0.
HipChat Example:
! test.ping
! test.ping target=minion1
! test.ping --out=nested
! test.ping --out-type=code --out=table