Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Commit

Permalink
#6 fix Silenced checks do not show as acknowledged with sensu > 0.26
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-leonhardt committed Nov 3, 2016
1 parent ba7069a commit c54641e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ config.vm.provision "shell", inline: <<-SHELL
sudo yum -y install epel-release vim-enhanced
sudo su -c cat >/etc/yum.repos.d/sensu.repo<<EOF
[sensu]
name=sensu-main
baseurl=http://repos.sensuapp.org/yum/el/6/x86_64/
name=sensu
baseurl=http://sensu.global.ssl.fastly.net/yum/\\$basearch/
gpgcheck=0
enabled=1
EOF
Expand Down
5 changes: 2 additions & 3 deletions gridcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ def check_connection(dc):

def check_stash(stashes, hostname, checkname):
for s in stashes:
if re.match('^silence/' + hostname + '/' + checkname + '$', s['path']):
if re.match('^client:' + hostname + ':' + checkname + '$', s['id']):
return True
if re.match('^silence/' + hostname + '$', s['path']):
if re.match('^client:' + hostname + ':\*', s['id']):
return True
return False

3 changes: 1 addition & 2 deletions griddata.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ def get_clients(dc):


def get_stashes(dc):
url = 'http://{0}:{1}/stashes'.format(dc['url'], dc['port'])
url = 'http://{0}:{1}/silenced'.format(dc['url'], dc['port'])
data = None
r = None

try:
if 'user' and 'password' in dc:
r = requests.get(url, auth=(dc['user'], dc['password']))
Expand Down

0 comments on commit c54641e

Please sign in to comment.