Hi guys

It is not really clear to me the
 difference between local checks and mrpe. Reading the official 
documentation, in my understanding they do just the same thing (run custom 
script) in a differenct way.
On the https://mathias-kettner.de/checkmk_localchecks.html there is nice and 
simple script:

------------------
#!/bin/bash
DIRS="/var/log /tmp"

for dir in $DIRS
do
    count=$(ls $dir | wc --lines)
    if [ $count -lt 50 ] ; then
        status=0
        statustxt=OK
    elif [ $count -lt 100 ] ; then
        status=1
        statustxt=WARNING
    else
        status=2
        statustxt=CRITICAL
    fi
    echo "$status Filecount_$dir count=$count;50;100;0; $statustxt - $count 
files in $dir"
done
------------------


I placed this script in /usr/lib/check_mk_agent/local/testscript, did and 
inventory (cmk -I) and I got the new service applied to my host.

The point is that I could have done the same thing using mpre with something 
like this:

/etc/check_mk/mrpe.cfgtestscript      /usr/lib/nagios/plugins/testscript.sh
This is just a simple bash script that respect the nagios return codes 
(0,1,2,3) but the same concept would apply to any official nagios plugins
So...the question is:
apart the fact that they use a different mechanism, is there any good reason or 
case for which I should use one of them?

thanks
Marco Reale
Italy
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Reply via email to