Skip to content

Commit

Permalink
Filter service by the exact name (#576)
Browse files Browse the repository at this point in the history
Fixes service selection when one service name includes the other, for example Disks and DisksIO
  • Loading branch information
julianjm authored and maethor committed Jul 30, 2017
1 parent 4ac2a63 commit eb0412c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/datamanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def get_service(self, hname, sname, user):

return None

services = self.search_hosts_and_services('type:service host:^%s$ service:"%s"' % (hname, sname), user=user)
services = self.search_hosts_and_services('type:service host:^%s$ service:"^%s$"' % (hname, sname), user=user)
return services[0] if services else None

def get_percentage_service_state(self, user=None, problem=False):
Expand Down

0 comments on commit eb0412c

Please sign in to comment.