You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We noticed a problem with semicolons as well, but I cannot confirm it happens only when they're at the end of a line. I solved it with this trivial patch.
[2017-11-13 06:31:33 +0100] warning/PluginNotificationTask: Notification command for object 'blahblahhostname!disk /mnt/backup' (PID: 24573, arguments: '/usr/lib/nagios/plugins/mattermost.py' '--channel' 'monit' '--hostalias' 'blahblahhostname' '--notificationtype' 'PROBLEM' '--servicedesc' 'disk /mnt/backup' '--serviceoutput' 'DISK CRITICAL - free space: /mnt/backup 41212 MB (3% inode=-)];' '--servicestate' 'CRITICAL' '--url' '(valid webhook)') terminated with exit code 1, output: Traceback (most recent call last):
File "/usr/lib/nagios/plugins/mattermost.py", line 107, in
response = request(args.url, payload(args))
File "/usr/lib/nagios/plugins/mattermost.py", line 101, 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 437, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 475, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 400: Bad Request
works after removing semicolon of output.
standard plugin output below:
The text was updated successfully, but these errors were encountered: