Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icinga-checks
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
icinga-checks
Commits
27d79737
Commit
27d79737
authored
2 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Plain Diff
Merge branch '6010-check-pqsql' into 'master'
psql: add output See merge request
!111
parents
e6ffb8d3
74250085
No related branches found
No related tags found
1 merge request
!111
psql: add output
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_psqlserver
+9
-3
9 additions, 3 deletions
check_psqlserver
with
9 additions
and
3 deletions
check_psqlserver
+
9
−
3
View file @
27d79737
...
...
@@ -247,7 +247,7 @@ case "${sMode}" in
"conflicts"
)
deltaunit
=
min
descr
=
"
Detected conflicts
(from pg_stat_database_conflicts)"
descr
=
"(from pg_stat_database_conflicts)"
renderCounters
"select
\
sum(confl_tablespace) as confl_tablespace,
\
sum(confl_lock) as confl_lock,
\
...
...
@@ -259,7 +259,10 @@ case "${sMode}" in
# sum of 7th column (with delta per sec)
typeset
-i
iTotal
;
iTotal
=
$(
echo
"
$out
"
|
awk
'{ sum+=$7} END { print sum;}'
)
if
[
$iTotal
-gt
0
]
;
then
ph.setStatus
"critical"
ph.setStatus
"critical"
descr+
=
" ...
$iTotal
conflicts detected"
else
descr+
=
" ... OK, nothing was found"
fi
descr+
=
" - currently
$iTotal
per
${
deltaunit
}
"
;;
...
...
@@ -297,7 +300,10 @@ case "${sMode}" in
# sum of 7th column (with delta per sec)
typeset
-i
iTotal
;
iTotal
=
$(
echo
"
$out
"
|
awk
'{ sum+=$7} END { print sum;}'
)
if
[
$iTotal
-gt
0
]
;
then
ph.setStatus
"critical"
ph.setStatus
"critical"
descr+
=
"...
$iTotal
Problems and troublemakers were found"
else
descr+
=
" ... OK, nothing was found"
fi
descr+
=
" - currently
$iTotal
per
${
deltaunit
}
"
;;
...
...
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