First batch of moitoring scripts #2
|
@ -3,13 +3,13 @@
|
|||
source /var/local/container-scripts/zabbix-scripts.cfg
|
||||
|
||||
#all polls
|
||||
POLLS_ALL=$(mysql -h "${POLLDB_HOST}" -u "${POLLDB_USER}" -p"${POLLDB_PASSWD}" "${POLLDB_NAME}" -s -r -N -e "SELECT COUNT(*) from ${POLLDB_PREFIX}_poll;")
|
||||
POLLS_ALL=$(mysql -h "${POLLDB_HOST}" -u "${POLLDB_USER}" -p"${POLLDB_PASSWD}" "${POLLDB_NAME}" -s -r -N -e "SELECT COUNT(*) from ${POLLDB_PREFIX}poll;")
|
||||
|
||||
#poll type event
|
||||
POLLS_EVENTS=$(mysql -h "${POLLDB_HOST}" -u "${POLLDB_USER}" -p"${POLLDB_PASSWD}" "${POLLDB_NAME}" -s -r -N -e "SELECT COUNT(*) from ${POLLDB_PREFIX}_poll where format = 'D';")
|
||||
POLLS_EVENTS=$(mysql -h "${POLLDB_HOST}" -u "${POLLDB_USER}" -p"${POLLDB_PASSWD}" "${POLLDB_NAME}" -s -r -N -e "SELECT COUNT(*) from ${POLLDB_PREFIX}poll where format = 'D';")
|
||||
|
||||
#poll type standard
|
||||
POLLS_STANDARD=$(mysql -h "${POLLDB_HOST}" -u "${POLLDB_USER}" -p"${POLLDB_PASSWD}" "${POLLDB_NAME}" -s -r -N -e "SELECT COUNT(*) from ${POLLDB_PREFIX}_poll where format = 'A';")
|
||||
POLLS_STANDARD=$(mysql -h "${POLLDB_HOST}" -u "${POLLDB_USER}" -p"${POLLDB_PASSWD}" "${POLLDB_NAME}" -s -r -N -e "SELECT COUNT(*) from ${POLLDB_PREFIX}poll where format = 'A';")
|
||||
|
||||
#save onto a file
|
||||
echo "polls_all ${POLLS_ALL}" > /tmp/framadate_stats
|
||||
|
|
Loading…
Reference in New Issue