Skip to content

Commit

Permalink
in nagios, service name is case senative, and %HOSTNAME% expandation …
Browse files Browse the repository at this point in the history
…is upper case.
  • Loading branch information
care2DavidDPD authored and brd committed Jun 28, 2022
1 parent dc65fdc commit 9b528df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion libpassiveagent/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def check_command(cmd):

def read_config(c):
config = configparser.ConfigParser()
config.optionxform = lambda option: option
parsed = {}
success = False
for root, dirs, files in os.walk(c['config_dir']):
Expand Down Expand Up @@ -64,7 +65,7 @@ def read_config(c):
c['passive checks'][k] = {}
s = k.split('|')
# hostname
if s[0] != '%hostname%':
if s[0] != '%HOSTNAME%':
c['passive checks'][k]['hostname'] = s[0]
else:
if 'hostname' in c['nrdp']:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = passiveagent
version = 0.2.1
version = 0.2.2

[options]
packages = libpassiveagent
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='passiveagent',
version='0.2.1',
version='0.2.2',
install_requires=['requests'],
packages=['libpassiveagent'],
scripts=['passiveagent.py']
Expand Down

0 comments on commit 9b528df

Please sign in to comment.