Script Execution Issues
henryudha opened this issue · 3 comments
hi @andrefreitas ,
thanks for your script anyway.
kindly need your suggestion.
im quite struggling with your script.
i try by execute :
python matternag.py --url http://chat.abc.io/abc/channels/trial- --hostalias server1 --notificationtype Problem --serviceoutput "Service Apache Down!"
the last line output are :
`
<script>
window.setup_login_page({"TeamDisplayName":"abc","TeamName":"abc","Title":"abc-group Chat Line - Login"});
</script>
since our mattermost server are working well, is there anything else i need to do ?
do i need to put my username and password inside the script ?
looking forward for your information.
many thanks
cheers,
henry
Hi @henryudha,
You only need to give the URL generated by Mattermost when adding an Incoming Webhook (it's an URL with a token).
Let's run a checklist (they work great). Please answer y/n for the following points:
-
Did you create an Incoming Webhook following the instructions at http://docs.mattermost.com/developer/webhooks-incoming.html#enabling-incoming-webhooks ?
-
Did you tested the generated URL with a token with the following command?
./mattermost.py --url [URL] --hostalias "$HOSTNAME$" --notificationtype "$NOTIFICATIONTYPE$" --servicedesc "$SERVICEDESC$" --servicestate "$SERVICESTATE$" --serviceoutput "$SERVICEOUTPUT$"
thanks for your reply,
- No. i just create the webhook url.
- then retry to execute with the webhook url, and its work.
you just awesome mate!
once again thanks for your help and reply
cheers,
henry
@henryudha you are welcome, glad to see I could help :)