-
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pmcheck plugins: overhead PMDA and pcp-zeroconf package
These two are not available for non-Linux systems, so for systems like FreeBSD install an alternate plugin that can inform the use why these components cannot be controlled with pmcheck. This is a proof of concept, the same approach can be applied to other "components" that are not unniversally available.
- Loading branch information
Showing
4 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
# | ||
# ohead PMDA "plugin" for pmcheck ... | ||
# this version is for distros/platforms/builds where the PMDA is not | ||
# available (currently anything other than Linux) | ||
# | ||
|
||
. $PCP_DIR/etc/pcp.env || exit 1 | ||
. $PCP_SHARE_DIR/lib/checkproc.sh | ||
|
||
_do_args "$@" | ||
|
||
na="not currently available for `uname -s`" | ||
|
||
if $lflag | ||
then | ||
[ "$verbose" -gt 0 ] && echo "PCP overhead PMDA - $na" ] | ||
elif $sflag | ||
then | ||
status=2 | ||
[ "$verbose" -gt 0 ] && echo "overhead PMDA $na" | ||
elif $aflag || $dflag | ||
then | ||
status=1 | ||
[ "$verbose" -gt 0 ] && echo "overhead PMDA $na" | ||
else | ||
[ $verbose -gt 0 ] && echo "botch sflag=$sflag aflag=$aflag dflag=$dflag show_me=$show_me verbose=$verbose" | ||
status=99 | ||
fi | ||
|
||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
# | ||
# zeroconf "plugin" for pmcheck ... | ||
# this version is for distros/platforms/builds where the pcp-zeroconf | ||
# package is not available (currently anything other than Linux) | ||
# | ||
|
||
. $PCP_DIR/etc/pcp.env || exit 1 | ||
. $PCP_SHARE_DIR/lib/checkproc.sh | ||
|
||
_do_args "$@" | ||
|
||
na="not currently available for `uname -s`" | ||
|
||
if $lflag | ||
then | ||
[ "$verbose" -gt 0 ] && echo "PCP Zeroconf Package - $na" | ||
elif $sflag | ||
then | ||
status=2 | ||
[ "$verbose" -gt 0 ] && echo "pcp-zeroconf package $na" | ||
elif $aflag || $dflag | ||
then | ||
status=1 | ||
[ "$verbose" -gt 0 ] && echo "pcp-zeroconf package $na" | ||
else | ||
[ $verbose -gt 0 ] && echo "botch sflag=$sflag aflag=$aflag dflag=$dflag show_me=$show_me verbose=$verbose" | ||
status=99 | ||
fi | ||
|
||
exit |