Skip to content

Commit

Permalink
oncall for CMK 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gurubert committed Jul 22, 2024
1 parent c8ee2a2 commit 0412c6c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions oncall/bin/oncall.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def get_csv_from_server():
parser.add_argument('-d', '--debug', action='store_true', default=False, required=False)
args = parser.parse_args()

api_url = _check_mk_url(_site_url()) + 'api/v0'
api_url = _check_mk_url(_site_url()) + 'api/1.0'
if not args.secret:
args.username, args.secret = _site_creds(args.username)

Expand Down Expand Up @@ -263,7 +263,7 @@ def gen_id():
site = changes_file.split('/')[-1][20:-3]
if site != os.environ.get('OMD_SITE'):
try:
cmk.utils.store.aquire_lock(changes_file)
cmk.utils.store.acquire_lock(changes_file)
with open(changes_file, 'a+') as f:
f.write(repr(change_spec)+'\0')
f.flush()
Expand All @@ -290,6 +290,7 @@ def gen_id():
json=postdata,
headers={
"Content-Type": 'application/json',
"If-Match": '*',
},
allow_redirects=False,
)
Expand Down
Binary file removed oncall/oncall-3.0.3.mkp
Binary file not shown.
Binary file added oncall/oncall-4.0.1.mkp
Binary file not shown.

0 comments on commit 0412c6c

Please sign in to comment.