Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FoD
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Schmitz
FoD
Commits
61bef0e8
Commit
61bef0e8
authored
3 years ago
by
David Schmitz
Browse files
Options
Downloads
Patches
Plain Diff
add sensu wrapper function in systemd/fod-status.sh
parent
7077a1c4
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
systemd/fod-status.sh
+21
-8
21 additions, 8 deletions
systemd/fod-status.sh
with
21 additions
and
8 deletions
systemd/fod-status.sh
+
21
−
8
View file @
61bef0e8
...
@@ -66,7 +66,21 @@ print("access to NETCONF seems to be working");
...
@@ -66,7 +66,21 @@ print("access to NETCONF seems to be working");
'
"
$@
"
< /dev/null
'
"
$@
"
< /dev/null
;;
;;
*
|
-s
|
status
)
--sensu-status
)
"
$0
"
--status
statusx
=
"
$?
"
echo
"status=
$statusx
"
if
[
"
$statusx
"
=
0
]
;
then
echo
"all basic checks passed: OK"
exit
0
else
echo
"something went wrong during basic checks: ERROR"
exit
2
fi
;;
-S
|
status-detailed
)
#set -e
#set -e
"
$0
"
--process-status
"
$0
"
--process-status
...
@@ -74,7 +88,7 @@ print("access to NETCONF seems to be working");
...
@@ -74,7 +88,7 @@ print("access to NETCONF seems to be working");
echo
"process status=
$pstatus
"
echo
"process status=
$pstatus
"
echo
echo
"
$0
"
--database-access-status
"
$0
"
--database-access-status
--with-passwords
dstatus
=
"
$?
"
dstatus
=
"
$?
"
echo
"database access status=
$dstatus
"
echo
"database access status=
$dstatus
"
echo
echo
...
@@ -84,7 +98,7 @@ print("access to NETCONF seems to be working");
...
@@ -84,7 +98,7 @@ print("access to NETCONF seems to be working");
echo
"gunicorn http status=
$hstatus
"
echo
"gunicorn http status=
$hstatus
"
echo
echo
"
$0
"
--netconf-access-status
"
$0
"
--netconf-access-status
--with-passwords
nstatus
=
"
$?
"
nstatus
=
"
$?
"
echo
"NETCONF access status=
$nstatus
"
echo
"NETCONF access status=
$nstatus
"
echo
echo
...
@@ -93,10 +107,9 @@ print("access to NETCONF seems to be working");
...
@@ -93,10 +107,9 @@ print("access to NETCONF seems to be working");
echo
"all_status=
$all_status
"
echo
"all_status=
$all_status
"
exit
"
$all_status
"
exit
"
$all_status
"
;;
;;
*
|
-s
|
--status
)
-S
|
status-detailed
)
#set -e
#set -e
"
$0
"
--process-status
"
$0
"
--process-status
...
@@ -104,7 +117,7 @@ print("access to NETCONF seems to be working");
...
@@ -104,7 +117,7 @@ print("access to NETCONF seems to be working");
echo
"process status=
$pstatus
"
echo
"process status=
$pstatus
"
echo
echo
"
$0
"
--database-access-status
--with-passwords
"
$0
"
--database-access-status
dstatus
=
"
$?
"
dstatus
=
"
$?
"
echo
"database access status=
$dstatus
"
echo
"database access status=
$dstatus
"
echo
echo
...
@@ -114,7 +127,7 @@ print("access to NETCONF seems to be working");
...
@@ -114,7 +127,7 @@ print("access to NETCONF seems to be working");
echo
"gunicorn http status=
$hstatus
"
echo
"gunicorn http status=
$hstatus
"
echo
echo
"
$0
"
--netconf-access-status
--with-passwords
"
$0
"
--netconf-access-status
nstatus
=
"
$?
"
nstatus
=
"
$?
"
echo
"NETCONF access status=
$nstatus
"
echo
"NETCONF access status=
$nstatus
"
echo
echo
...
...
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