commit 724e0fdfc3acea1407350750ccd5b980a08bb857 Author: Eric Renfro Date: Fri Jun 28 12:42:51 2013 -0400 Initial commit diff --git a/runtrap b/runtrap new file mode 100755 index 0000000..2995d2a --- /dev/null +++ b/runtrap @@ -0,0 +1,52 @@ +#!/bin/bash + +lockfile="/tmp/zabbix.trap.lock" +tempfile=$(mktemp /tmp/zabbix.trap.tmp.XXXXXXXXXX) +trapdir="$(dirname $(readlink -f $0))/trap.d" +errors=0 + +if [[ -r "${lockfile}" ]]; then + if [[ $(pgrep -f $(readlink -f $0) | wc -l) -gt 0 ]]; then + runs=$(head -n1 ${lockfile}) + if [[ $runs -ge 3 ]]; then + echo "need to kill prior poll" + for s in ${trapdir}/* + do + echo "Kill: $s " + pkill -9 -f $s + done + rm -f /tmp/zabbix.trap.lock + rm -f /tmp/zabbix.trap.tmp.* + pkill -9 -f $(readlink -f $0) + else + #let "runs++" + echo "$[ ++runs ]" > ${lockfile} + exit 0 + fi + fi +fi + +echo 1 > ${lockfile} +for s in ${trapdir}/* +do + $s > ${tempfile} 2> /dev/null + if [ $? -ne 0 ]; then + errors=1 + fi +done + +cat ${tempfile} +rm -f ${tempfile} +echo +echo "Errors: $errors" +exit 0 + +zsend=$(zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -i ${tempfile}) +if [ $? -ne 0 ]; then + echo "2" +else + echo "${errors}" +fi + +rm -f ${tempfile} + diff --git a/scripts/apache.trap.py b/scripts/apache.trap.py new file mode 100755 index 0000000..6fbde17 --- /dev/null +++ b/scripts/apache.trap.py @@ -0,0 +1,263 @@ +#!/usr/bin/python2 + +""" Fetch Apache stats via mod_status and send to Zabbix +By Paulson McIntyre +Patches by: +Zach Bailey + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +""" + +import urllib +from optparse import OptionParser +import os +from tempfile import mkstemp +import StringIO +import csv +import socket + +class ErrorSendingValues(RuntimeError): + """ An error occured while sending the values to the Zabbix + server using zabbix_sender. + """ + +def fetchURL(url, user = None, passwd = None): + """ Return the data from a URL """ + if user and passwd: + parts = url.split('://') + url = parts[0] + "://" + user + ":" + passwd + "@" + parts[1] + + conn = urllib.urlopen(url) + try: + data = conn.read() + finally: + conn.close() + return data + +def sendValues(filepath, zabbixserver = "localhost", zabbixport = 10051, senderloc = "zabbix_sender"): + r = os.system("%s --zabbix-server '%s' --port '%s' -i '%s' -vv" % (senderloc, zabbixserver, zabbixport, filepath)) + if r != 0: + raise ErrorSendingValues, "An error occured sending the values to the server" + +def clean(string, chars): + for i in chars: + string = string.replace(i, '') + return string + +def parse(data): + """ Parse the CSV file into a dict of data + """ + mapping = { + "_":"Waiting For Connection", + "S":"Starting Up", + "R":"Reading Request", + "W":"Sending Reply", + "K":"KeepAlive", + "D":"DNS Lookup", + "C":"Closing Connection", + "L":"Logging", + "G":"Gracefully Finishing", + "I":"Idle Cleanup Of Worker", + ".":"Open slot with no current process", + } + mappingFloat = [ + "CPULoad", + "ReqPerSec", + "BytesPerReq", + "BytesPerSec", + ] + # Clean out certian chars + replace = '() ' + csvobj = csv.reader(StringIO.StringIO(data), delimiter = ":", skipinitialspace = True) + ret = {} + for (key, val) in csvobj: + if key == 'Scoreboard': + sb = { + "Waiting For Connection":0, + "Starting Up":0, + "Reading Request":0, + "Sending Reply":0, + "KeepAlive":0, + "DNS Lookup":0, + "Closing Connection":0, + "Logging":0, + "Gracefully Finishing":0, + "Idle Cleanup Of Worker":0, + "Open slot with no current process":0, + } + for i in val: + sb[mapping[i]] += 1 + ret[key] = sb + else: + ret[key] = val + ret2 = {} + for (key, val) in ret.items(): + if key == "Scoreboard": + for (key, val) in val.items(): + ret2[clean(key, replace)] = val + if key in mappingFloat: + ret2[clean(key, replace)] = float(val) + else: + ret2[clean(key, replace)] = val + + return ret2 + +if __name__ == "__main__": + parser = OptionParser( + usage = "%prog [-z ] [-o ]", + version = "%prog $Revision$", + prog = "ApacheStatsForZabbix", + description = """This program gathers data from Apache's +built-in status page and sends it to +Zabbix. The data is sent via zabbix_sender. +Author: Paulson McIntyre (GpMidi) +License: GPLv2 + """, + ) + parser.add_option( + "-l", + "--url", + action = "store", + type = "string", + dest = "url", + default = None, + help = "Override the automatically generated URL with one of your own", + ) + parser.add_option( + "-o", + "--host", + action = "store", + type = "string", + dest = "host", + default = "localhost", + help = "Host to connect to. [default: %default]", + ) + parser.add_option( + "-p", + "--port", + action = "store", + type = "int", + dest = "port", + default = 80, + help = "Port to connect on. [default: %default]", + ) + parser.add_option( + "-r", + "--proto", + action = "store", + type = "string", + dest = "proto", + default = "http", + help = "Protocol to connect on. Can be http or https. [default: %default]", + ) + parser.add_option( + "-z", + "--zabixserver", + action = "store", + type = "string", + dest = "zabbixserver", + default = None, + help = "Zabbix Server to send metrics to. [default: Disabled]", + ) + parser.add_option( + "-u", + "--user", + action = "store", + type = "string", + dest = "user", + default = None, + help = "HTTP authentication user to use when connection. [default: None]", + ) + parser.add_option( + "-a", + "--passwd", + action = "store", + type = "string", + dest = "passwd", + default = None, + help = "HTTP authentication password to use when connecting. [default: None]", + ) + parser.add_option( + "-s", + "--sender", + action = "store", + type = "string", + dest = "senderloc", + default = "/usr/bin/zabbix_sender", + help = "Location to the zabbix_sender executable. [default: %default]", + ) + parser.add_option( + "-q", + "--zabbixport", + action = "store", + type = "int", + dest = "zabbixport", + default = 10051, + help = "Zabbix port to connect to. [default: %default]", + ) + parser.add_option( + "-c", + "--zabbixsource", + action = "store", + type = "string", + dest = "zabbixsource", + default = socket.gethostname(), + help = "Zabbix host to use when sending values. [default: %default]", + ) + (opts, args) = parser.parse_args() + if opts.url and (opts.port != 80 or opts.proto != "http"): + parser.error("Can't specify -u with -p or -r") + if not opts.url: + opts.url = "%s://%s:%s/server-status?auto" % (opts.proto, opts.host, opts.port) + + data = fetchURL(opts.url, user = opts.user, passwd = opts.passwd) + + try: + if opts.zabbixserver is not None: + (tempfiled, tempfilepath) = mkstemp() + tempfile = open(tempfilepath, 'wb') + except: + parser.error("Error creating temporary file") + + try: + data = parse(data = data) + except csv.Error: + parser.error("Error parsing returned data") + + try: + for key, val in data.items(): + if opts.zabbixserver is not None: + tempfile.write("%s apache[%s] %s\n" % (opts.zabbixsource, key, val)) + else: + print "%s apache[%s] %s"%(opts.zabbixsource, key, val) + if opts.zabbixserver is not None: + tempfile.close() + except IndexError: + parser.error("No data") + except "bogus": + parser.error("Error creating the file to send") + + try: + if opts.zabbixserver is not None: + sendValues(filepath = tempfilepath, zabbixserver = opts.zabbixserver, zabbixport = opts.zabbixport, senderloc = opts.senderloc) + except ErrorSendingValues: + parser.error("An error occurred while sending values to the Zabbix server") + + finally: + if opts.zabbixserver is not None: + try: + tempfile.close() + except: + pass + os.remove(tempfilepath) diff --git a/scripts/delay.trap b/scripts/delay.trap new file mode 100755 index 0000000..7bcedfa --- /dev/null +++ b/scripts/delay.trap @@ -0,0 +1,4 @@ +#!/bin/bash + +sleep 3600 + diff --git a/scripts/domain-check b/scripts/domain-check new file mode 100755 index 0000000..36c3ad9 --- /dev/null +++ b/scripts/domain-check @@ -0,0 +1,565 @@ +#!/bin/bash +# +# Source: http://www.cyberciti.biz/files/scripts/domain-check-2.txt +# Program: Domain Expiration Check +# +# Author: Matty < matty91 at gmail dot com > +# +# Current Version: 1.95 +# +# Revision History: +# Version 1.96 +# Rename variables so system variables aren't potentially changed. -- Eric Renfro +# Code optimization and per-whois delay capability is possible. -- Eric Renfro +# Output table is now fully string size padded for results. -- Eric Renfro + +# Version 1.95 +# Added support for .ie and .us domain names +# Cleaned up some areas where awk and cut were being called +# directly rather than from the variables they were asigned to. -- Chris Jones +# Version 1.9 +# Bug fix and enhancement for .uk and .co.uk -- Vivek Gite +# +# Version 1.8 +# Bug fix added $mailContact -- Vivek Gite +# +# Version 1.7 +# Added support for .jp domain names -- Vivek Gite +# +# Version 1.6 +# Added support for .uk domain names; fixed a bug detecting tldtype -- Vivek Gite +# +# Version 1.5 +# Added support for .org, .in, .biz and .info domain names -- Vivek Gite +# +# Version 1.4 +# Updated the documentation. +# +# Version 1.3 +# Gracefully Handle the case where the expiration data is unavailable +# +# Version 1.2 +# Added "-s" option to allow arbitrary registrars +# +# Version 1.1 +# Fixed issue with 'e' getopt string -- Pedro Alves +# +# Version 1.0 +# Initial Release +# +# Last Updated: 07-Aug-2012 +# +# Purpose: +# domain-check checks to see if a domain has expired. domain-check +# can be run in interactive and batch mode, and provides faciltities +# to alarm if a domain is about to expire. +# +# License: +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Notes: +# Since each registrar provides expiration data in a unique format (if +# they provide it at all), domain-check is currently only able to +# processess expiration information for a subset of the available +# registrars. +# +# Requirements: +# Requires whois +# +# Installation: +# Copy the shell script to a suitable location +# +# Tested platforms: +# -- Solaris 9 using /bin/bash +# -- Solaris 10 using /bin/bash +# -- OS X 10.4.2 using /bin/sh +# -- OpenBSD using /bin/sh +# -- FreeBSD using /bin/sh +# -- Redhat advanced server 3.0MU3 using /bin/sh +# +# Usage: +# Refer to the usage() sub-routine, or invoke domain-check +# with the "-h" option. +# +# Example: +# +# The first example will print the expiration date and registrar for prefetch.net: +# +# $ domain-check.sh -d prefetch.net +# +# Domain Registrar Status Expires Days Left +# ----------------------------------- ----------------- -------- ----------- --------- +# prefetch.net INTERCOSMOS MEDIA Valid 13-feb-2006 64 +# +# The second example prints the expiration date and registrar for the domains +# listed in the file "domains": +# +# $ domain-check.sh -f domains +# +# Domain Registrar Status Expires Days Left +# ----------------------------------- ----------------- -------- ----------- --------- +# sun.com NETWORK SOLUTIONS Valid 20-mar-2010 1560 +# google.com EMARKMONITOR INC. Valid 14-sep-2011 2103 +# ack.com NETWORK SOLUTIONS Valid 09-may-2008 880 +# prefetch.net INTERCOSMOS MEDIA Valid 13-feb-2006 64 +# spotch.com GANDI Valid 03-dec-2006 357 +# +# The third example will e-mail the address admin@prefetch.net with the domains that +# will expire in 60-days or less: +# +# $ domain-check -a -f domains -q -x 60 -e admin@prefetch.net +# + +PATH=/bin:/usr/bin:/usr/local/bin:/usr/local/ssl/bin:/usr/sfw/bin ; export PATH + +# Who to page when an expired domain is detected (cmdline: -e) +admin="sysadmin@mydomain.com" + +# Hostname to report to Zabbix Servers (cmdline: -i) +hostname="-" + +# Number of days in the warning threshhold (cmdline: -x) +warnDays=30 + +# If quiet is set to TRUE, don't print anything on the console (cmdline: -q) +quiet=false + +# Human readable output default to off for Zabbix server processing (cmdline: -r) +human=false + +# Don't send emails by default (cmdline: -a) +alarm=false + +# JSON Discovery mode off by default (cmdline: -j) +json=false + +# Whois server to use (cmdline: -s) +whoisServer="whois.internic.org" + +# Location of system binaries +awk="/usr/bin/awk" +whois="/usr/bin/whois" +date="/bin/date" +cut="/usr/bin/cut" +mailContact="/bin/mail" + +# Track tld types for query limiting: +declare -A domainPoll + +############################################################################# +# Purpose: Convert a date from month-DAY-YEAR to Julian format +# Acknowledgements: Code was adapted from examples in the book +# "Shell Scripting Recipes: A Problem-Solution Approach" +# ( ISBN 1590594711 ) +# Arguments: +# $1 -> Month (e.g., 06) +# $2 -> Day (e.g., 08) +# $3 -> Year (e.g., 2006) +############################################################################# +date2julian() +{ + if [[ "${1} != "" && "${2} != "" && "${3}" != "" ]] + then + ## Since leap years add aday at the end of February, + ## calculations are done from 1 March 0000 (a fictional year) + d2j_tmpmonth=$((12 * ${3} + ${1} - 3)) + + ## If it is not yet March, the year is changed to the previous year + d2j_tmpyear=$(( ${d2j_tmpmonth} / 12)) + + ## The number of days from 1 March 0000 is calculated + ## and the number of days from 1 Jan. 4713BC is added + echo $(( (734 * ${d2j_tmpmonth} + 15) / 24 - 2 * ${d2j_tmpyear} + ${d2j_tmpyear}/4 + - ${d2j_tmpyear}/100 + ${d2j_tmpyear}/400 + $2 + 1721119 )) + else + echo 0 + fi +} + +############################################################################# +# Purpose: Convert a string month into an integer representation +# Arguments: +# $1 -> Month name (e.g., Sep) +############################################################################# +getmonth() +{ + case ${1,,} in + jan) echo 1 ;; + feb) echo 2 ;; + mar) echo 3 ;; + apr) echo 4 ;; + may) echo 5 ;; + jun) echo 6 ;; + jul) echo 7 ;; + aug) echo 8 ;; + sep) echo 9 ;; + oct) echo 10 ;; + nov) echo 11 ;; + dec) echo 12 ;; + *) echo 0 ;; + esac +} + +############################################################################# +# Purpose: Calculate the number of seconds between two dates +# Arguments: +# $1 -> Date #1 +# $2 -> Date #2 +############################################################################# +date_diff() +{ + if [[ "${1}" != "" && "${2}" != "" ]] + then + echo $(expr ${2} - ${1}) + else + echo 0 + fi +} + +################################################################## +# Purpose: Access whois data to grab the registrar and expiration date +# Arguments: +# $1 -> Domain to check +################################################################## +check_domain_status() +{ + local registrar="" + # Avoid whois LIMIT EXCEEDED - slowdown our whois client by adding 3 sec + #sleep 3 + # Save the domain since set will trip up the ordering + domain=${1} + tldType="$(echo ${domain} | ${cut} -d '.' -f3 | tr '[A-Z]' '[a-z]')" + if [[ "${tldType}" = "" ]]; + then + tldType="$(echo ${domain} | ${cut} -d '.' -f2 | tr '[A-Z]' '[a-z]')" + fi + + # Invoke whois to find the domain registrar and expiration date + #whoisVal=$(${whois} -h ${whoisServer} "=${1}") + # Let whois select server + + # The whois Expiration data should resemble the following: "Expiration Date: 09-may-2008" + case $tldType in + "org") [[ -n ${domainPoll[$tldType]} ]] && sleep 15 + whoisVal=$(${whois} -h "whois.pir.org" "${1}") + registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2) + domainDate=$(echo "${whoisVal}" | ${awk} '/Expiration Date:/ { print $2 }' | ${cut} -d':' -f2) + ;; + "in") whoisVal=$(${whois} -h "whois.registry.in" "${1}") + registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2) + domainDate=$(echo "${whoisVal}" | ${awk} '/Expiration Date:/ { print $2 }' | ${cut} -d':' -f2) + ;; + "uk") whoisVal=$(${whois} -h "whois.nic.uk" "${1}") + registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2) + domainDate=$(echo "${whoisVal}" | ${awk} '/Renewal date:/ || /Expiry date:/ { print $3 }') + ;; + "biz") whoisVal=$(${whois} -h "whois.neulevel.biz" "${1}") + registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2) + domainDate=$(echo "${whoisVal}" | ${awk} '/Domain Expiration Date:/ { print $6"-"$5"-"$9 }') + ;; + "info") whoisVal=$(${whois} -h "whois.afilias.info" "${1}") + registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2) + domainDate=$(echo "${whoisVal}" | ${awk} '/Expiration Date:/ { print $2 }' | ${cut} -d':' -f2) + ;; + "us") whoisVal=$(${whois} -h "whois.nic.us" "${1}") + registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2) + domainDate=$(echo "${whoisVal}" | ${awk} '/Domain Expiration Date:/ { print $6"-"$5"-"$9 }') + ;; + "com" | "net" | "edu") + whoisVal=$(${whois} -h "whois.internic.org" "${1}") + registrar=$(echo "$whoisVal" | grep "Registrar:" | sed -e 's/^[ \t]*//g' -e 's/[ \t]*$//g' | cut -d':' -f2 | sed -e 's/^[ \t]*//g') + domainDate=$(echo "${whoisVal}" | ${awk} '/Expiration/ { print $NF }') + + #echo "Registrar = $registrar" + #exit 0 + ;; + "ie") whoisVal=$(${whois} -h "whois.domainregistry.ie" "${1}") + registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2) + tdomdate=$(echo "${whoisVal}" | ${awk} '/renewal/ { print $2 }') + tyear=$(echo ${tdomdate} | ${cut} -d'-' -f3) + tmon=$(echo ${tdomdate} | ${cut} -d'-' -f2) + case ${tmon} in + "January") tmonth=jan ;; + "February") tmonth=feb ;; + "March") tmonth=mar ;; + "April") tmonth=apr ;; + "May") tmonth=may ;; + "June") tmonth=jun ;; + "July") tmonth=jul ;; + "August") tmonth=aug ;; + "September") tmonth=sep ;; + "October") tmonth=oct ;; + "November") tmonth=nov ;; + "December") tmonth=dec ;; + *) tmonth=0 ;; + esac + tday=$(echo ${tdomdate} | ${cut} -d'-' -f1) + domainDate=$(echo $tday-$tmonth-$tyear) + ;; + "jp") whoisVal=$(${whois} -h "whois.jprs.jp" "${1}") + registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2) + tdomdate=$(echo "${whoisVal}" | ${awk} '/Expires on/ { print $3 }') + tyear=$(echo ${tdomdate} | ${cut} -d'/' -f1) + tmon=$(echo ${tdomdate} | ${cut} -d'/' -f2) + case ${tmon} in + 1|01) tmonth=jan ;; + 2|02) tmonth=feb ;; + 3|03) tmonth=mar ;; + 4|04) tmonth=apr ;; + 5|05) tmonth=may ;; + 6|06) tmonth=jun ;; + 7|07) tmonth=jul ;; + 8|08) tmonth=aug ;; + 9|09) tmonth=sep ;; + 10) tmonth=oct ;; + 11) tmonth=nov ;; + 12) tmonth=dec ;; + *) tmonth=0 ;; + esac + tday=$(echo ${tdomdate} | ${cut} -d'/' -f3) + domainDate=$(echo $tday-$tmonth-$tyear) + ;; + "cz") whoisVal=$(${whois} -h "${whoisServer}" "${1}") + registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2) + tdomdate=$(echo "${whoisVal}" | awk '/expire:/ { print $2 }') + tyear=$(echo ${tdomdate} | cut -d'.' -f3) + tmon=$(echo ${tdomdate} | cut -d'.' -f2) + tday=$(echo ${tdomdate} | cut -d'.' -f1) + case ${tmon} in + 1|01) tmonth=jan ;; + 2|02) tmonth=feb ;; + 3|03) tmonth=mar ;; + 4|04) tmonth=apr ;; + 5|05) tmonth=may ;; + 6|06) tmonth=jun ;; + 7|07) tmonth=jul ;; + 8|08) tmonth=aug ;; + 9|09) tmonth=sep ;; + 10) tmonth=oct ;; + 11) tmonth=nov ;; + 12) tmonth=dec ;; + *) tmonth=0 ;; + esac + domainDate=$(echo $tday-$tmonth-$tyear) + ;; + *) whoisVal=$(${whois} -h "${whoisServer}" "${1}") + registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2) + domainDate=$(echo "${whoisVal}" | ${awk} '/Expiration/ { print $NF }') + ;; + esac + + if [[ -z ${domainPoll[$tldType]} ]]; then + domainPoll[$tldType]=1 + else + let domainPoll[$tldType]++ + fi + + # If the Registrar is NULL, then we didn't get any data + #if [[ "${registrar}" = "" ]] + #then + # prints "$domain" "Unknown" "Unknown" "Unknown" "Unknown" + # return + #fi + + #echo $domainDate # debug + # Whois data should be in the following format: "13-feb-2006" + IFS="-" + set -- ${domainDate} + month=$(getmonth ${2}) + IFS="" + + # Convert the date to seconds, and get the diff between NOW and the expiration date + domainJulian=$(date2julian ${month} ${1#0} ${3}) + domainDiff=$(date_diff ${nowJulian} ${domainJulian}) + + if ! $human + then + echo "$hostname domain.daysleft.${domain} ${domainDiff}" + fi + + if [[ ${domainDiff} -lt 0 ]] + then + if $alarm + then + echo "The domain ${domain} has expired!" \ + | ${mailContact} -s "Domain ${domain} has expired!" ${admin} + fi + prints ${domain} "Expired" "${domainDate}" "${domainDiff}" ${registrar} + elif [[ ${domainDiff} -lt ${warnDays} ]] + then + if $alarm + then + echo "The domain ${domain} will expire on ${domainDate}" \ + | ${mailContact} -s "Domain ${domain} will expire in ${warnDays}-days or less" ${admin} + fi + prints ${domain} "Expiring" "${domainDate}" "${registrar}" + else + prints ${domain} "Valid" "${domainDate}" "${domainDiff}" "${registrar}" + fi +} + +#################################################### +# Purpose: Print a heading with the relevant columns +# Arguments: +# None +#################################################### +print_heading() +{ + if $human + then + if ! $quiet + then + printf "\n%-35s %-17s %-8s %-11s %-5s\n" "Domain" "Registrar" "Status" "Expires" "Days Left" + echo "----------------------------------- ----------------- -------- ----------- ---------" + fi + fi +} + +##################################################################### +# Purpose: Print a line with the expiraton interval +# Arguments: +# $1 -> Domain +# $2 -> Status of domain (e.g., expired or valid) +# $3 -> Date when domain will expire +# $4 -> Days left until the domain will expire +# $5 -> Domain registrar +##################################################################### +prints() +{ + if $human + then + if ! $quiet + then + minDate=$(echo $3 | ${awk} '{ print $1, $2, $4 }') + printf "%-35s %-17s %-8s %-11s %-5s\n" "${1:0:35}" "${5:0:17}" "${2:0:8}" "${minDate:0:11}" "${4:0:5}" + fi + fi +} + +########################################## +# Purpose: Describe how the script works +# Arguments: +# None +########################################## +usage() +{ + #app="$(basename $0)" + echo "Usage:" >&2 + echo "Zabbix Agent Mode:" >&2 + echo " [-s whois_host] [-i hostname] <-d domain | -f file>" >&2 + echo "Human Readable Mode:" >&2 + echo " -r [-q][-a] [-e email] [-x days] [-s host] <-d domain|-f file>" >&2 + echo "JSON Mode:" >&2 + echo " -j -f domainfile" >&2 + echo "" >&2 + echo " -a : Send a warning message through email " >&2 + echo " -d domain : Domain to analyze (interactive mode)" >&2 + echo " -e email address : Email address to send expiration notices" >&2 + echo " -f domain file : File with a list of domains" >&2 + echo " -h : Print this screen" >&2 + echo " -i hostname : Hostname for Zabbix Server" >&2 + echo " -j : Discovery JSON Object for Zabbix auto-discovery, (needs -f)" >&2 + echo " -r : Human Readable" >&2 + echo " -s whois server : Whois sever to query for information" >&2 + echo " -q : Don't print anything on the console" >&2 + echo " -x days : Domain expiration interval (eg. if domain_ date < days)" >&2 + echo "" >&2 +} + +### Evaluate the options passed on the command line +while getopts ae:f:i:jrhd:s:qx: option +do + case "${option}" + in + a) alarm=true;; + e) admin=${OPTARG};; + d) domain=${OPTARG};; + f) serverFile=$OPTARG;; + i) hostname=$OPTARG;; + j) json=true;; + r) human=true;; + s) whoisServer=$OPTARG;; + q) quiet=true;; + x) warnDays=$OPTARG;; + \?) usage + exit 1;; + esac +done + +### Check to see if the whois binary exists +if [[ ! -f ${whois} ]] +then + echo "ERROR: The whois binary does not exist in ${whois}." >&2 + echo " FIX: Please modify the \$whois variable in the program header." >&2 + exit 1 +fi + +### Check to make sure a date utility is available +if [[ ! -f ${date} ]] +then + echo "ERROR: The date binary does not exist in ${date}." >&2 + echo " FIX: Please modify the \$date variable in the program header." >&2 + exit 1 +fi + +### Baseline the dates so we have something to compare to +month=$(${date} "+%m") +DAY=$(${date} "+%d") +YEAR=$(${date} "+%Y") +nowJulian=$(date2julian ${month#0} ${DAY#0} ${YEAR}) + +### If a HOST and PORT were passed on the cmdline, use those values +if $json +then + if [[ -f "${serverFile}" ]] + then + echo "{" + echo " \"data\":[" + echo + while read domain + do + echo " { \"{#DOMAIN}\":\"${domain}\" }," + done < ${serverFile} + echo + echo " ]" + echo "}" + else + usage + exit 1 + fi +else + if [[ "${domain}" != "" ]] + then + print_heading + check_domain_status "${domain}" + ### If a file and a "-a" are passed on the command line, check all + ### of the domains in the file to see if they are about to expire + elif [[ -f "${serverFile}" ]] + then + print_heading + while read domain + do + #sleep 30 + check_domain_status "${domain}" + + done < ${serverFile} + + ### There was an error, so print a detailed usage message and exit + else + usage + exit 1 + fi + + # Add an extra newline + if $human + then + echo + fi +fi + +### Exit with a success indicator +exit 0 + +# vim: et ts=4 sw=4 diff --git a/scripts/memcached.trap.php b/scripts/memcached.trap.php new file mode 100755 index 0000000..eb33d8a --- /dev/null +++ b/scripts/memcached.trap.php @@ -0,0 +1,20 @@ +#!/usr/bin/php +connect($memcache_server,$memcache_port); +$s=$m->getstats(); +foreach($s as $key=>$value) { + echo "$agent_hostname memcache.$key $value\n"; + #exec("$zabbix_sender $zabbix_server $zabbix_port $memcache_server memcache.$key $value"); +} +?> diff --git a/scripts/mysql.trap.php b/scripts/mysql.trap.php new file mode 100755 index 0000000..99fe653 --- /dev/null +++ b/scripts/mysql.trap.php @@ -0,0 +1,933 @@ +#!/usr/bin/php + "" ) + $valids[] = $parts[$i]; +} + +// Connect to the MySQL server +$connection = mysqli_connect("localhost",$user,$pass); +if ( mysqli_connect_errno($connection) ) { + echo "Failed to connect to MySQL: " . mysqli_connect_error(); + exit(2); +} else { + mysqli_select_db($connection, "mysql"); +} + +// Get the version number +$parts = explode(" ",`mysql --version`); +$Version = substr($parts[5],0,strlen($parts[4])-1); + +// Get server variables +$engines = array('have_myisam'=>'YES','have_memory'=>'YES'); // these are auto enabled. no config necessary +$result = mysqli_query($connection, "show global variables;"); +if ( $result ) + while ($row = mysqli_fetch_assoc($result)) { + $var = $row["Variable_name"]; + $val = $row["Value"]; + $$var = $val; + if ( substr($var,0,5) == "have_" && $val == "YES" ) { + $engines[$var] = $val; + } + } + +if ( SLOWINNODB ) { + // Global status variables we use: + $statusVars = array("Aborted_clients", "Aborted_connects", "Binlog_cache_disk_use", "Binlog_cache_use", "Bytes_received", "Bytes_sent", "Com_alter_db", "Com_alter_table", "Com_create_db", "Com_create_function", "Com_create_index", "Com_create_table", "Com_delete", "Com_drop_db", "Com_drop_function", "Com_drop_index", "Com_drop_table", "Com_drop_user", "Com_grant", "Com_insert", "Com_replace", "Com_revoke", "Com_revoke_all", "Com_select", "Com_update", "Connections", "Created_tmp_disk_tables", "Created_tmp_tables", "Handler_read_first", "Handler_read_key", "Handler_read_next", "Handler_read_prev", "Handler_read_rnd", "Handler_read_rnd_next", "Innodb_buffer_pool_read_requests", "Innodb_buffer_pool_reads", "Innodb_buffer_pool_wait_free", "Innodb_buffer_pool_write_requests", "Innodb_log_waits", "Innodb_log_writes", "Key_blocks_unused", "Key_read_requests", "Key_reads", "Key_write_requests", "Key_writes", "Max_used_connections", "Open_files", "Open_tables", "Opened_tables", "Qcache_free_blocks", "Qcache_free_memory", "Qcache_hits", "Qcache_inserts", "Qcache_lowmem_prunes", "Qcache_not_cached", "Qcache_queries_in_cache", "Qcache_total_blocks", "Questions", "Select_full_join", "Select_range", "Select_range_check", "Select_scan", "Slave_running", "Slow_launch_threads", "Slow_queries", "Sort_merge_passes", "Sort_range", "Sort_rows", "Sort_scan", "Table_locks_immediate", "Table_locks_waited", "Threads_cached", "Threads_connected", "Threads_created", "Threads_running", "Uptime"); + + foreach ( $statusVars as $var ) { + $result = mysqli_query($connection, "show global status like '$var';"); + if ( $result ) + while ($row = mysqli_fetch_assoc($result)) { + $var = $row["Variable_name"]; + $val = $row["Value"]; + $$var = $val; + } + } +} else { + $result = mysqli_query($connection, "show global status;"); + if ( $result ) + while ($row = mysqli_fetch_assoc($result)) { + $var = $row["Variable_name"]; + $$var = $row["Value"]; + } +} + +// Replication master status +$result = mysqli_query($connection, "show master status;"); +if ( $result ) + while ($row = mysqli_fetch_assoc($result)) { + foreach ( $row as $key => $var ) { + $key = "Master_Status_$key"; + $$key = $var; + } + } + +$result = mysqli_query($connection, "show slave status;"); +if ( $result ) + while ($row = mysqli_fetch_assoc($result)) { + foreach ( $row as $key => $var ) + $$key = $var; + } + +// Didn't error above, so Available +$Available = 1; + +if ( $type == "daily" ) { + if ( file_exists(DTIME) ) { + $Diff = (time() - filectime(DTIME))/60/60/24; + if ( $Diff < 1 ) { + if ( DEBUG ) { + #echo "Skipping daily gathering\n"; + file_put_contents('php://stderr', "Skipping daily gathering\n"); + } + #echo 1; + exit(0); + } + unlink(DTIME); + } + file_put_contents(DTIME,"Ran at ".date("Y-m-d H:i")."\n"); + + // These are dangerous privileges + $privs = array( + "Insert_priv"=>"Insert_priv_count", + "Update_priv"=>"Update_priv_count", + "Delete_priv"=>"Delete_priv_count", + "Drop_priv"=>"Drop_priv_count", + "Shutdown_priv"=>"Shut_down_priv_count", + "Process_priv"=>"Process_priv_count", + "File_priv"=>"File_priv_count", + "Grant_priv"=>"Grant_priv_count", + "Alter_priv"=>"Alter_priv_count", + "Super_priv"=>"Super_priv_count", + "Lock_tables_priv"=>"Lock_tables_priv_count", + ); + foreach ( $privs as $key => $var ) + $$var = 0; + + // Now, load users and let's see what's there + $result = mysqli_query($connection, "select * from user"); + $Root_accounts_count = $Accounts_without_password = $Accounts_with_broad_host_specifier = $Anonymous_accounts_count = 0; + while ($row = mysqli_fetch_assoc($result)) { + if ( $row['Host'] == "" || $row['Host']=='%' ) + $Accounts_with_broad_host_specifier++; + if ( $row["User"] == "root" ) + { + $Root_accounts_count++; + $invalid = false; + if ( $row["Host"] == "" || $row["Host"]=="%" || !in_array($row["Host"],$valids) ) + $Is_root_remote_login_enabled = 1; + if ( $row["Password"] == "" ) + $Is_root_without_password = 1; + } + if ( $row['Password'] == "" ) + $Accounts_without_password++; + if ( $row['User'] == "" ) + $Anonymous_accounts_count++; + foreach ( $privs as $key => $var ) + if ( $row[$key] == "Y" ) + $$var++; + } + + // How many fragmented tables to we have? + $result = mysqli_query($connection, "SELECT COUNT(TABLE_NAME) as Frag FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema','mysql') AND Data_free > 10000"); + $Fragmented_table_count = 0; + while ($row = mysqli_fetch_assoc($result)) { + $Fragmented_table_count = $row["Frag"]; + } + + // Get the engines in use + $result = mysqli_query($connection, "SELECT DISTINCT ENGINE FROM information_schema.TABLES"); + if ( $result ) + while ($row = mysqli_fetch_assoc($result)) { + foreach ( $row as $key => $var ) { + $key = "have_".strtolower($var); + if ( array_key_exists( $key,$engines ) ) + $engines[$key] = "USED"; + } + } + $innodb_only_install = ( $engines['have_myisam'] == "YES" && $engines['have_innodb'] == "USED" ) ? 1 : 0; + $myisam_only_install = ( $engines['have_myisam'] == "USED" && $engines['have_innodb'] == "YES" ) ? 1 : 0; + + $Suggested_table_cache = max(256,$max_connections*2); + + $Maximum_memory_possible = ($innodb_buffer_pool_size + $key_buffer_size + $max_connections * ($sort_buffer_size + $read_buffer_size + $binlog_cache_size) + $max_connections * mb(2)); + $Available_memory = $physical_memory * 9 / 10; + $Available_memory -= $max_connections * kb(256); + + $Suggested_query_cache_size = ($Available_memory / 10 < mb(8) ? mb(8) : $Available_memory / 10); + $Available_memory -= $Suggested_query_cache_size; + + $bm = $Available_memory * 7 / 10; + $tbm = $Available_memory * 3 / 10; + $mpt = $tbm * 10 / $max_connections; + + $bm -= $Suggested_table_cache * kb(8); + $btb = $mpt*10; + $Suggested_tmp_table_size = max(mb(16),$btb); + + $tc = max($max_connections/2, 16); + $Suggested_thread_cache_size = min($tc,64); + + $msbs = max($btb,mb(8)); + $Suggested_myisam_sort_buffer_size = min($msbs,$physical_memory*2/10); + + $mb = $bm * ($innodb_only_install ? 0.05 : ($myisam_only_install ? 1 : 0.5)); + $Suggested_key_buffer_size = max($mb/2, mb(8)); + + $Suggested_read_buffer_size = min($physical_memory/100,$mpt*20/100,kb(64)); + $Suggested_read_rnd_buffer_size = min($physical_memory*4/100,$mpt*40/100,kb(256)); + $Suggested_sort_buffer_size = min($physical_memory*2/100,$mpt*30/100,kb(256)); + + if ( $myisam_only_install ) { + $Suggested_innodb_additional_mem_pool_size = + $Suggested_innodb_log_buffer_size = + $Suggested_innodb_buffer_pool_size = + $Suggested_innodb_log_file_size = 0; + } else { + $ib = $bm * (1 - ($innodb_only_install ? 0.05 : ($myisam_only_install ? 1 : 0.5))); + $Suggested_innodb_additional_mem_pool_size = max(mb(2),$ib*2/100); + $ib -= $Suggested_innodb_additional_mem_pool_size; + + $Suggested_innodb_log_buffer_size = min(max(mb(1),$ib/100),mb(16)); + $ib -= $Suggested_innodb_log_buffer_size; + + $Suggested_innodb_buffer_pool_size = $ibps = max($ib, mb(8)); + $ib -= $Suggested_innodb_buffer_pool_size; + + $Suggested_innodb_log_file_size = min($ibps*2/10, gb(1)); + } + + $innodb_only_install = ( $engines['have_myisam'] == "YES" && $engines['have_innodb'] == "USED" ) ? 1 : 0; + $myisam_only_install = ( $engines['have_myisam'] == "USED" && $engines['have_innodb'] == "YES" ) ? 1 : 0; + if ( $innodb_only_install ) { + if ( DEBUG ) { + #echo "InnoDB only -- suggesting heavy settings for InnoDB\n"; + file_put_contents('php://stderr', "InnoDB only -- suggesting heavy settings for InnoDB\n"); + } + $innodb_suggested_buffer_size = round(0.75 * $physical_memory); + $myisam_suggested_key_buffer_size = 0; + } elseif ( $myisam_only_install ) { + if ( DEBUG ) { + #echo "MyISAM only -- suggesting heavy settings for MyISAM\n"; + file_put_contents('php://stderr', "MyISAM only -- suggesting heavy settings for MyISAM\n"); + } + $innodb_suggested_buffer_size = 0; + $myisam_suggested_key_buffer_size = round(0.40 * $physical_memory); + } else { // ok, we're a mixed install + // These are SWAG's. Need better calculations.... + if ( DEBUG ) { + #echo "Mixed install. Balancing settings\n"; + file_put_contents('php://stderr', "Mixed install. Balancing settings\n"); + } + $innodb_suggested_buffer_size = round(0.50 * $physical_memory); + $myisam_suggested_key_buffer_size = round(0.25 * $physical_memory); + } + $innodb_buffer_size_low = !close($innodb_buffer_pool_size,$innodb_suggested_buffer_size); + $myisam_key_buffer_size_low = !close($key_buffer_size,$myisam_suggested_key_buffer_size); + + $tosendDaily = array( + 'Architecture_handles_all_memory' => ($physical_memory <= 2147483648 || $bit64 ? 1 : 0), + 'Maximum_memory_total' => $Maximum_memory_possible, + 'Maximum_memory_over_physical' => $Maximum_memory_possible > $physical_memory ? 1 :0, + 'Maximum_memory_exceeds_32bit_capabilities' => !$bit64 ? $Maximum_memory_possible > gb(2) : 0, + + // Suggested configuration settings + 'Suggested_table_cache' => byte_size($Suggested_table_cache), + 'Change_table_cache' => !close($Suggested_table_cache,$table_cache), + 'table_cache' => $table_cache, + + 'Suggested_query_cache_size' => byte_size($Suggested_query_cache_size), + 'Change_query_cache_size' => !close($Suggested_query_cache_size,$query_cache_size), + 'query_cache_size' => $query_cache_size, + + 'Suggested_tmp_table_size' => byte_size($Suggested_tmp_table_size), + 'Change_tmp_table_size' => !close($Suggested_tmp_table_size,$tmp_table_size), + 'tmp_table_size' => $tmp_table_size, + + 'Suggested_myisam_sort_buffer_size' => byte_size($Suggested_myisam_sort_buffer_size), + 'Change_myisam_sort_buffer_size' => !close($Suggested_myisam_sort_buffer_size,$myisam_sort_buffer_size), + 'myisam_sort_buffer_size' => $myisam_sort_buffer_size, + + 'Suggested_key_buffer_size' => byte_size($Suggested_key_buffer_size), + 'Change_key_buffer_size' => !close($Suggested_key_buffer_size,$key_buffer_size), + 'key_buffer_size' => $key_buffer_size, + + 'Suggested_read_buffer_size' => byte_size($Suggested_read_buffer_size), + 'Change_read_buffer_size' => !close($Suggested_read_buffer_size,$read_buffer_size), + 'read_buffer_size' => $read_buffer_size, + + 'Suggested_read_rnd_buffer_size' => byte_size($Suggested_read_rnd_buffer_size), + 'Change_read_rnd_buffer_size' => !close($Suggested_read_rnd_buffer_size,$read_rnd_buffer_size), + 'read_rnd_buffer_size' => $read_rnd_buffer_size, + + 'Suggested_sort_buffer_size' => byte_size($Suggested_sort_buffer_size), + 'Change_sort_buffer_size' => !close($Suggested_sort_buffer_size,$sort_buffer_size), + 'sort_buffer_size' => $sort_buffer_size, + + 'Suggested_innodb_additional_mem_pool_size' => byte_size($Suggested_innodb_additional_mem_pool_size), + 'Change_innodb_additional_mem_pool_size' => !close($Suggested_innodb_additional_mem_pool_size,$innodb_additional_mem_pool_size), + 'innodb_additional_mem_pool_size' => $innodb_additional_mem_pool_size, + + 'Suggested_innodb_log_buffer_size' => byte_size($Suggested_innodb_log_buffer_size), + 'Change_innodb_log_buffer_size' => !close($Suggested_innodb_log_buffer_size,$innodb_log_buffer_size), + 'innodb_log_buffer_size' => $innodb_log_buffer_size, + + 'Suggested_innodb_buffer_pool_size' => byte_size($Suggested_innodb_buffer_pool_size), + 'Change_innodb_buffer_pool_size' => !close($Suggested_innodb_buffer_pool_size,$innodb_buffer_pool_size), + 'innodb_buffer_pool_size' => $innodb_buffer_pool_size, + + 'Suggested_innodb_log_file_size' => byte_size($Suggested_innodb_log_file_size), + 'Change_innodb_log_file_size' => !close($Suggested_innodb_log_file_size,$innodb_log_file_size), + 'innodb_log_file_size' => $innodb_log_file_size, + + // Remove these! + #'myisam_suggested_key_buffer_size' => $myisam_suggested_key_buffer_size, + #'innodb_suggested_buffer_size' => $innodb_suggested_buffer_size, + #'innodb_buffer_size_low' => $innodb_buffer_size_low, + #'myisam_key_buffer_size_low' => $myisam_key_buffer_size_low, + + // Setup/Security parameters + 'Accounts_with_broad_host_specifier' => $Accounts_with_broad_host_specifier, + 'Accounts_without_password' => $Accounts_without_password, + 'Anonymous_accounts_count' => $Anonymous_accounts_count, + 'Alter_priv_count' => $Alter_priv_count, + 'Delete_priv_count' => $Delete_priv_count, + 'Drop_priv_count' => $Drop_priv_count, + 'File_priv_count' => $File_priv_count, + 'Grant_priv_count' => $Grant_priv_count, + 'Insert_priv_count' => $Insert_priv_count, + 'Lock_tables_priv_count' => $Lock_tables_priv_count, + 'Process_priv_count' => $Process_priv_count, + 'Shut_down_priv_count' => $Shut_down_priv_count, + 'Super_priv_count' => $Super_priv_count, + 'Update_priv_count' => $Update_priv_count, + 'Is_root_remote_login_enabled' => $Is_root_remote_login_enabled, + 'Is_root_without_password' => $Is_root_without_password, + 'Root_accounts_count' => $Root_accounts_count, + 'have_symlink' => $have_symlink, + 'old_passwords' => $old_passwords, + 'secure_auth' => $secure_auth, + 'skip_show_database' => $skip_show_database, + 'myisam_recover_options' => $myisam_recover_options == "OFF" ? 0 : 1, + 'wait_timeout' => $wait_timeout, + 'slow_launch_time' => $slow_launch_time, + 'local_infile' => $local_infile, + 'log_bin' => $log_bin, + 'log_queries_not_using_indexes' => $log_queries_not_using_indexes, + 'log_slow_queries' => $log_slow_queries, + 'long_query_time' => $long_query_time, + 'Version' => $Version, + 'binlog_cache_size' => $binlog_cache_size, + 'sync_binlog' => $sync_binlog, + 'have_query_cache' => $have_query_cache, + 'query_cache_limit' => $query_cache_limit, + 'query_cache_min_res_unit' => $query_cache_min_res_unit, + 'query_cache_type' => $query_cache_type, + 'query_prealloc_size' => $query_prealloc_size, + 'join_buffer_size' => $join_buffer_size, + 'key_cache_block_size' => $key_cache_block_size, + 'max_heap_table_size' => $max_heap_table_size, + 'sql_mode' => $sql_mode, + 'max_connections' => $max_connections, + 'thread_cache_size' => $thread_cache_size, + 'innodb_flush_log_at_trx_commit' => $innodb_flush_log_at_trx_commit, + 'innodb_log_files_in_group' => $innodb_log_files_in_group, + 'expire_logs_days' => $expire_logs_days, + + // Types of queries and usage + 'Com_alter_db' => $Com_alter_db, + 'Com_alter_table' => $Com_alter_table, + 'Com_create_db' => $Com_create_db, + 'Com_create_function' => $Com_create_function, + 'Com_create_index' => $Com_create_index, + 'Com_create_table' => $Com_create_table, + 'Com_drop_db' => $Com_drop_db, + 'Com_drop_function' => $Com_drop_function, + 'Com_drop_index' => $Com_drop_index, + 'Com_drop_table' => $Com_drop_table, + 'Com_drop_user' => $Com_drop_user, + 'Com_grant' => $Com_grant, + 'Excessive_revokes' => $Com_revoke + $Com_revoke_all, + 'Percent_writes_vs_total' => percent( ($Com_insert + $Com_replace + $Com_update + $Com_delete) / $Questions ), + 'Percent_inserts_vs_total' => percent( ($Com_insert + $Com_replace) / $Questions ), + 'Percent_selects_vs_total' => percent( ($Com_select + $Qcache_hits) / $Questions ), + 'Percent_deletes_vs_total' => percent( $Com_delete / $Questions ), + 'Percent_updates_vs_total' => percent( $Com_update / $Questions ), + 'Recent_schema_changes' => $Com_create_db > 0 || $Com_alter_db > 0 || $Com_drop_db > 0 || $Com_create_function > 0 || $Com_drop_function > 0 || $Com_create_index > 0 || $Com_drop_index > 0 || $Com_alter_table > 0 || $Com_create_table > 0 || $Com_drop_table > 0 || $Com_drop_user > 0, + + 'Fragmented_table_count' => $Fragmented_table_count, + + ); + +} +elseif ( (int)$Uptime < 3600 ) { // wait 1h before sending data after a restart + #echo 1; + exit(0); +} + +// Make a pretty uptime string +$seconds = $Uptime % 60; +$minutes = floor(($Uptime % 3600) / 60); +$hours = floor(($Uptime % 86400) / (3600)); +$days = floor($Uptime / (86400)); +if ($days > 0) { + $Uptimestring = "${days}d ${hours}h ${minutes}m ${seconds}s"; +} elseif ($hours > 0) { + $Uptimestring = "${hours}h ${minutes}m ${seconds}s"; +} elseif ($minutes > 0) { + $Uptimestring = "${minutes}m ${seconds}s"; +} else { + $Uptimestring = "${seconds}s"; +} + +if ( $days == 0 ) $days = 100000000; // force percentage to be low on calculation + +if ( !isset($Innodb_buffer_pool_read_requests) || $Innodb_buffer_pool_read_requests == 0 ) + $Percent_innodb_cache_hit_rate = 0; +else + $Percent_innodb_cache_hit_rate = pct2hi( 1 - ($Innodb_buffer_pool_reads / $Innodb_buffer_pool_read_requests) ); +if ( !isset($Innodb_buffer_pool_write_requests) || $Innodb_buffer_pool_write_requests == 0 ) + $Percent_innodb_cache_write_waits_required = 0; +else + $Percent_innodb_cache_write_waits_required = percent( $Innodb_buffer_pool_wait_free / $Innodb_buffer_pool_write_requests ); + + +$tosendLive = array( + 'Available' => $Available, + 'Uptime' => $Uptimestring, + 'Last_Errno' => isset($Last_Errno) ? $Last_Errno : 0, + 'Last_Error' => isset($Last_Error) ? $Last_Error : "", + + // Binlog parameters + 'Binlog_cache_disk_use' => $Binlog_cache_disk_use, + 'Binlog_cache_use' => $Binlog_cache_use, + + // Performance/Usage/Queries + 'Questions' => $Questions, + 'Queries_per_sec' => elapsed((float)$Questions), + 'Bytes_received' => $Bytes_received, + 'Bytes_sent' => $Bytes_sent, + 'Select_full_join' => $Select_full_join, + 'Select_scan' => $Select_scan, + 'Slow_queries' => $Slow_queries, + 'Qcache_free_blocks' => $Qcache_free_blocks, + 'Qcache_free_memory' => $Qcache_free_memory, + 'Qcache_hits' => $Qcache_hits, + 'Qcache_inserts' => $Qcache_inserts, + 'Qcache_lowmem_prunes' => $Qcache_lowmem_prunes, + 'Qcache_lowmem_prunes_per_day' => $Qcache_lowmem_prunes/$days, + 'Qcache_not_cached' => $Qcache_not_cached, + 'Qcache_queries_in_cache' => $Qcache_queries_in_cache, + 'Qcache_total_blocks' => $Qcache_total_blocks, + 'Average_rows_per_query' => ($Handler_read_first + $Handler_read_key + $Handler_read_next + $Handler_read_prev + $Handler_read_rnd + $Handler_read_rnd_next + $Sort_rows)/$Questions, + 'Total_rows_returned' => $Handler_read_first + $Handler_read_key + $Handler_read_next + $Handler_read_prev + $Handler_read_rnd + $Handler_read_rnd_next + $Sort_rows, + 'Indexed_rows_returned' => $Handler_read_first + $Handler_read_key + $Handler_read_next + $Handler_read_prev, + 'Sort_merge_passes' => $Sort_merge_passes, + 'Sort_range' => $Sort_range, + 'Sort_scan' => $Sort_scan, + 'Total_sort' => $Sort_range+$Sort_scan, + 'Joins_without_indexes' => $Select_range_check + $Select_full_join, + 'Joins_without_indexes_per_day' => round(($Select_range_check + $Select_full_join)/$days,0), + 'Percent_full_table_scans' => percent( ($Handler_read_rnd_next + $Handler_read_rnd) / ($Handler_read_rnd_next + $Handler_read_rnd + $Handler_read_first + $Handler_read_next + $Handler_read_key + $Handler_read_prev) ), + 'Percent_query_cache_fragmentation' => percent( $Qcache_free_blocks / $Qcache_total_blocks ), + 'Percent_query_cache_hit_rate' => percent( $Qcache_hits / ($Qcache_inserts + $Qcache_hits) ), + 'Percent_query_cache_pruned_from_inserts' => percent( $Qcache_lowmem_prunes / $Qcache_inserts ), + 'Percent_myisam_key_cache_in_use' => percent( (1 - ($Key_blocks_unused / ($key_buffer_size / $key_cache_block_size))) ), + 'Percent_myisam_key_cache_hit_rate' => pct2hi( (1 - ($Key_reads / $Key_read_requests)) ), + 'Percent_myisam_key_cache_write_ratio' => percent( $Key_writes / $Key_write_requests ), + 'Number_myisam_key_blocks' => $key_buffer_size / $key_cache_block_size, + 'Used_myisam_key_cache_blocks' => ($key_buffer_size / $key_cache_block_size) - $Key_blocks_unused, + 'Key_read_requests' => $Key_read_requests, + 'Key_reads' => $Key_reads, + 'Key_write_requests' => $Key_write_requests, + 'Key_writes' => $Key_writes, + + // Tables and Temp Tables stats + 'Open_tables' => $Open_tables, + 'Opened_tables' => $Opened_tables, + 'Table_locks_immediate' => $Table_locks_immediate, + 'Table_locks_waited' => $Table_locks_waited, + 'Created_tmp_disk_tables' => $Created_tmp_disk_tables, + 'Created_tmp_tables' => $Created_tmp_tables, + 'Percent_table_cache_hit_rate' => $Opened_tables > 0 ? pct2hi($Open_tables/$Opened_tables) : 100, + 'Percent_table_lock_contention' => ($Table_locks_waited + $Table_locks_immediate) > 0 ? percent( $Table_locks_waited / ($Table_locks_waited + $Table_locks_immediate)) : 0, + 'Percent_tmp_tables_on_disk' => ($Created_tmp_disk_tables + $Created_tmp_tables) > 0 ? percent( $Created_tmp_disk_tables / ($Created_tmp_disk_tables + $Created_tmp_tables)) : 0, + 'Percent_transactions_saved_tmp_file' => ($Binlog_cache_use == 0 ? 0 : percent( $Binlog_cache_disk_use / $Binlog_cache_use) ), + 'Percent_tmp_sort_tables' => ($Sort_range+$Sort_scan > 0 ? percent( $Sort_merge_passes/($Sort_range+$Sort_scan)) : 0 ), + 'Percent_files_open' => $open_files_limit > 0 ? percent( $Open_files/$open_files_limit) : 0, + + // Clients, Threads, and Connections + 'Aborted_clients' => $Aborted_clients, + 'Aborted_connects' => $Aborted_connects, + 'Connections' => $Connections, + 'Successful_connects' => $Connections - $Aborted_connects, + 'Max_used_connections' => $Max_used_connections, + 'Slow_launch_threads' => $Slow_launch_threads, + 'Threads_cached' => $Threads_cached, + 'Threads_connected' => $Threads_connected, + 'Threads_created' => $Threads_created, + 'Threads_created_rate' => $Threads_created, + 'Threads_running' => $Threads_running, + 'Percent_thread_cache_hit_rate' => pct2hi( (1-$Threads_created/$Connections) ), + 'Percent_connections_used' => percent( $Threads_connected / $max_connections ), + 'Percent_aborted_connections' => percent( $Aborted_connects / $Connections ), + 'Percent_maximum_connections_ever' => percent( $Max_used_connections / $max_connections ), + + // Innodb stats + 'Percent_innodb_log_size_vs_buffer_pool' => percent( ($innodb_log_files_in_group * $innodb_log_file_size) / $innodb_buffer_pool_size ), + 'Percent_innodb_log_write_waits_required' => percent( $Innodb_log_waits / $Innodb_log_writes ), + 'Percent_innodb_cache_hit_rate' => $Percent_innodb_cache_hit_rate, + 'Percent_innodb_cache_write_waits_required' => $Percent_innodb_cache_write_waits_required, + 'Innodb_log_file_size_total' => $innodb_log_files_in_group * $innodb_log_file_size, +); + +// Sometimes, replication isn't reported if not enabled. Test first before adding +if ( isset($Master_Status_File) ) +{ + $tosendLive = array_merge($tosendLive,array( + // Replication information + 'Master_Status_Position' => $Master_Status_Position, + 'Master_Status_File' => $Master_Status_File, + 'Master_Status_Binlog_Do_DB' => $Master_Status_Binlog_Do_DB, + 'Master_Status_Binlog_Ignore_DB' => $Master_Status_Binlog_Ignore_DB, + )); +} + +if ( isset($Relay_Log_File) ) +{ + $tosendLive = array_merge($tosendLive,array( + 'Master_Host' => $Master_Host, + 'Master_Log_File' => $Master_Log_File, + 'Master_Port' => $Master_Port, + 'Master_User' => $Master_User, + 'Read_Master_Log_Pos' => $Read_Master_Log_Pos, + 'Relay_Log_File' => $Relay_Log_File, + 'Relay_Log_Pos' => $Relay_Log_Pos, + 'Relay_Log_Space' => $Relay_Log_Space, + 'Relay_Master_Log_File' => $Relay_Master_Log_File, + 'Exec_Master_Log_Pos' => $Exec_Master_Log_Pos, + 'Slave_IO_Running' => $Slave_IO_Running, + 'Slave_IO_State' => $Slave_IO_State, + 'Slave_SQL_Running' => $Slave_SQL_Running, + 'Slave_running' => $Slave_IO_Running="Yes" && $Slave_SQL_Running="Yes" ? 1 : 0, + 'Seconds_Behind_Master' => $Seconds_Behind_Master, + )); +} + +$tosend = $type == "daily" ? $tosendDaily : $tosendLive; +foreach ( $tosend as $key => $var ) + zabbix_post($key,$var); + +//system("zabbix_sender -z $server -i ".DAT." >> ".LOG); +#echo 1; +exit(0); + +function close($a,$b) { + if ( $a == 0 && $b > 1 ) return 0; + if ( $b == 0 && $a > 1 ) return 0; + $delta = abs($b-$a)*100/$a; + return $delta < 90; +} + +function kb($a) { return $a*1024; } +function mb($a) { return $a*1024*1024; } +function gb($a) { return $a*1024*1024*1024; } + + +function byte_size($size) +{ + $filesizename = array("", "K", "M", "G", "T", "P", "E", "Z", "Y"); + return $size ? round($size/pow(1024, ($i = floor(log($size, 1024)))), 0) . $filesizename[$i] : '0'; +} + +function pct2hi($a) { + global $Uptime; + + return $Uptime < 86400 ? 100 : percent($a); +} + +function percent($a) { + return round(100*$a); +} + +function zabbix_config() { + global $server,$host; + + if ( file_exists(DAT) ) unlink(DAT); + if ( file_exists(LOG) ) unlink(LOG); + + // Get server information for zabbix_sender + $config = file_get_contents("/etc/zabbix/zabbix_agentd.conf"); + preg_match("/Hostname\s*=\s*(.*)/i",$config,$parts); + $host = $parts[1]; + preg_match("/Server\s*=\s*(.*)/i",$config,$parts); + $server = $parts[1]; +} + +function zabbix_post($var,$val) { + global $server,$host; + + switch ( strtolower($val) ) { + case "yes": + case "on": + $val = 1; + break; + case "no": + case "": + case "off": + $val = 0; + break; + } + if ( !is_numeric($val) && $val != "1" ) + #if ( is_string($val) ) + $val = '"'.$val.'"'; + + echo "$host ".SYSTEM.".$var $val\n"; + #file_put_contents(DAT,"$server $host 10051 ".SYSTEM.".$var $val\n",FILE_APPEND); + #$cmd = "zabbix_sender -z $server -p 10051 -s $host -k ".SYSTEM.".$var -o $val"; + #if ( DEBUG ) + # echo "$cmd\n"; + #else + # echo "$cmd\n"; + # #system("$cmd 2>&1 >> ".LOG); +} + +function elapsed($val) { + $now = microtime(true); + if ( !file_exists(UTIME) ) // first time + file_put_contents(UTIME,serialize(array( "value" => $val, "start" => $now ))); + $data = unserialize(file_get_contents(UTIME)); + file_put_contents(UTIME,serialize(array( "value" => $val, "start" => $now ))); + $seconds = $now-$data["start"]; + $elapsed = (float)($val - $data["value"])/( !$seconds || $seconds==0 ? 1 : $seconds); + return $elapsed < 0 ? 0 : $elapsed; +} + +/** All STATUS variables: +Aborted_clients +Aborted_connects +Binlog_cache_disk_use +Binlog_cache_use +Bytes_received +Bytes_sent +Com_admin_commands +Com_alter_db +Com_alter_table +Com_analyze +Com_backup_table +Com_begin +Com_change_db +Com_change_master +Com_check +Com_checksum +Com_commit +Com_create_db +Com_create_function +Com_create_index +Com_create_table +Com_create_user +Com_dealloc_sql +Com_delete +Com_delete_multi +Com_do +Com_drop_db +Com_drop_function +Com_drop_index +Com_drop_table +Com_drop_user +Com_execute_sql +Com_flush +Com_grant +Com_ha_close +Com_ha_open +Com_help +Com_insert +Com_insert_select +Com_kill +Com_load +Com_load_master_data +Com_load_master_table +Com_lock_tables +Com_optimize +Com_preload_keys +Com_prepare_sql +Com_purge +Com_purge_before_date +Com_rename_table +Com_repair +Com_replace +Com_replace_select +Com_reset +Com_restore_table +Com_revoke +Com_revoke_all +Com_rollback +Com_savepoint +Com_select +Com_set_option +Com_show_binlog_events +Com_show_binlogs +Com_show_charsets +Com_show_collations +Com_show_column_types +Com_show_create_db +Com_show_create_table +Com_show_databases +Com_show_errors +Com_show_fields +Com_show_grants +Com_show_innodb_status +Com_show_keys +Com_show_logs +Com_show_master_status +Com_show_ndb_status +Com_show_new_master +Com_show_open_tables +Com_show_privileges +Com_show_processlist +Com_show_slave_hosts +Com_show_slave_status +Com_show_status +Com_show_storage_engines +Com_show_tables +Com_show_triggers +Com_show_variables +Com_show_warnings +Com_slave_start +Com_slave_stop +Com_stmt_close +Com_stmt_execute +Com_stmt_fetch +Com_stmt_prepare +Com_stmt_reset +Com_stmt_send_long_data +Com_truncate +Com_unlock_tables +Com_update +Com_update_multi +Com_xa_commit +Com_xa_end +Com_xa_prepare +Com_xa_recover +Com_xa_rollback +Com_xa_start +Compression +Connections +Created_tmp_disk_tables +Created_tmp_files +Created_tmp_tables +Delayed_errors +Delayed_insert_threads +Delayed_writes +Flush_commands +Handler_commit +Handler_delete +Handler_discover +Handler_prepare +Handler_read_first +Handler_read_key +Handler_read_next +Handler_read_prev +Handler_read_rnd +Handler_read_rnd_next +Handler_rollback +Handler_savepoint +Handler_savepoint_rollback +Handler_update +Handler_write +Innodb_buffer_pool_pages_data +Innodb_buffer_pool_pages_dirty +Innodb_buffer_pool_pages_flushed +Innodb_buffer_pool_pages_free +Innodb_buffer_pool_pages_misc +Innodb_buffer_pool_pages_total +Innodb_buffer_pool_read_ahead_rnd +Innodb_buffer_pool_read_ahead_seq +Innodb_buffer_pool_read_requests +Innodb_buffer_pool_reads +Innodb_buffer_pool_wait_free +Innodb_buffer_pool_write_requests +Innodb_data_fsyncs +Innodb_data_pending_fsyncs +Innodb_data_pending_reads +Innodb_data_pending_writes +Innodb_data_read +Innodb_data_reads +Innodb_data_writes +Innodb_data_written +Innodb_dblwr_pages_written +Innodb_dblwr_writes +Innodb_log_waits +Innodb_log_write_requests +Innodb_log_writes +Innodb_os_log_fsyncs +Innodb_os_log_pending_fsyncs +Innodb_os_log_pending_writes +Innodb_os_log_written +Innodb_page_size +Innodb_pages_created +Innodb_pages_read +Innodb_pages_written +Innodb_row_lock_current_waits +Innodb_row_lock_time +Innodb_row_lock_time_avg +Innodb_row_lock_time_max +Innodb_row_lock_waits +Innodb_rows_deleted +Innodb_rows_inserted +Innodb_rows_read +Innodb_rows_updated +Key_blocks_not_flushed +Key_blocks_unused +Key_blocks_used +Key_read_requests +Key_reads +Key_write_requests +Key_writes +Last_query_cost +Max_used_connections +Ndb_cluster_node_id +Ndb_config_from_host +Ndb_config_from_port +Ndb_number_of_data_nodes +Not_flushed_delayed_rows +Open_files +Open_streams +Open_tables +Opened_tables +Prepared_stmt_count +Qcache_free_blocks +Qcache_free_memory +Qcache_hits +Qcache_inserts +Qcache_lowmem_prunes +Qcache_not_cached +Qcache_queries_in_cache +Qcache_total_blocks +Questions +Rpl_status +Select_full_join +Select_full_range_join +Select_range +Select_range_check +Select_scan +Slave_open_temp_tables +Slave_retried_transactions +Slave_running +Slow_launch_threads +Slow_queries +Sort_merge_passes +Sort_range +Sort_rows +Sort_scan +Ssl_accept_renegotiates +Ssl_accepts +Ssl_callback_cache_hits +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects +Ssl_connect_renegotiates +Ssl_ctx_verify_depth +Ssl_ctx_verify_mode +Ssl_default_timeout +Ssl_finished_accepts +Ssl_finished_connects +Ssl_session_cache_hits +Ssl_session_cache_misses +Ssl_session_cache_mode +Ssl_session_cache_overflows +Ssl_session_cache_size +Ssl_session_cache_timeouts +Ssl_sessions_reused +Ssl_used_session_cache_entries +Ssl_verify_depth +Ssl_verify_mode +Ssl_version +Table_locks_immediate +Table_locks_waited +Tc_log_max_pages_used +Tc_log_page_size +Tc_log_page_waits +Threads_cached +Threads_connected +Threads_created +Threads_running +Uptime +*/ diff --git a/scripts/mysql.trap.php.conf b/scripts/mysql.trap.php.conf new file mode 100644 index 0000000..54e7e51 --- /dev/null +++ b/scripts/mysql.trap.php.conf @@ -0,0 +1,14 @@ + + + 2.0 + 2013-06-18T21:30:12Z + + + Templates + + + + + + + + {Template Apache:proc.num[{$APACHE_BIN}].last(0)}<1 | {Template Apache:net.tcp.listen[80].last(0)}=0 + Web server is down on {HOST.NAME} + + 0 + 5 + + 0 + + + + + + Apache Thread Scoreboard + 900 + 200 + 0.0000 + 100.0000 + 0 + 0 + 1 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 3 + 1 + 888888 + 0 + 2 + 0 + + Template Apache + apache[DNSLookup] + + + + 6 + 1 + FF9999 + 0 + 2 + 0 + + Template Apache + apache[ReadingRequest] + + + + 9 + 1 + CC3232 + 0 + 2 + 0 + + Template Apache + apache[Logging] + + + + 4 + 1 + BB00BB + 0 + 2 + 0 + + Template Apache + apache[GracefullyFinishing] + + + + 1 + 1 + 00EE00 + 0 + 2 + 0 + + Template Apache + apache[SendingReply] + + + + 8 + 1 + 777700 + 0 + 2 + 0 + + Template Apache + apache[ClosingConnection] + + + + 0 + 1 + 009900 + 0 + 2 + 0 + + Template Apache + apache[WaitingForConnection] + + + + 2 + 1 + 0000EE + 0 + 2 + 0 + + Template Apache + apache[StartingUp] + + + + 7 + 1 + 00DDDD + 0 + 2 + 0 + + Template Apache + apache[KeepAlive] + + + + 5 + 1 + 000000 + 0 + 2 + 0 + + Template Apache + apache[IdleCleanupOfWorker] + + + + + + diff --git a/templates/Cron.xml b/templates/Cron.xml new file mode 100644 index 0000000..d6f764b --- /dev/null +++ b/templates/Cron.xml @@ -0,0 +1,88 @@ + + + 2.0 + 2013-06-18T21:30:40Z + + + Templates + + + + + + + + {Template Cron:proc.num[{$CROND}].avg(600)}<1 + Cron is not running on {HOST.NAME} + + 0 + 4 + + 0 + + + + diff --git a/templates/Gearman.xml b/templates/Gearman.xml new file mode 100644 index 0000000..a3d160e --- /dev/null +++ b/templates/Gearman.xml @@ -0,0 +1,498 @@ + + + 2.0 + 2013-06-18T21:30:59Z + + + Templates + + + + + + + + {Template Gearman:gearman.proc.running.avg(120)}<{Template Gearman:gearman.proc.total.last(0)} + GearmanD process(s) on {HOST.NAME} are down + + 0 + 4 + There are 1 or more Gearman Server processes not running on {HOST.NAME}. The result of this could cause MemberFuse instances to fail to work because they depend on connectivity to the Gearman Servers. + +Manual recovery involves logging into the expected server and insuring that all gearmand processes are running as expected. + 0 + + + + {Template Gearman:proc.num[python,,,supervisord].avg(120)}<1 + SupervisorD not running on {HOST.NAME} + + 0 + 3 + + 0 + + + + diff --git a/templates/Memcached.xml b/templates/Memcached.xml new file mode 100644 index 0000000..91df555 --- /dev/null +++ b/templates/Memcached.xml @@ -0,0 +1,1245 @@ + + + 2.0 + 2013-06-18T21:27:49Z + + + Templates + + + + + + + + {Template Memcache:net.tcp.service[tcp,,11211].last(0)}=0 + Memcache service is down on {HOSTNAME} + + 0 + 4 + + 0 + + + + + + Connections per second + 900 + 200 + 0.0000 + 100.0000 + 0 + 0 + 0 + 1 + 0 + 0.0000 + 0.0000 + 1 + 0 + 0 + 0 + + + 0 + 2 + 009900 + 0 + 2 + 0 + + Template Memcache + memcache[total_connections] + + + + + + Current items + 900 + 200 + 0.0000 + 100.0000 + 0 + 0 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 2 + 009900 + 0 + 2 + 0 + + Template Memcache + memcache[curr_items] + + + + + + Current open connections + 900 + 200 + 0.0000 + 100.0000 + 0 + 0 + 0 + 1 + 0 + 0.0000 + 0.0000 + 1 + 0 + 0 + 0 + + + 0 + 2 + 009900 + 0 + 2 + 0 + + Template Memcache + memcache[curr_connections] + + + + + + Evictions + 900 + 200 + 0.0000 + 100.0000 + 0 + 0 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 2 + 990000 + 0 + 2 + 0 + + Template Memcache + memcache[evictions] + + + + + + Items per second + 900 + 200 + 0.0000 + 100.0000 + 0 + 0 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 2 + 009900 + 0 + 2 + 0 + + Template Memcache + memcache[total_items] + + + + + + Network traffic + 900 + 200 + 0.0000 + 100.0000 + 0 + 0 + 0 + 1 + 0 + 0.0000 + 0.0000 + 1 + 0 + 0 + 0 + + + 1 + 2 + 990000 + 0 + 2 + 0 + + Template Memcache + memcache[bytes_written] + + + + 0 + 2 + 009900 + 0 + 2 + 0 + + Template Memcache + memcache[bytes_read] + + + + + + Requests per second + 900 + 200 + 0.0000 + 100.0000 + 0 + 0 + 0 + 1 + 0 + 0.0000 + 0.0000 + 1 + 0 + 0 + 0 + + + 0 + 2 + 009900 + 0 + 2 + 0 + + Template Memcache + memcache[cmd_get] + + + + 1 + 2 + 990000 + 0 + 2 + 0 + + Template Memcache + memcache[cmd_set] + + + + + + Resource usage + 900 + 200 + 0.0000 + 100.0000 + 0 + 0 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 1 + 2 + 000099 + 0 + 2 + 0 + + Template Memcache + memcache[rusage_system] + + + + 0 + 2 + 009900 + 0 + 2 + 0 + + Template Memcache + memcache[rusage_user] + + + + + + Retrieval hit and miss per second + 900 + 200 + 0.0000 + 100.0000 + 0 + 0 + 0 + 1 + 0 + 0.0000 + 0.0000 + 1 + 0 + 0 + 0 + + + 0 + 2 + 009900 + 0 + 2 + 0 + + Template Memcache + memcache[get_hits] + + + + 1 + 2 + 990000 + 0 + 2 + 0 + + Template Memcache + memcache[get_misses] + + + + + + Storage usage + 900 + 200 + 0.0000 + 0.0000 + 0 + 0 + 0 + 1 + 0 + 0.0000 + 0.0000 + 1 + 0 + 0 + 0 + + + 0 + 1 + 009900 + 0 + 2 + 0 + + Template Memcache + memcache[limit_maxbytes] + + + + 1 + 1 + 990000 + 0 + 2 + 0 + + Template Memcache + memcache[bytes] + + + + + + diff --git a/templates/MySQL-Master.xml b/templates/MySQL-Master.xml new file mode 100644 index 0000000..75a0e76 --- /dev/null +++ b/templates/MySQL-Master.xml @@ -0,0 +1,188 @@ + + + 2.0 + 2013-06-18T21:31:27Z + + + Templates + + + + + + diff --git a/templates/MySQL-Server.xml b/templates/MySQL-Server.xml new file mode 100644 index 0000000..ca3a4b9 --- /dev/null +++ b/templates/MySQL-Server.xml @@ -0,0 +1,7926 @@ + + + 2.0 + 2013-06-18T21:28:45Z + + + Templates + + + + + + + + {Template MySQL Server:mysql.secure_auth.last(0)}=0 + MySQL: Accounts with old passwords on {HOSTNAME} + + 0 + 2 + You should not allow users to authenticate with old passwords. Make sure secure_auth=1 in my.cnf + 0 + + + + {Template MySQL Server:mysql.Anonymous_accounts_count.last(0)}>0 + MySQL: Anonymous users allowed on {HOSTNAME} + + 0 + 3 + Some accounts are present without usernames. This allows anonymous access. Consider removing these. + 0 + + + + {Template MySQL Server:mysql.log_bin.last(0)}=0 + MySQL: Binary log is not enabled on {HOSTNAME} + + 0 + 1 + Binlog provides point-in-time recovery. You probably want this enabled. + 0 + + + + {Template MySQL Server:mysql.sync_binlog.last(0)}=0 + MySQL: Binlog is not sync'd to disk after each write on {HOSTNAME} + + 1 + 1 + Setting sync_binlog=1 is slower, but insures you can recover from crashes and failures. + 0 + + + + {Template MySQL Server:mysql.Percent_transactions_saved_tmp_file.last(0)}>30 + MySQL: Binlog_cache_size too low ({ITEM.LASTVALUE}% written to disk) on {HOSTNAME} + + 0 + 4 + Binlog_cache_size too low. Increase the binlog_cache_size variable in my.cnf + 0 + + + + {Template MySQL Server:mysql.Percent_transactions_saved_tmp_file.last(0)}>10 + MySQL: Binlog_cache_size too low ({ITEM.LASTVALUE}% written to disk) on {HOSTNAME} + + 0 + 2 + Binlog_cache_size too low. Increase the binlog_cache_size variable in my.cnf + 0 + + + + {Template MySQL Server:mysql.Change_innodb_additional_mem_pool_size.last(0)}=1 + MySQL: Change the innodb_additional_mem_pool_size on {HOSTNAME} + + 1 + 1 + Review Suggested_innodb_additional_mem_pool_size to determine the best setting + 0 + + + + {Template MySQL Server:mysql.Change_innodb_log_buffer_size.last(0)}=1 + MySQL: Change the innodb_log_buffer_size on {HOSTNAME} + + 1 + 1 + Review Suggested_innodb_log_buffer_size to determine the best setting + 0 + + + + {Template MySQL Server:mysql.Change_innodb_log_file_size.last(0)}=1 + MySQL: Change the innodb_log_file_size on {HOSTNAME} + + 1 + 1 + Review Suggested_innodb_log_file_size to determine the best setting + 0 + + + + {Template MySQL Server:mysql.Change_key_buffer_size.last(0)}=1 + MySQL: Change the key_buffer_size on {HOSTNAME} + + 1 + 1 + Review Suggested_key_buffer_size to determine the best setting + 0 + + + + {Template MySQL Server:mysql.Change_myisam_sort_buffer_size.last(0)}=1 + MySQL: Change the myisam_sort_buffer_size on {HOSTNAME} + + 1 + 1 + Review Suggested_myisam_sort_buffer_size to determine the best setting + 0 + + + + {Template MySQL Server:mysql.Change_query_cache_size.last(0)}=1 + MySQL: Change the query_cache_size on {HOSTNAME} + + 1 + 1 + Review Suggested_query_cache_size to determine the best setting + 0 + + + + {Template MySQL Server:mysql.Change_read_buffer_size.last(0)}=1 + MySQL: Change the read_buffer_size on {HOSTNAME} + + 1 + 1 + Review Suggested_read_buffer_size to determine the best setting + 0 + + + + {Template MySQL Server:mysql.Change_read_rnd_buffer_size.last(0)}=1 + MySQL: Change the read_rnd_buffer_size on {HOSTNAME} + + 1 + 1 + Review Suggested_read_rnd_buffer_size to determine the best setting + 0 + + + + {Template MySQL Server:mysql.Change_sort_buffer_size.last(0)}=1 + MySQL: Change the sort_buffer_size on {HOSTNAME} + + 1 + 1 + Review Suggested_sort_buffer_size to determine the best setting + 0 + + + + {Template MySQL Server:mysql.Change_table_cache.last(0)}=1 + MySQL: Change the table_cache on {HOSTNAME} + + 1 + 1 + Review Suggested_table_cache to determine the best setting + 0 + + + + {Template MySQL Server:mysql.Change_tmp_table_size.last(0)}=1 + MySQL: Change the tmp_table_size on {HOSTNAME} + + 1 + 1 + Review Suggested_tmp_table_size to determine the best setting + 0 + + + + {Template MySQL Server:mysql.Excessive_revokes.last(0)}>0 + MySQL: Excessive recent revokes on {HOSTNAME} + + 1 + 2 + This is normal for development, but rare for production. Investigave via the binary logs. + 0 + + + + {Template MySQL Server:mysql.Percent_tmp_tables_on_disk.last(0)}>25 + MySQL: Excessive tmp disk tables created on {HOSTNAME} + + 1 + 2 + Perhaps you should increase your tmp_table_size and/or max_heap_table_size to reduce the tables created on disk. + 0 + + + + {Template MySQL Server:mysql.Percent_innodb_cache_hit_rate.last(0)}<95 + MySQL: InnoDB Cache Hit Rate ({ITEM.LASTVALUE}%) on {HOSTNAME} + + 0 + 2 + You want most InnoDB transactions to be from memory, to keep this percentage high. Start by increasing innodb_buffer_pool_size (can be 75/85% memory in InnoDB only installs). + 0 + + + + {Template MySQL Server:mysql.Percent_innodb_cache_hit_rate.last(0)}<85 + MySQL: InnoDB Cache Hit Rate ({ITEM.LASTVALUE}%) on {HOSTNAME} + + 0 + 4 + You want most InnoDB transactions to be from memory, to keep this percentage high. Start by increasing innodb_buffer_pool_size (can be 75/85% memory in InnoDB only installs). + 0 + + + + {Template MySQL Server:mysql.innodb_flush_log_at_trx_commit.last(0)}#2 + MySQL: InnoDB log flush status on {HOSTNAME} + + 1 + 1 + Your innodb_flush_log_at_trx_commit is not "2" now. Default value of 1 will mean each update transaction commit (or each statement outside of transaction) will need to flush log to the disk which is rather expensive, especially if you do not have Battery backed up cache. Many applications, especially those moved from MyISAM tables are OK with value 2 which means do not flush log to the disk but only flush it to OS cache. The log is still flushed to the disk each second so you normally would not loose more than 1-2 sec worth of updates. Value 0 is a bit faster but is a bit less secure as you can lose transactions even in case MySQL Server crashes. Value 2 only cause data loss with full OS crash. Adjust innodb_flush_log_at_trx_commit in your my.cnf accordingly. + 0 + + + + {Template MySQL Server:mysql.Joins_without_indexes_per_day.last(0)}>100 + MySQL: Joins without indices on {HOSTNAME} + + 1 + 3 + >100 joins/day don't use indices. Consider increasing join_buffer_size or always use indices to improve. + 0 + + + + {Template MySQL Server:mysql.local_infile.last(0)}=1 + MySQL: LOAD DATA LOCAL allowed on {HOSTNAME} + + 0 + 1 + There are numerous security risks with 'LOAD DATA LOCAL' commands. Consider setting local-infile=0 in your my.cnf file. + 0 + + + + {Template MySQL Server:mysql.expire_logs_days.last(0)}=0 + MySQL: Logs are not set to expire on {HOSTNAME} + + 1 + 1 + You have not set expire_logs_days in your my.cnf file. With this, the mysqld will retain the entire binary log until RESET MASTER or PURGE MASTER LOGS commands are run manually. Setting expire_logs_days will allow you to remove old binary logs automatically + 0 + + + + {Template MySQL Server:mysql.long_query_time.last(0)}>2 + MySQL: Long query time is high on {HOSTNAME} + + 1 + 1 + Your long query time is high now. <5s is recommended. Set long_query_time=2 to start with. + 0 + + + + {Template MySQL Server:mysql.Percent_myisam_key_cache_hit_rate.last(0)}<85 + MySQL: MyISAM: Key Cache Hit Rate ({ITEM.LASTVALUE}%) on {HOSTNAME} + + 1 + 4 + Most MyISAM activity should hit the Key Cache. If this falls low, increase key_buffer_size. + 0 + + + + {Template MySQL Server:mysql.Percent_myisam_key_cache_hit_rate.last(0)}<95 + MySQL: MyISAM: Key Cache Hit Rate ({ITEM.LASTVALUE}%) on {HOSTNAME} + + 1 + 2 + Most MyISAM activity should hit the Key Cache. If this falls low, increase key_buffer_size. + 0 + + + + {Template MySQL Server:mysql.myisam_recover_options.last(0)}=0 + MySQL: MyISAM auto recovery not enabled on {HOSTNAME} + + 0 + 1 + You probably want MyISAM auto-recovery enabled, especially if you have a lot of small MyISAM tables. Corrupted tables can cause damage, and this is a reasonable compromise. Set myisam-recover=BACKUP,FORCE in your my.cnf file. + 0 + + + + {Template MySQL Server:mysql.Com_grant.last(0)}>0 + MySQL: New GRANTs have been given on {HOSTNAME} + + 1 + 2 + This is normal for development, but rare for production. Investigave via the binary logs. + 0 + + + + {Template MySQL Server:mysql.Percent_full_table_scans.last(0)}>{$PERCENTFULLSCAN.CRIT} + MySQL: Percentage of queries ({ITEM.LASTVALUE}%) scanning full tables on {HOSTNAME} + + 1 + 4 + Ratio of the number of rows read via full table scans to the sum of all handler variables (which denotes all row accesses). A high value indicates excessive table scans. You should examine tables and queries for proper use of indexes. Turn on the slow query log, identify the queries using full table scan and tune it. + 0 + + + + {Template MySQL Server:mysql.Percent_full_table_scans.last(0)}>{$PERCENTFULLSCAN.WARN} + MySQL: Percentage of queries ({ITEM.LASTVALUE}%) scanning full tables on {HOSTNAME} + + 1 + 2 + Should be kept as low as possible. Use indexes or the slow query log to analyze. + 0 + + + + {Template MySQL Server:mysql.Percent_aborted_connections.last(0)}>25 + MySQL: Percent of connections ({ITEM.LASTVALUE}%) aborted on {HOSTNAME} + + 0 + 2 + A large number of connections are getting aborted. Look for users/apps using incorrect passwords or from unauthorized hosts. Check connect_timeout too low. Set log_warnings=2 to force logging of offenders. + 0 + + + + {Template MySQL Server:mysql.Percent_aborted_connections.last(0)}>30 + MySQL: Percent of connections ({ITEM.LASTVALUE}%) aborted on {HOSTNAME} + + 0 + 4 + A large number of connections are getting aborted. Look for users/apps using incorrect passwords or from unauthorized hosts. Check connect_timeout too low. Set log_warnings=2 to force logging of offenders. + 0 + + + + {Template MySQL Server:mysql.Percent_innodb_cache_write_waits_required.last(0)}>0.01 + MySQL: Percent of InnoDB cache writes ({ITEM.LASTVALUE}%) that had to wait on {HOSTNAME} + + 0 + 2 + For best performance, InnoDB should never have to wait to write to the buffer pool. Increase innodb_buffer_pool_size and monitor. + 0 + + + + {Template MySQL Server:mysql.Percent_innodb_cache_write_waits_required.last(0)}>0.1 + MySQL: Percent of InnoDB cache writes ({ITEM.LASTVALUE}%) that had to wait on {HOSTNAME} + + 0 + 4 + For best performance, InnoDB should never have to wait to write to the buffer pool. Increase innodb_buffer_pool_size and monitor. + 0 + + + + {Template MySQL Server:mysql.Percent_connections_used.last(0)}>75 + MySQL: Percent total connections ({ITEM.LASTVALUE}%) used on {HOSTNAME} + + 0 + 2 + Using over 75% of the max_connections. Consider increasing. + 0 + + + + {Template MySQL Server:mysql.Percent_connections_used.last(0)}>85 + MySQL: Percent total connections ({ITEM.LASTVALUE}%) used on {HOSTNAME} + + 0 + 4 + Using over 85% of the max_connections. Consider increasing. + 0 + + + + {Template MySQL Server:mysql.Qcache_lowmem_prunes_per_day.last(0)}>100 + MySQL: Queries pruning frequently on {HOSTNAME} + + 1 + 3 + >100 queries are being pruned/day from your query cache. Consider increasing your query cache to improve. + 0 + + + + {Template MySQL Server:mysql.Percent_tmp_sort_tables.last(0)}>100 + MySQL: Queries require tmp sort table on {HOSTNAME} + + 0 + 3 + >100% queries require a temporary sort table. Consider increasing sort_buffer_size and read_rnd_buffer_size to improve. + 0 + + + + {Template MySQL Server:mysql.Percent_query_cache_fragmentation.last(0)}>20 + MySQL: Query cache fragmented > 20% on {HOSTNAME} + + 1 + 1 + Binlog provides point-in-time recovery. You probably want this enabled. + 0 + + + + {Template MySQL Server:mysql.Percent_query_cache_hit_rate.last(0)}<20 + MySQL: Query cache hit rate low on {HOSTNAME} + + 0 + 3 + Your query_cache efficiency is <20%. Consider increasing your query cache to improve. + 0 + + + + {Template MySQL Server:mysql.have_query_cache.last(0)}=0 + MySQL: Query cache is not enabled on {HOSTNAME} + + 0 + 1 + Settings for my.cnf: query_cache_type=1, query_cache_size=25% of total RAM, and query_cache_limit=1048576 (1-2MB) + 0 + + + + {Template MySQL Server:mysql.Percent_query_cache_pruned_from_inserts.last(0)}>15 + MySQL: Query cache pruned ({ITEM.LASTVALUE}%) due to memory on {HOSTNAME} + + 1 + 2 + Query cache pruning due to memory at >15%. Increase the query_cache_size when this starts to hit + 0 + + + + {Template MySQL Server:mysql.Percent_query_cache_pruned_from_inserts.last(0)}>20 + MySQL: Query cache pruned ({ITEM.LASTVALUE}%) due to memory on {HOSTNAME} + + 1 + 4 + Query cache pruning due to memory at >20%. Increase the query_cache_size when this starts to hit + 0 + + + + {Template MySQL Server:mysql.Root_accounts_count.last(0)}>0 + MySQL: Root account present on {HOSTNAME} + + 1 + 1 + A user account named 'root' is really not needed, especially if the default 'root' with super-user privileges is still present. + 0 + + + + {Template MySQL Server:mysql.Is_root_without_password.last(0)}=1 + MySQL: Root has no password on {HOSTNAME} + + 0 + 3 + Root has no password. This is a big security risk. + 0 + + + + {Template MySQL Server:mysql.Is_root_remote_login_enabled.last(0)}=1 + MySQL: Root remote login enabled on {HOSTNAME} + + 1 + 3 + Root may log in remotely. This is a big security risk. + 0 + + + + {Template MySQL Server:mysql.old_passwords.last(0)}=1 + MySQL: Server generates old passwords on {HOSTNAME} + + 0 + 2 + The server is always generating old passwords. Remove old_passwords from your my.cnf + 0 + + + + {Template MySQL Server:mysql.skip_show_database.last(0)}=0 + MySQL: SHOW DATABASES is enabled on {HOSTNAME} + + 0 + 2 + This is ok for development, but a security risk for production. Add skip_show_database to your my.cnf file. + 0 + + + + {Template MySQL Server:mysql.have_symlink.last(0)}=1 + MySQL: Symlinks are enabled on {HOSTNAME} + + 0 + 2 + This is ok for development, but a security risk for production. Add skip-symbolic-links to your my.cnf file. + 0 + + + + {Template MySQL Server:mysql.Percent_table_cache_hit_rate.last(0)}<95 + MySQL: Table cache hit rate ({ITEM.LASTVALUE}%) is low on {HOSTNAME} + + 1 + 3 + Opening tables can be expensive. For example MyISAM tables mark MYI header to mark table as currently in use. You do not want this to happen so frequently and it is typically best to size your cache so it is large enough to keep most of your tables open. It uses some OS resources and some memory but for modern hardware it is typically not the problem. 1024 is good value for applications with couple hundreds tables (remember each connection needs its own entry) if you have many connections or many tables increase it larger. + 0 + + + + {Template MySQL Server:mysql.Percent_table_lock_contention.last(0)}>30 + MySQL: Table lock contention ({ITEM.LASTVALUE}%) is degrading performance on {HOSTNAME} + + 0 + 2 + Table lock contention at >30%. Look for LOCK TABLES using SHOW PROCESS LIST + 0 + + + + {Template MySQL Server:mysql.Percent_table_lock_contention.last(0)}>60 + MySQL: Table lock contention ({ITEM.LASTVALUE}%) is degrading performance on {HOSTNAME} + + 0 + 4 + Table lock contention at >60%. Look for LOCK TABLES using SHOW PROCESS LIST + 0 + + + + {Template MySQL Server:mysql.Fragmented_table_count.last(0)}>{$FRAGTABLES.WARN} + MySQL: Tables are fragmented on {HOSTNAME} + + 0 + 3 + You have {ITEM.LASTVALUE} tables fragmented. Please optimize. + 0 + + + + {Template MySQL Server:mysql.Percent_tmp_tables_on_disk.last(0)}>75 + MySQL: Temp tables using disk ({ITEM.LASTVALUE}%) on {HOSTNAME} + + 0 + 4 + Disk usage for tmp tables now at >75%. Change tmp_table_size or max_heap_table_size so that tables can be create in-memory more + 0 + + + + {Template MySQL Server:mysql.Percent_tmp_tables_on_disk.last(0)}>50 + MySQL: Temp tables using disk ({ITEM.LASTVALUE}%) on {HOSTNAME} + + 0 + 2 + Disk usage for tmp tables now at >50%. Change tmp_table_size or max_heap_table_size so that tables can be create in-memory more + 0 + + + + {Template MySQL Server:mysql.Percent_thread_cache_hit_rate.last(0)}<93 + MySQL: Thread cache hit ratio ({ITEM.LASTVALUE}%) falling on {HOSTNAME} + + 0 + 2 + Threads are starting to miss Thread Cache. Consider increasing thread_cache_sizeto improve + 0 + + + + {Template MySQL Server:mysql.Percent_thread_cache_hit_rate.last(0)}<90 + MySQL: Thread cache hit ratio ({ITEM.LASTVALUE}%) falling on {HOSTNAME} + + 0 + 4 + Threads are starting to miss Thread Cache (now at ITEM.LASTVALUE}%). Consider increasing thread_cache_sizeto improve + 0 + + + + {Template MySQL Server:mysql.Percent_files_open.last(0)}>85 + MySQL: Too many files open on {HOSTNAME} + + 0 + 3 + >85% of files are open. Consider increasing open_files_limit to improve. + 0 + + + + {Template MySQL Server:mysql.Threads_running.last(0)}>24 + MySQL: Too many threads ({ITEM.LASTVALUE}) running on {HOSTNAME} + + 0 + 4 + Too many active threads indicate a heavy load. Look for unoptimized queries and large result sets frequently being returned. + 0 + + + + {Template MySQL Server:mysql.Threads_running.last(0)}>19 + MySQL: Too many threads ({ITEM.LASTVALUE}) running on {HOSTNAME} + + 0 + 2 + Too many active threads indicate a heavy load. Look for unoptimized queries and large result sets frequently being returned. + 0 + + + + {Template MySQL Server:mysql.Accounts_with_broad_host_specifier.last(0)}>0 + MySQL: Users have blank or wildcard hosts on {HOSTNAME} + + 1 + 3 + Users without a host or users with a host of '%' only are security risks. Consider specifying valid hosts for these users. + 0 + + + + {Template MySQL Server:mysql.Accounts_without_password.last(0)}>0 + MySQL: Users without passwords on {HOSTNAME} + + 0 + 2 + Users without passwords is a big security risk. Please consider assigning passwords on these accounts. + 0 + + + + {Template MySQL Server:mysql.sql_mode.last(0)}=0 + MySQL: Validation (sql_mode) is not enabled on {HOSTNAME} + + 0 + 1 + Utilize MySQL sql validation by setting the sql_mode variable in my.cnf to one of the following: TRADITIONAL, STRICT_TRANS_TABLES, STRICT_ALL_TABLES. + 0 + + + + {Template MySQL Server:proc.num[mysqld].avg(120)}=0 + MySQL is not running on {HOST.NAME} + + 0 + 5 + + 0 + + + + diff --git a/templates/MySQL-Slave.xml b/templates/MySQL-Slave.xml new file mode 100644 index 0000000..126f6a3 --- /dev/null +++ b/templates/MySQL-Slave.xml @@ -0,0 +1,708 @@ + + + 2.0 + 2013-06-18T21:29:06Z + + + Templates + + + + + + + + {Template MySQL Slave Server:mysql.Slave_IO_Running.last(0)}=0 + Replication I/O slave not running + + 0 + 5 + Replication I/O slave has stopped. Check why slave cannot contact the host. + 0 + + + + {Template MySQL Slave Server:mysql.Seconds_Behind_Master.last(0)}>600 + Replication slave is too far behind master + + 0 + 4 + The slave is getting too far behind the master (now at {ITEM.LASTVALUE} secs). Data on the slave is losing it's real-time value. + 0 + + + + {Template MySQL Slave Server:mysql.Seconds_Behind_Master.last(0)}>450 + Replication slave is too far behind master + + 0 + 2 + The slave is getting too far behind the master (now at {ITEM.LASTVALUE} secs). Data on the slave is losing it's real-time value. + 0 + + + + {Template MySQL Slave Server:mysql.Slave_running.last(0)}=0 + Replication slave not running + + 0 + 5 + Replication slave has stopped + 0 + + + + {Template MySQL Slave Server:mysql.Slave_SQL_Running.last(0)}=0 + Replication SQL slave not running + + 0 + 5 + Replication SQL slave has stopped. Check the binary logs to find the statement that stopped replication. + 0 + + + + diff --git a/templates/OS_Linux.xml b/templates/OS_Linux.xml new file mode 100644 index 0000000..498a3c8 --- /dev/null +++ b/templates/OS_Linux.xml @@ -0,0 +1,2435 @@ + + + 2.0 + 2013-06-18T21:29:31Z + + + Templates + + + + + + + + {Template OS Linux:vfs.file.cksum[/etc/passwd].diff(0)}>0 + /etc/passwd has been changed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template OS Linux:ads.group.check.avg(300)}#1 + Active Directory Client Failing on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template OS Linux:kernel.maxfiles.last(0)}<1024 + Configured max number of opened files is too low on {HOST.NAME} + + 0 + 1 + + 0 + + + + {Template OS Linux:kernel.maxproc.last(0)}<256 + Configured max number of processes is too low on {HOST.NAME} + + 0 + 1 + + 0 + + + + {Template OS Linux:system.cpu.util[,iowait].last(0)}>20 + Disk I/O is overloaded on {HOST.NAME} + + 0 + 2 + OS spends significant time waiting for I/O (input/output) operations. It could be indicator of performance issues with storage system. + 0 + + + + {Template OS Linux:system.uname.diff(0)}>0 + Host information was changed on {HOST.NAME} + + 0 + 1 + + 0 + + + + {Template OS Linux:system.hostname.diff(0)}>0 + Hostname was changed on {HOST.NAME} + + 0 + 1 + + 0 + + + + {Template OS Linux:vm.memory.size[available].last(0)}<80M + Lack of available memory on server {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template OS Linux:system.swap.size[,pfree].last(0)}<50 + Lack of free swap space on {HOST.NAME} + + 0 + 2 + It probably means that the systems requires more physical memory. + 0 + + + + {Template OS Linux:system.cpu.load[percpu,avg1].last(0)}>5 + Processor load is too high on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template OS Linux:proc.num[].last(0)}>300 + Too many processes on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template OS Linux:proc.num[,,run].last(0)}>30 + Too many processes running on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template OS Linux:system.uptime.change(0)}<0 + {HOST.NAME} has just been restarted + + 0 + 1 + + 0 + + + + + + CPU jumps + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 2 + 0 + 000099 + 0 + 2 + 0 + + Template OS Linux + system.cpu.intr + + + + 1 + 0 + 009900 + 0 + 2 + 0 + + Template OS Linux + system.cpu.switches + + + + + + CPU load + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 1 + 0 + 0 + 0 + + + 1 + 0 + 000099 + 0 + 2 + 0 + + Template OS Linux + system.cpu.load[percpu,avg5] + + + + 2 + 0 + 990000 + 0 + 2 + 0 + + Template OS Linux + system.cpu.load[percpu,avg15] + + + + 0 + 0 + 009900 + 0 + 2 + 0 + + Template OS Linux + system.cpu.load[percpu,avg1] + + + + + + CPU utilization + 900 + 200 + 0.0000 + 100.0000 + 1 + 0 + 1 + 1 + 0 + 0.0000 + 0.0000 + 1 + 1 + 0 + 0 + + + 4 + 1 + 990099 + 0 + 2 + 0 + + Template OS Linux + system.cpu.util[,nice] + + + + 5 + 1 + 999900 + 0 + 2 + 0 + + Template OS Linux + system.cpu.util[,iowait] + + + + 2 + 1 + 55FF55 + 0 + 2 + 0 + + Template OS Linux + system.cpu.util[,softirq] + + + + 6 + 1 + 990000 + 0 + 2 + 0 + + Template OS Linux + system.cpu.util[,system] + + + + 8 + 1 + 009900 + 0 + 2 + 0 + + Template OS Linux + system.cpu.util[,idle] + + + + 7 + 1 + 000099 + 0 + 2 + 0 + + Template OS Linux + system.cpu.util[,user] + + + + 3 + 1 + 009999 + 0 + 2 + 0 + + Template OS Linux + system.cpu.util[,interrupt] + + + + 1 + 1 + FF5555 + 0 + 2 + 0 + + Template OS Linux + system.cpu.util[,steal] + + + + + + Memory Utilization + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 2 + 2 + + Template OS Linux + vm.memory.size[total] + + + Template OS Linux + vm.memory.size[total] + + + + 3 + 5 + EE0000 + 0 + 2 + 0 + + Template OS Linux + vm.memory.size[free] + + + + 0 + 5 + 00DD00 + 0 + 2 + 0 + + Template OS Linux + vm.memory.size[total] + + + + 4 + 5 + 0000EE + 0 + 2 + 0 + + Template OS Linux + vm.memory.size[buffers] + + + + 1 + 5 + 00EEEE + 0 + 2 + 0 + + Template OS Linux + vm.memory.size[available] + + + + 2 + 5 + EEEE00 + 0 + 2 + 0 + + Template OS Linux + vm.memory.size[cached] + + + + + + Swap usage + 600 + 340 + 0.0000 + 0.0000 + 0 + 0 + 2 + 1 + 1 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 0 + AA0000 + 0 + 2 + 2 + + Template OS Linux + system.swap.size[,total] + + + + 1 + 0 + 00AA00 + 0 + 2 + 0 + + Template OS Linux + system.swap.size[,free] + + + + + + diff --git a/templates/Template_JMX_Generic.xml b/templates/Template_JMX_Generic.xml new file mode 100644 index 0000000..4866300 --- /dev/null +++ b/templates/Template_JMX_Generic.xml @@ -0,0 +1,2730 @@ + + + 2.0 + 2013-06-20T19:02:15Z + + + Templates + + + + + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.used].last(0)}>({Template JMX Generic:jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.max].last(0)}*0.7) + 70% mp CMS Old Gen used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.used].last(0)}>({Template JMX Generic:jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.max].last(0)}*0.7) + 70% mp CMS Perm Gen used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.used].last(0)}>({Template JMX Generic:jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.max].last(0)}*0.7) + 70% mp Code Cache used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.used].last(0)}>({Template JMX Generic:jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.max].last(0)}*0.7) + 70% mp Perm Gen used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.used].last(0)}>({Template JMX Generic:jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.max].last(0)}*0.7) + 70% mp PS Old Gen used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.used].last(0)}>({Template JMX Generic:jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.max].last(0)}*0.7) + 70% mp PS Perm Gen used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.used].last(0)}>({Template JMX Generic:jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.max].last(0)}*0.7) + 70% mp Tenured Gen used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=OperatingSystem",OpenFileDescriptorCount].last(0)}>({Template JMX Generic:jmx["java.lang:type=OperatingSystem",MaxFileDescriptorCount].last(0)}*0.7) + 70% os Opened File Descriptor Count used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=GarbageCollector,name=ParNew",CollectionCount].last(0)}<{Template JMX Generic:jmx["java.lang:type=GarbageCollector,name=ConcurrentMarkSweep",CollectionCount].last(0)} + gc Concurrent Mark Sweep in fire fighting mode on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=GarbageCollector,name=Copy",CollectionCount].last(0)}<{Template JMX Generic:jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact",CollectionCount].last(0)} + gc Mark Sweep Compact in fire fighting mode on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=GarbageCollector,name=PS Scavenge",CollectionCount].last(0)}<{Template JMX Generic:jmx["java.lang:type=GarbageCollector,name=PS MarkSweep",CollectionCount].last(0)} + gc PS Mark Sweep in fire fighting mode on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.committed].last(0)}={Template JMX Generic:jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.max].last(0)} + mp CMS Old Gen fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.committed].last(0)}={Template JMX Generic:jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.max].last(0)} + mp CMS Perm Gen fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.committed].last(0)}={Template JMX Generic:jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.max].last(0)} + mp Code Cache fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.committed].last(0)}={Template JMX Generic:jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.max].last(0)} + mp Perm Gen fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.committed].last(0)}={Template JMX Generic:jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.max].last(0)} + mp PS Old Gen fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.committed].last(0)}={Template JMX Generic:jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.max].last(0)} + mp PS Perm Gen fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.committed].last(0)}={Template JMX Generic:jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.max].last(0)} + mp Tenured Gen fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=Runtime",Uptime].nodata(60)}=1 + {HOST.NAME} is not reachable + + 0 + 3 + + 0 + + + + {Template JMX Generic:jmx["java.lang:type=Compilation",Name].str(Server)}#1 + {HOST.NAME} uses suboptimal jit compiler + + 0 + 1 + + 0 + + + + + + Class Loader + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=ClassLoading",UnloadedClassCount] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=ClassLoading",TotalLoadedClassCount] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=ClassLoading",LoadedClassCount] + + + + + + File Descriptors + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=OperatingSystem",OpenFileDescriptorCount] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=OperatingSystem",MaxFileDescriptorCount] + + + + + + Garbage Collector collections per second + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=GarbageCollector,name=ConcurrentMarkSweep",CollectionCount] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=GarbageCollector,name=Copy",CollectionCount] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=GarbageCollector,name=PS Scavenge",CollectionCount] + + + + 5 + 0 + C800C8 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=GarbageCollector,name=ParNew",CollectionCount] + + + + 4 + 0 + 00C8C9 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=GarbageCollector,name=PS MarkSweep",CollectionCount] + + + + 3 + 0 + C8C800 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact",CollectionCount] + + + + + + Memory Pool CMS Old Gen + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.committed] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.used] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.max] + + + + + + Memory Pool CMS Perm Gen + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.used] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.max] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.committed] + + + + + + Memory Pool Code Cache + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.committed] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.max] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.used] + + + + + + Memory Pool Perm Gen + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.max] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.committed] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.used] + + + + + + Memory Pool PS Old Gen + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.committed] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.max] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.used] + + + + + + Memory Pool PS Perm Gen + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 2 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.used] + + + + 1 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.max] + + + + 0 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.committed] + + + + + + Memory Pool Tenured Gen + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.max] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.used] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.committed] + + + + + + Tthreads + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=Threading",ThreadCount] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=Threading",DaemonThreadCount] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Generic + jmx["java.lang:type=Threading",PeakThreadCount] + + + + + + diff --git a/templates/Template_JMX_Java.xml b/templates/Template_JMX_Java.xml new file mode 100644 index 0000000..59a674c --- /dev/null +++ b/templates/Template_JMX_Java.xml @@ -0,0 +1,2727 @@ + + + 2.0 + 2013-06-20T19:01:58Z + + + Templates + + + + + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.used].last(0)}>({Template JMX Java:jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.max].last(0)}*0.7) + 70% mp CMS Old Gen used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.used].last(0)}>({Template JMX Java:jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.max].last(0)}*0.7) + 70% mp CMS Perm Gen used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.used].last(0)}>({Template JMX Java:jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.max].last(0)}*0.7) + 70% mp Code Cache used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.used].last(0)}>({Template JMX Java:jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.max].last(0)}*0.7) + 70% mp Perm Gen used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.used].last(0)}>({Template JMX Java:jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.max].last(0)}*0.7) + 70% mp PS Old Gen used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.used].last(0)}>({Template JMX Java:jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.max].last(0)}*0.7) + 70% mp PS Perm Gen used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.used].last(0)}>({Template JMX Java:jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.max].last(0)}*0.7) + 70% mp Tenured Gen used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=OperatingSystem",OpenFileDescriptorCount].last(0)}>({Template JMX Java:jmx["java.lang:type=OperatingSystem",MaxFileDescriptorCount].last(0)}*0.7) + 70% os Opened File Descriptor Count used on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=GarbageCollector,name=ParNew",CollectionCount].last(0)}<{Template JMX Java:jmx["java.lang:type=GarbageCollector,name=ConcurrentMarkSweep",CollectionCount].last(0)} + gc Concurrent Mark Sweep in fire fighting mode on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=GarbageCollector,name=Copy",CollectionCount].last(0)}<{Template JMX Java:jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact",CollectionCount].last(0)} + gc Mark Sweep Compact in fire fighting mode on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=GarbageCollector,name=PS Scavenge",CollectionCount].last(0)}<{Template JMX Java:jmx["java.lang:type=GarbageCollector,name=PS MarkSweep",CollectionCount].last(0)} + gc PS Mark Sweep in fire fighting mode on {HOST.NAME} + + 0 + 3 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.committed].last(0)}={Template JMX Java:jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.max].last(0)} + mp CMS Old Gen fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.committed].last(0)}={Template JMX Java:jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.max].last(0)} + mp CMS Perm Gen fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.committed].last(0)}={Template JMX Java:jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.max].last(0)} + mp Code Cache fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.committed].last(0)}={Template JMX Java:jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.max].last(0)} + mp Perm Gen fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.committed].last(0)}={Template JMX Java:jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.max].last(0)} + mp PS Old Gen fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.committed].last(0)}={Template JMX Java:jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.max].last(0)} + mp PS Perm Gen fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.committed].last(0)}={Template JMX Java:jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.max].last(0)} + mp Tenured Gen fully committed on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=Runtime",Uptime].nodata(60)}=1 + {HOST.NAME} is not reachable + + 0 + 3 + + 0 + + + + {Template JMX Java:jmx["java.lang:type=Compilation",Name].str(Server)}#1 + {HOST.NAME} uses suboptimal jit compiler + + 0 + 1 + + 0 + + + + + + Class Loader + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=ClassLoading",TotalLoadedClassCount] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=ClassLoading",UnloadedClassCount] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=ClassLoading",LoadedClassCount] + + + + + + File Descriptors + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=OperatingSystem",MaxFileDescriptorCount] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=OperatingSystem",OpenFileDescriptorCount] + + + + + + Garbage Collector collections per second + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=GarbageCollector,name=ConcurrentMarkSweep",CollectionCount] + + + + 4 + 0 + 00C8C9 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=GarbageCollector,name=PS MarkSweep",CollectionCount] + + + + 5 + 0 + C800C8 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=GarbageCollector,name=ParNew",CollectionCount] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=GarbageCollector,name=Copy",CollectionCount] + + + + 3 + 0 + C8C800 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact",CollectionCount] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=GarbageCollector,name=PS Scavenge",CollectionCount] + + + + + + Memory Pool CMS Old Gen + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.used] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.max] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.committed] + + + + + + Memory Pool CMS Perm Gen + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.committed] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.max] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.used] + + + + + + Memory Pool Code Cache + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.max] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.committed] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.used] + + + + + + Memory Pool Perm Gen + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.max] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.committed] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=Perm Gen",Usage.used] + + + + + + Memory Pool PS Old Gen + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.committed] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.used] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.max] + + + + + + Memory Pool PS Perm Gen + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 2 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.used] + + + + 0 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.committed] + + + + 1 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.max] + + + + + + Memory Pool Tenured Gen + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.max] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.committed] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.used] + + + + + + Tthreads + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=Threading",ThreadCount] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=Threading",PeakThreadCount] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Java + jmx["java.lang:type=Threading",DaemonThreadCount] + + + + + + diff --git a/templates/Template_JMX_Tomcat.xml b/templates/Template_JMX_Tomcat.xml new file mode 100644 index 0000000..4d6c817 --- /dev/null +++ b/templates/Template_JMX_Tomcat.xml @@ -0,0 +1,1570 @@ + + + 2.0 + 2013-06-20T18:59:07Z + + + Templates + + + + + + + + {Template JMX Tomcat:jmx["Catalina:type=ThreadPool,name=http-8080",currentThreadsBusy].last(0)} > ({Template JMX Tomcat:jmx["Catalina:type=ThreadPool,name=http-8080",maxThreads].last(0)} * 0.7) + 70% http-8080 worker threads busy on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Tomcat:jmx["Catalina:type=ThreadPool,name=http-8443",currentThreadsBusy].last(0)} > ({Template JMX Tomcat:jmx["Catalina:type=ThreadPool,name=http-8443",maxThreads].last(0)} * 0.7) + 70% http-8443 worker threads busy on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Tomcat:jmx["Catalina:type=ThreadPool,name=jk-8009",currentThreadsBusy].last(0)} > ({Template JMX Tomcat:jmx["Catalina:type=ThreadPool,name=jk-8009",maxThreads].last(0)} *0.7) + 70% jk-8009 worker threads busy on {HOST.NAME} + + 0 + 2 + + 0 + + + + {Template JMX Tomcat:jmx["Catalina:type=ProtocolHandler,port=8080",compression].str(off)} = 1 + gzip compression is off for connector http-8080 on {HOST.NAME} + + 1 + 1 + + 0 + + + + {Template JMX Tomcat:jmx["Catalina:type=ProtocolHandler,port=8443",compression].str(off)} = 1 + gzip compression is off for connector http-8443 on {HOST.NAME} + + 1 + 1 + + 0 + + + + + + http-8080 worker threads + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Tomcat + jmx["Catalina:type=ThreadPool,name=http-8080",maxThreads] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Tomcat + jmx["Catalina:type=ThreadPool,name=http-8080",currentThreadsBusy] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Tomcat + jmx["Catalina:type=ThreadPool,name=http-8080",currentThreadCount] + + + + + + http-8443 worker threads + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Tomcat + jmx["Catalina:type=ThreadPool,name=http-8443",maxThreads] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Tomcat + jmx["Catalina:type=ThreadPool,name=http-8443",currentThreadCount] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Tomcat + jmx["Catalina:type=ThreadPool,name=http-8443",currentThreadsBusy] + + + + + + jk-8009 worker threads + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Tomcat + jmx["Catalina:type=ThreadPool,name=jk-8009",currentThreadCount] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Tomcat + jmx["Catalina:type=ThreadPool,name=jk-8009",maxThreads] + + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Tomcat + jmx["Catalina:type=ThreadPool,name=jk-8009",currentThreadsBusy] + + + + + + sessions / + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 1 + 0 + 00C800 + 0 + 2 + 0 + + Template JMX Tomcat + jmx["Catalina:type=Manager,path=/,host=localhost",activeSessions] + + + + 2 + 0 + 0000C8 + 0 + 2 + 0 + + Template JMX Tomcat + jmx["Catalina:type=Manager,path=/,host=localhost",maxActiveSessions] + + + + 0 + 0 + C80000 + 0 + 2 + 0 + + Template JMX Tomcat + jmx["Catalina:type=Manager,path=/,host=localhost",rejectedSessions] + + + + + + diff --git a/templates/Zabbix-Agent.xml b/templates/Zabbix-Agent.xml new file mode 100644 index 0000000..a661d21 --- /dev/null +++ b/templates/Zabbix-Agent.xml @@ -0,0 +1,183 @@ + + + 2.0 + 2013-06-18T21:47:18Z + + + Templates + + + + + + + + {Template App Zabbix Agent:agent.hostname.diff(0)}>0 + Host name of zabbix_agentd was changed on {HOST.NAME} + + 0 + 1 + + 0 + + + + {Template App Zabbix Agent:agent.version.diff(0)}>0 + Version of zabbix_agent(d) was changed on {HOST.NAME} + + 0 + 1 + + 0 + + + + {Template App Zabbix Agent:agent.ping.nodata(5m)}=1 + Zabbix agent on {HOST.NAME} is unreachable for 5 minutes + + 0 + 4 + + 0 + + + + diff --git a/templates/Zabbix-Server.xml b/templates/Zabbix-Server.xml new file mode 100644 index 0000000..28cbefa --- /dev/null +++ b/templates/Zabbix-Server.xml @@ -0,0 +1,1758 @@ + + + 2.0 + 2013-06-18T21:47:42Z + + + Templates + + + + + + + + {Template App Zabbix Server:zabbix[rcache,buffer,pfree].min(600)}<25 + Less than 25% free in the configuration cache + + 0 + 3 + Consider increasing CacheSize in the zabbix_server.conf configuration file + 0 + + + + {Template App Zabbix Server:zabbix[wcache,history,pfree].min(600)}<25 + Less than 25% free in the history cache + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[wcache,text,pfree].min(600)}<25 + Less than 25% free in the text history cache + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[wcache,trend,pfree].min(600)}<25 + Less than 25% free in the trends cache + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[queue,10m].min(600)}>100 + More than 100 items having missing data for more than 10 minutes + + 0 + 2 + zabbix[queue,10m] item is collecting data about how many items are missing data for more than 10 minutes (next parameter) + 0 + + + + {Template App Zabbix Server:zabbix[process,alerter,avg,busy].min(600)}>75 + Zabbix alerter processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,configuration syncer,avg,busy].min(600)}>75 + Zabbix configuration syncer processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,db watchdog,avg,busy].min(600)}>75 + Zabbix db watchdog processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,discoverer,avg,busy].min(600)}>75 + Zabbix discoverer processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,escalator,avg,busy].min(600)}>75 + Zabbix escalator processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,history syncer,avg,busy].min(600)}>75 + Zabbix history syncer processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,housekeeper,avg,busy].min(1800)}>75 + Zabbix housekeeper processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,http poller,avg,busy].min(600)}>75 + Zabbix http poller processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,icmp pinger,avg,busy].min(600)}>75 + Zabbix icmp pinger processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,ipmi poller,avg,busy].min(600)}>75 + Zabbix ipmi poller processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,java poller,avg,busy].min(600)}>75 + Zabbix java poller processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,node watcher,avg,busy].min(600)}>75 + Zabbix node watcher processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,poller,avg,busy].min(600)}>75 + Zabbix poller processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,proxy poller,avg,busy].min(600)}>75 + Zabbix proxy poller processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,self-monitoring,avg,busy].min(600)}>75 + Zabbix self-monitoring processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,snmp trapper,avg,busy].min(600)}>75 + Zabbix snmp trapper processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,timer,avg,busy].min(600)}>75 + Zabbix timer processes more than 75% busy + + 0 + 3 + Timer processes usually are busy because they have to process time based trigger functions + 0 + + + + {Template App Zabbix Server:zabbix[process,trapper,avg,busy].min(600)}>75 + Zabbix trapper processes more than 75% busy + + 0 + 3 + + 0 + + + + {Template App Zabbix Server:zabbix[process,unreachable poller,avg,busy].min(600)}>75 + Zabbix unreachable poller processes more than 75% busy + + 0 + 3 + + 0 + + + + + + Zabbix cache usage, % free + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 1 + 1 + 0 + 0 + + + 2 + 0 + 00DDDD + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[wcache,text,pfree] + + + + 0 + 0 + 009900 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[wcache,trend,pfree] + + + + 1 + 0 + DD0000 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[rcache,buffer,pfree] + + + + 3 + 0 + 3333FF + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[wcache,history,pfree] + + + + + + Zabbix data gathering process busy % + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 1 + 1 + 0 + 0 + + + 4 + 0 + 00EE00 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,icmp pinger,avg,busy] + + + + 8 + 0 + DD0000 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,java poller,avg,busy] + + + + 9 + 0 + 000099 + 0 + 7 + 0 + + Template App Zabbix Server + zabbix[process,snmp trapper,avg,busy] + + + + 2 + 0 + 0000EE + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,ipmi poller,avg,busy] + + + + 5 + 0 + 003300 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,http poller,avg,busy] + + + + 1 + 0 + 990000 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,poller,avg,busy] + + + + 6 + 0 + CCCC00 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,proxy poller,avg,busy] + + + + 0 + 0 + 990099 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,trapper,avg,busy] + + + + 3 + 0 + FF33FF + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,discoverer,avg,busy] + + + + 7 + 0 + 33FFFF + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,unreachable poller,avg,busy] + + + + + + Zabbix internal process busy % + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 1 + 1 + 0 + 0 + + + 8 + 0 + FF66FF + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,self-monitoring,avg,busy] + + + + 1 + 0 + 007777 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,node watcher,avg,busy] + + + + 6 + 0 + 666600 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,db watchdog,avg,busy] + + + + 2 + 0 + 0000EE + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,escalator,avg,busy] + + + + 5 + 0 + 990099 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,configuration syncer,avg,busy] + + + + 7 + 0 + EE0000 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,history syncer,avg,busy] + + + + 4 + 0 + 00EEEE + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,alerter,avg,busy] + + + + 3 + 0 + FFAA00 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,housekeeper,avg,busy] + + + + 0 + 0 + 00EE00 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[process,timer,avg,busy] + + + + + + Zabbix server performance + 900 + 200 + 0.0000 + 100.0000 + 1 + 1 + 0 + 1 + 0 + 0.0000 + 0.0000 + 0 + 0 + 0 + 0 + + + 0 + 5 + 00C800 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[wcache,values] + + + + 1 + 5 + C80000 + 0 + 2 + 0 + + Template App Zabbix Server + zabbix[queue] + + + + + + diff --git a/templates/ZabbixTemplates.tar.gz b/templates/ZabbixTemplates.tar.gz new file mode 100644 index 0000000..fe95720 Binary files /dev/null and b/templates/ZabbixTemplates.tar.gz differ