Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icinga-passive-client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source
icinga-passive-client
Commits
ebdb49bb
Commit
ebdb49bb
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
director-cli: check http status instead of existcode on object creation
parent
0cc08944
No related branches found
No related tags found
1 merge request
!39
director-cli: check http status instead of existcode on object creation
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
director-cli.sh
+6
-2
6 additions, 2 deletions
director-cli.sh
with
6 additions
and
2 deletions
director-cli.sh
+
6
−
2
View file @
ebdb49bb
...
@@ -503,7 +503,9 @@ hostDefaultgroups="groups[]=iml groups[]=iml-server"
...
@@ -503,7 +503,9 @@ hostDefaultgroups="groups[]=iml groups[]=iml-server"
_action
=
update
_action
=
update
fi
fi
if
ObjAction
$_action
service
;
then
# if ObjAction $_action service; then
ObjAction
$_action
service
if
[
-z
"
$(
http.isOk
)
"
]
;
then
echo
"OK
$_action
service
${
IDC_service__obj_name
}
"
echo
"OK
$_action
service
${
IDC_service__obj_name
}
"
return
0
return
0
else
else
...
@@ -525,7 +527,9 @@ hostDefaultgroups="groups[]=iml groups[]=iml-server"
...
@@ -525,7 +527,9 @@ hostDefaultgroups="groups[]=iml groups[]=iml-server"
# create command if it does not exist
# create command if it does not exist
if
serviceCreateOrUpdate
>
/dev/null
;
then
if
serviceCreateOrUpdate
>
/dev/null
;
then
if
!
ObjAction exists svclink
;
then
if
!
ObjAction exists svclink
;
then
if
ObjAction create svclink
;
then
# if ObjAction create svclink; then
ObjAction create svclink
if
[
-z
"
$(
http.isOk
)
"
]
;
then
echo
"OK: linked service
${
checkName
}
on host [
$MY_NAME
] was created"
echo
"OK: linked service
${
checkName
}
on host [
$MY_NAME
] was created"
else
else
echo
"ERROR :-/ unable to create linked service
${
checkName
}
on host [
$MY_NAME
]"
echo
"ERROR :-/ unable to create linked service
${
checkName
}
on host [
$MY_NAME
]"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment