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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
icinga-checks
Merge requests
!92
update counte labels
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
update counte labels
6010-check-pqsql
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Hahn Axel (hahn)
requested to merge
6010-check-pqsql
into
master
2 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
a5633150
1 commit,
2 years ago
1 file
+
19
−
18
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
check_psqlserver
+
19
−
18
View file @ a5633150
Edit in single-file editor
Open in Web IDE
Show full file
@@ -228,7 +228,7 @@ case "${sMode}" in
typeset
-i
iQOther
;
iQOther
=
$iQTotal
-
$iQActive
-
$iQIdle
-
$iQFastpath
descr
=
"Running total:
$iQTotal
... active:
$iQActive
idle:
$iQIdle
fastpath:
$iQFastpath
other:
$iQOther
"
out
=
$(
grep
"^.[a-z]"
<<<
"
${
_out
}
"
|
cut
-c
1-150
)
out
=
$(
grep
"^.[a-z]"
<<<
"
${
_out
}
"
|
cut
-c
1-150
|
tr
'|'
':'
)
ph.perfadd
"running-total"
"
${
iQTotal
}
"
ph.perfadd
"running-active"
"
${
iQActive
}
"
ph.perfadd
"running-idle"
"
${
iQIdle
}
"
@@ -237,29 +237,29 @@ case "${sMode}" in
;;
"conflicts"
)
descr
=
"Detected conflicts (from pg_stat_database_conflicts)"
renderCounters
"select
\
sum(confl_tablespace) as confltablespace,
\
sum(confl_lock) as confllock,
\
sum(confl_snapshot) as conflsnapshot,
\
sum(confl_bufferpin) as conflbufferpin,
\
sum(confl_deadlock) as confldeadlock
\
renderCounters
"select
\
sum(confl_tablespace) as confl
icts-
tablespace,
\
sum(confl_lock) as confl
icts-
lock,
\
sum(confl_snapshot) as confl
icts-
snapshot,
\
sum(confl_bufferpin) as confl
icts-
bufferpin,
\
sum(confl_deadlock) as confl
icts-
deadlock
\
from pg_stat_database_conflicts "
;;
"dbrows"
)
descr
=
"Count of database row actions (from pg_stat_database)"
renderCounters
"select
\
sum(tup_returned) as return,
\
sum(tup_fetched) as fetch,
\
sum(tup_inserted) as insert,
\
sum(tup_updated) as update
,
\
sum(tup_deleted) as delete
\
renderCounters
"select
\
sum(tup_returned) as
tup-
return
ed
,
\
sum(tup_fetched) as
tup-
fetch
ed
,
\
sum(tup_inserted) as
tup-
insert
ed
,
\
sum(tup_updated) as
tup-
update
d,
\
sum(tup_deleted) as
tup-
delete
d
\
from pg_stat_database "
;;
"diskblock"
)
descr
=
"Count of diskblocks physically read or coming from cache (from pg_stat_database)"
renderCounters
"select
\
sum(blks_read) as read,
\
sum(blks_hit) as
cached
\
renderCounters
"select
\
sum(blks_read) as
blks-
read,
\
sum(blks_hit) as
blks-hit
\
from pg_stat_database "
;;
"problems"
)
@@ -268,8 +268,8 @@ case "${sMode}" in
sum(conflicts) as conflicts,
\
sum(deadlocks) as deadlocks,
\
sum(checksum_failures) as checksumfailures,
\
sum(temp_files) as tmpfiles,
\
sum(temp_bytes) as tmpbytes
\
sum(temp_files) as t
e
mp
-
files,
\
sum(temp_bytes) as t
e
mp
-
bytes
\
from pg_stat_database "
;;
"replication"
)
@@ -298,6 +298,7 @@ case "${sMode}" in
esac
ph.status
"Pgsql
$sMode
::
$descr
"
echo
echo
"
$out
"
ph.exit
Loading