Personal tools
You are here: Home Monitoring Simple One-Liners
Document Actions

Simple One-Liners

by Brian Bockelman last modified 2006-05-23 10:44

In this document, we share a couple of "one liners"; cron entries which send useful data which we monitor to MonaLisa. They are site specific, so you might have to debug them on your own.

Here are the MonaLisa related crontab entries on thpc-1.unl.edu:
10,30,50 * * * * export MYPROXY_SERVER=thpc-1.unl.edu; export MYPROXY_SERVER_DN=/DC=org/DC=doegrids/OU=Services/CN=thpc-1.unl.edu; source /opt/osg/setup.sh; /home/brian/monitoring/mlmetric.py --dest red.unl.edu:58884 -cluster "Auxiliary Services" -node thpc-1.unl.edu -param "Proxy hours left" -value `myproxy-info -l phedex | grep timeleft | tr ':' ' ' | awk '{print $2;}'`
0-59/2 * * * * /home/brian/monitoring/mlmetric.py --dest red.unl.edu:58884 -cluster dCache -node Movers -param Active -value `links -dump http://thpc-1.unl.edu:2288/queueInfo | grep Total | awk '{print $4;}' | tail -n 1`
0-59/3 * * * * /home/brian/monitoring/mlmetric.py --dest red.unl.edu:58884 -cluster dCache -node Movers -param Queued -value `links -dump http://thpc-1.unl.edu:2288/queueInfo | grep Total | awk '{print $8;}' | tail -n 1`
0-59/5 * * * * /home/brian/monitoring/dcache_usage.py --dest red.unl.edu:58884 --dcache thpc-1.unl.edu:2288
The first checks to see how long my myproxy certificate has before it expires.  The second two send Active and Queued mover information from dCache.  The third is a script (documented elsewhere) which sends dCache disk free/used/total information to ML.

Here are some other entries from phedex.unl.edu:
1-59/5 * * * * source /opt/osg/osg-030/setup.sh; /home/phedex/mlmetric.py -dest red.unl.edu:58884 -cluster "Auxiliary Services" -node phedex.unl.edu -param "Phedex proxy" -value `grid-proxy-info -f /etc/grid-security/proxy.cert > /dev/null; echo $?`
1-59/5 * * * * source /opt/osg/osg-030/setup.sh; /home/phedex/mlmetric.py -dest red.unl.edu:58884 -cluster "Auxiliary Services" -node phedex.unl.edu -param "GUMS authentication" -value `globusrun -a -r red.unl.edu > /dev/null; echo $?`
1-59/5 * * * * source /opt/osg/osg-030/setup.sh; /home/phedex/mlmetric.py -dest red.unl.edu:58884 -cluster "dCache" -node "Storage Info" -param "Available Space" -value `srm-storage-element-info -debug=false https://thpc-1.unl.edu:8443/srm/infoProvider1_0.wsdl 2>&1 | grep availableSpace | tr '(' ' ' | awk '{print $3;}'`
1-59/5 * * * * source /opt/osg/osg-030/setup.sh; /home/phedex/mlmetric.py -dest red.unl.edu:58884 -cluster "dCache" -node "Storage Info" -param "Total Space" -value `srm-storage-element-info -debug=false https://thpc-1.unl.edu:8443/srm/infoProvider1_0.wsdl 2>&1 | grep total | tr '(' ' ' | awk '{print $3;}'`
1-59/5 * * * * source /opt/osg/osg-030/setup.sh; /home/phedex/mlmetric.py -dest red.unl.edu:58884 -cluster "dCache" -node "Storage Info" -param "Used Space" -value `srm-storage-element-info -debug=false https://thpc-1.unl.edu:8443/srm/infoProvider1_0.wsdl 2>&1 | grep used | tr '(' ' ' | awk '{print $3;}'`
The first two check the proxy lifetime and GUMS authentication, respectively.  The last three, documented elsewhere, send dCache totals to MonaLisa.


Powered by Plone, the Open Source Content Management System