make it simpler
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
UserParameter=status_file.discovery,{{ zabbix_script_dir }}/lld_backup_status_file.py
|
||||
UserParameter=check_age[*],sudo {{ zabbix_script_dir }}/check_age_quiet.py "$1"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
UserParameter=certificate.discovery,{{ zabbix_script_dir }}/lld_certlist.py
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
UserParameter=custom.vfs.discover_disks,{{ zabbix_script_dir }}/lld-disks.py
|
||||
|
||||
UserParameter=custom.vfs.dev.read.ops[*],awk '{print $$1}' /sys/class/block/$1/stat
|
||||
UserParameter=custom.vfs.dev.read.merged[*],awk '{print $$2}' /sys/class/block/$1/stat
|
||||
UserParameter=custom.vfs.dev.read.sectors[*],awk '{print $$3}' /sys/class/block/$1/stat
|
||||
UserParameter=custom.vfs.dev.read.ms[*],awk '{print $$4}' /sys/class/block/$1/stat
|
||||
UserParameter=custom.vfs.dev.write.ops[*],awk '{print $$5}' /sys/class/block/$1/stat
|
||||
UserParameter=custom.vfs.dev.write.merged[*],awk '{print $$6}' /sys/class/block/$1/stat
|
||||
UserParameter=custom.vfs.dev.write.sectors[*],awk '{print $$7}' /sys/class/block/$1/stat
|
||||
UserParameter=custom.vfs.dev.write.ms[*],awk '{print $$8}' /sys/class/block/$1/stat
|
||||
UserParameter=custom.vfs.dev.io.active[*],awk '{print $$9}' /sys/class/block/$1/stat
|
||||
UserParameter=custom.vfs.dev.io.ms[*],awk '{print $$10}' /sys/class/block/$1/stat
|
||||
UserParameter=custom.vfs.dev.weight.io.ms[*],awk '{print $$11}' /sys/class/block/$1/stat
|
||||
@@ -1 +0,0 @@
|
||||
UserParameter=lld_file_list.discovery[*],{{ zabbix_script_dir }}/lld_filelist.py "$1"
|
||||
@@ -1,2 +0,0 @@
|
||||
UserParameter=check_mountpoint[*],grep -q "$1" /proc/mounts ; echo $?
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
# For all the following commands HOME should be set to the directory that has .my.cnf file with password information.
|
||||
|
||||
# Flexible parameter to grab global variables. On the frontend side, use keys like mysql.status[Com_insert].
|
||||
# Key syntax is mysql.status[variable].
|
||||
UserParameter=mysql.status[*],echo "show global status where Variable_name='$1';" | HOME={{ zabbix_home_dir }} mysql -N | awk '{print $$2}'
|
||||
UserParameter=mysql.status_on[*],echo "show global status where Variable_name='$1';" | HOME={{ zabbix_home_dir }} mysql -N | awk '{print $$2}'| sed 's/ON/1/' | sed 's/OFF/0/'
|
||||
|
||||
# Flexible parameter to determine database or table size. On the frontend side, use keys like mysql.size[zabbix,history,data].
|
||||
# Key syntax is mysql.size[<database>,<table>,<type>].
|
||||
# Database may be a database name or "all". Default is "all".
|
||||
# Table may be a table name or "all". Default is "all".
|
||||
# Type may be "data", "index", "free" or "both". Both is a sum of data and index. Default is "both".
|
||||
# Database is mandatory if a table is specified. Type may be specified always.
|
||||
# Returns value in bytes.
|
||||
# 'sum' on data_length or index_length alone needed when we are getting this information for whole database instead of a single table
|
||||
UserParameter=mysql.size[*],bash -c 'echo "select sum($(case "$3" in both|"") echo "data_length+index_length";; data|index) echo "$3_length";; free) echo "data_free";; esac)) from information_schema.tables$([[ "$1" = "all" || ! "$1" ]] || echo " where table_schema=\"$1\"")$([[ "$2" = "all" || ! "$2" ]] || echo "and table_name=\"$2\"");" | HOME={{ zabbix_home_dir }} mysql -N'
|
||||
|
||||
UserParameter=mysql.ping,HOME={{ zabbix_home_dir }} mysqladmin ping | grep -c alive
|
||||
UserParameter=mysql.version,mysql -V
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
UserParameter=postfix.queue,mailq | grep -v "Mail queue is empty" | egrep -c '^[0-9A-F]{10}'
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
UserParameter=processlist.discovery[*],{{ zabbix_script_dir }}/lld_filelist.py {{ zabbix_process_list_file }}
|
||||
@@ -1,7 +0,0 @@
|
||||
UserParameter=uHDD[*], sudo smartctl -A $1| grep -i "$2"| tail -1| cut -c 88-|cut -f1 -d' '
|
||||
UserParameter=uHDD.model.[*],sudo smartctl -i $1 |grep -i "Device Model"| cut -f2 -d: |tr -d " "
|
||||
UserParameter=uHDD.sn.[*],sudo smartctl -i $1 |grep -i "Serial Number"| cut -f2 -d: |tr -d " "
|
||||
UserParameter=uHDD.health.[*],sudo smartctl -H $1 |grep -i "test"| cut -f2 -d: |tr -d " " || true
|
||||
UserParameter=uHDD.errorlog.[*],sudo smartctl -l error $1 |grep -i "ATA Error Count"| cut -f2 -d: |tr -d " "
|
||||
### Discovery
|
||||
UserParameter=uHDD.discovery,sudo {{ zabbix_script_dir }}/smartctl-disks-discovery.pl
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
Custom discovery and check scripts used by zabbix
|
||||
|
||||
Scripts/* should go in /etc/zabbix/scripts/
|
||||
Should be cloned in /etc/zabbix/scripts/
|
||||
|
||||
Conf/* should go in /etc/zabbix/zabbix_agentd.d/
|
||||
|
||||
- Scripts/check_ssl_cert.sh
|
||||
- Scripts/lld_backup_status_file.py - list all .status files in /var/run -
|
||||
|
||||
Reference in New Issue
Block a user