Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
:
icinga
:
production
>
nagios-plugins-check_monit
> check_monit.sh
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File check_monit.sh of Package nagios-plugins-check_monit
#!/bin/bash # # define some defaults MONITCONFFILES="/etc/monitrc /etc/monit.conf /etc/monit.d/*" # include possible confie file (to override MONITCONFFILES) [ -f /etc/nagios/check_monit.conf ] && . /etc/nagios/check_monit.conf CRED=`grep -E '(^ +?allow.*:)' ${MONITCONFFILES} 2>/dev/null | awk '{print $NF}'` if [ -n "${CRED}" ] ; then LOGIN=`echo ${CRED} | awk -F: '{print $1}'` PASS=`echo ${CRED} | awk -F: '{print $2}'` PARAMS="-u ${LOGIN} -P ${PASS}" else PARAMS="" fi /usr/lib/nagios/plugins/check_monit.py -H localhost ${PARAMS} exit $?