reamer / icinga2-mattermost Goto Github PK
View Code? Open in Web Editor NEWThis project forked from ndrive/nagios-mattermost
Icinga2 mattermost plugin
License: MIT License
This project forked from ndrive/nagios-mattermost
Icinga2 mattermost plugin
License: MIT License
Hi,
Trying to test mattermost.py i get two errors:
/usr/share/icinga2/include/plugins-contrib.d/icinga2-mattermost/mattermost.py: line 7: syntax error near unexpected token `newline'
/usr/share/icinga2/include/plugins-contrib.d/icinga2-mattermost/mattermost.py: line 7: `<!DOCTYPE html>'
Could you offer some advise please?
Thank you.
where the commands should be setup is not really understandable from the redme file.
i try to follow the steps - but its absolutely not self explaing - perhaps I can fix this after i was able to get it to work, but possibly this won't happen. So if you have something more verbose laying around that could be helpfull.
For example you say "create notification command" - in the icinga2 documentation is written that long commands should be put into shell scripts - but possibly your snippet doesn't seem to be shell code anyway - so what to do? post all of that into the one liner through the director?
after being able to drop the test message to mattermost - the normally triggered messages fail to get pushed cause of wrong script location?
terminated with exit code 128, output: execvpe(/usr/
lib/nagios/plugins/icinga2-mattermost/mattermost.py) failed: No such file or directory
after copying the script to the desired location too - it still fails with a different error message
warning/PluginNotificationTask: Notification command for object <sniped stuff away> terminated with exit code 1, output: Traceback (most recent call last):
File "/usr/lib/nagios/plugins/icinga2-mattermost/mattermost.py", line 100, in <module>
response = request(args.url, data)
File "/usr/lib/nagios/plugins/icinga2-mattermost/mattermost.py", line 94, in request
response = urllib2.urlopen(req)
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found
Hello I did everyting exactly like explained. Even the test check command works. But when one Host is down I get no notification in Mattermost. When I check icinga the notification are enabled.
the only thing i can find is when i check on the web interface. It says no notification send. Is there anything else what i have to enable?
A space is missing between the emoji code and the host/service template, eg. :fire:PROBLEM...
To be displayed correctly it should be :fire: PROBLEM
perhaps someone can clarify how to setup the number of notification re-posts.
It kind of a bit too much spam if the messages get repeatedly posted for the same issue.
I think this need to be setup in the icinga side - or is there an easier way to achive this?
Don't know if this was true before but with Mattermost Version: 5.6.2 you'll want to not use --channel or --username here as this would give you an HTTP 404
Tried a few times until I didn't use either variable and it did work. Could anyone confirm this?
Original Comments: https://exchange.icinga.com/Reamer/icinga2-mattermost/comments
History:
DavideM78 2019-01-06 12:20:54
Hi! I followed your HOWTO step by step but I can't get any notification on my Mattermost channel. Could you please provide me some help? Tanks in advance, Davide
Reamer 2019-01-06 14:53:22
Hi, have you checked out the project page on GitHub (https://github.com/Reamer/icinga2-mattermost)?
DavideM78 2019-01-07 16:04:20
Hi, and thank you for your reply . Yes I checked this project out and followed your guide step by step, but I can't get any notification on my Mattermost channel. If you need some details or config files, please don't hesitate to ask me. Best, Davide
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.