Skip to content
This repository was archived by the owner on Jan 22, 2024. It is now read-only.
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

Modifications for pnp4nagios #7

@lini-linux

Description

@lini-linux

--- check_glusterfs 2014-10-11 23:33:14.000000000 +0200
+++ check_glusterfs.new 2015-04-20 10:37:23.961066897 +0200
@@ -85,7 +85,7 @@

get volume heal status

heal=0
-for entries in $(sudo gluster volume heal ${VOLUME} info | awk '/^Number of entries: /{print $4}'); do
+for entries in $(sudo gluster volume heal ${VOLUME} info heal-failed | awk '/^Number of entries: /{print $4}'); do
if [ "$entries" -gt 0 ]; then
let $((heal+=entries))
fi
@@ -97,6 +97,7 @@

get volume status

bricksfound=0
freegb=9999999
+ex_stat=UNKNOWN
shopt -s nullglob
while read -r line; do
field=($(echo $line))
@@ -146,10 +147,10 @@
if [ $CRIT -ge $WARN ]; then
Exit UNKNOWN "critical threshold below warning"
elif [ $freegb -lt $CRIT ]; then

  •   errors=("${errors[@]}" "free space ${freegb}GB")
    
  •   errors=("${errors[@]}" "free_space_gb=${freegb} | free_space_gb=${freegb};;;;")
        ex_stat="CRITICAL_stat"
    

    elif [ $freegb -lt $WARN ]; then

  •   errors=("${errors[@]}" "free space ${freegb}GB")
    
  •   errors=("${errors[@]}" "free_space_gb=${freegb} | free_space_gb=${freegb};;;;")
    ex_stat="WARNING_stat"
    

    fi
    fi
    @@ -167,4 +168,4 @@
    fi

    exit with no errors

    -Exit OK "${bricksfound} bricks; free space ${freegb}GB"
    +Exit OK " bricks=${bricksfound} free_space_gb=${freegb} | bricks=${bricksfound};;;; free_space_gb=${freegb};;;;"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions