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
2e9e6dd6
Commit
2e9e6dd6
authored
3 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
mysql: check if query cache is enabled as a shared function
parent
d5405859
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
check_mysqlserver
+12
-3
12 additions, 3 deletions
check_mysqlserver
with
12 additions
and
3 deletions
check_mysqlserver
+
12
−
3
View file @
2e9e6dd6
...
...
@@ -187,10 +187,19 @@ function _mysqlrenderdelta() {
}
# helper function for caching checks
# The function aborts the check
# The function aborts the check
ending with OK.
function
_verify_cache
(){
_mysqlgetvar
"have_query_cache"
|
grep
"YES"
>
/dev/null
||
ph.abort
"Query cache (have_query_cache) is not active"
_mysqlgetvar
"query_cache_type"
|
grep
"OFF"
>
/dev/null
&&
ph.abort
"Query cache (have_query_cache) is active but query_cache_type is OFF"
local
bCacheEnabled
=
_mysqlgetvar
"have_query_cache"
|
grep
"YES"
>
/dev/null
if
[
$?
-ne
0
]
;
then
_mysqlgetvar
"query_cache_type"
|
grep
"OFF"
>
/dev/null
if
[
$?
-eq
0
]
;
then
echo
"INFO: Query cache (have_query_cache) is active but query_cache_type is OFF."
else
echo
"INFO: Query cache (have_query_cache) is not active."
fi
ph.exit
fi
}
# ----------------------------------------------------------------------
# MAIN
...
...
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