First batch of moitoring scripts #2

Merged
muppeth merged 7 commits from zabbix-agent into master 2021-12-19 20:31:43 +01:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit 7feb273f60 - Show all commits

View File

@ -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