Adding more checks for the fedmsg socket

This commit is contained in:
Andrew Heath 2023-08-16 14:08:16 -04:00
parent 8007bd241b
commit 96d9ed3d6b
2 changed files with 6 additions and 2 deletions

View file

@ -11,7 +11,9 @@ try:
check_consumer = sys.argv[2]
backlog_warning = int(sys.argv[3])
backlog_critical = int(sys.argv[4])
if os.path.exists('/var/run/fedmsg/monitoring-%s-.socket' % service):
if os.path.exists('/var/run/fedmsg/monitoring-%s.socket' % service):
fname = '/var/run/fedmsg/monitoring-%s.socket' % service
elif os.path.exists('/var/run/fedmsg/monitoring-%s-.socket' % service):
fname = '/var/run/fedmsg/monitoring-%s-.socket' % service
elif os.path.exists('/var/run/fedmsg/monitoring-%s-3.socket' % service):
fname = '/var/run/fedmsg/monitoring-%s-3.socket' % service

View file

@ -11,7 +11,9 @@ try:
check_consumer = sys.argv[2]
exceptions_warning = int(sys.argv[3])
exceptions_critical = int(sys.argv[4])
if os.path.exists('/var/run/fedmsg/monitoring-%s-.socket' % service):
if os.path.exists('/var/run/fedmsg/monitoring-%s.socket' % service):
fname = '/var/run/fedmsg/monitoring-%s.socket' % service
elif os.path.exists('/var/run/fedmsg/monitoring-%s-.socket' % service):
fname = '/var/run/fedmsg/monitoring-%s-.socket' % service
elif os.path.exists('/var/run/fedmsg/monitoring-%s-3.socket' % service):
fname = '/var/run/fedmsg/monitoring-%s-3.socket' % service