Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CSD
public
zabbix-templates
Commits
2bd075d7
Commit
2bd075d7
authored
Apr 04, 2018
by
Fulvio Galeazzi
Browse files
2018-04-04: FG; Updated cephHealth, now relying on Perl script.
parent
d0bfe224
Changes
2
Hide whitespace changes
Inline
Side-by-side
Ceph/Config/userparameter_ceph.conf
View file @
2bd075d7
UserParameter
=
ceph
.
health
,/
etc
/
zabbix
/
scripts
/
ceph
_h
ealth
.
sh
UserParameter
=
ceph
.
health
[*]
,/
etc
/
zabbix
/
scripts
/
ceph
H
ealth
.
pl
$
1
--
status
-
s
"clock skew"
# Global
UserParameter
=
ceph
.
global
.
objs
[*],/
etc
/
zabbix
/
scripts
/
cephUsage
.
pl
$
1
-
o
UserParameter
=
ceph
.
global
.
objsdeg
[*],/
etc
/
zabbix
/
scripts
/
cephHealth
.
pl
$
1
--
od
...
...
Ceph/Script/cephHealth.pl
View file @
2bd075d7
...
...
@@ -238,9 +238,18 @@ foreach my $_line (@_data)
if
(
exists
$statusHash
{
$fields
[
0
]})
{
$status
=
$statusHash
{
$fields
[
0
]};
if
(
$status
==
1
)
{
# if (@matchStr) {
#
# }
my
$matchedStr
=
1
;
if
(
@matchStr
)
{
my
@statusMsgs
=
split
(
/;/
,
$_line
);
foreach
my
$aMsg
(
@statusMsgs
)
{
my
$thisMatches
=
0
;
foreach
my
$aMatch
(
@matchStr
)
{
$thisMatches
=
1
if
(
$aMsg
=~
/$aMatch/
);
}
$matchedStr
=
$matchedStr
*
$thisMatches
;
}
$status
=
0
if
(
$matchedStr
);
}
}
}
else
{
$status
=
2
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment