This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH='/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin' | |
# Read Zabbix agent config. | |
ZABBIX_AGENTD_CONF='/etc/zabbix/zabbix_agentd.conf' | |
ZABBIX_SERVERS=$( grep -v '^#' "${ZABBIX_AGENTD_CONF}" \ | |
| grep ServerActive \ | |
| sed -e 's/\s//g' -e 's/ServerActive=//g' -e 's/,/ /g' ) | |
ZABBIX_SERVER_DEFAULTPORT=10051 | |
MY_HOSTNAME=$( zabbix_agentd -t agent.hostname|cut -d'|' -f2-|sed -e 's/]$//' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
{ | |
echo "{" | |
echo " \"data\":[" | |
while read -r line; do | |
FSNAME=$(echo $line|awk '{print $2}'|sed -e 's/\\/\\\\/g' -e 's|/|\\/|g') | |
FSTYPE=$(echo $line|awk '{print $3}') | |
FSDEV=$(echo $line|awk '{print $1}'|sed -e 's/\\/\\\\/g' -e 's|/|\\/|g') | |
BDNAME=$( \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# openvpn_stats.sh: | |
# OpenVPN monitoring script for Zabbix | |
# | |
# $1: OpenVPN server host IP/hostname. (default: 127.0.0.1) | |
# $2: OpenVPN management CLI port. (default: 7505) | |
# $3: Password file for OpenVPN management CLI. (default: <none>) | |
# $4: Timeout(sec) (default: 3) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# virsh_vm_discovery.sh: | |
# Virtual Machine discovery script for Zabbix | |
# | |
export LANG=en_US.UTF-8 | |
HV_NAME=$( hostname --fqdn ) | |
VMLIST=$( virsh list --all|tail -n +3|awk '{ print $2 }' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
VPN_SERVER=$( hostname --fqdn ) | |
CLIENT_CONFIG_DIR="$1" | |
[ -z "${CLIENT_CONFIG_DIR}" ] && CLIENT_CONFIG_DIR='/etc/openvpn/ccd' | |
{ | |
echo "{" | |
echo " \"data\":[" | |
for line in $( ls -1 "${CLIENT_CONFIG_DIR}" 2> /dev/null ); do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# openvpn_client_stats.sh: | |
# OpenVPN client stats monitoring script for Zabbix | |
# | |
# $1: OpenVPN server host IP/hostname. (default: 127.0.0.1) | |
# $2: OpenVPN management CLI port. (default: 7505) | |
# $3: Password file for OpenVPN management CLI. (default: <none>) | |
# $4: Timeout(sec) (default: 3) | |
# $5: OpenVPN client host parameter(<SERVER>_<IP>_<CN>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<zabbix_export> | |
<version>2.0</version> | |
<date>2014-06-29T06:40:14Z</date> | |
<groups> | |
<group> | |
<name>Custom Templates</name> | |
</group> | |
<group> | |
<name>OpenVPN clients</name> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<zabbix_export> | |
<version>2.0</version> | |
<date>2014-06-18T02:56:36Z</date> | |
<groups> | |
<group> | |
<name>Templates</name> | |
</group> | |
</groups> | |
<templates> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# virsh_vm_stats.sh: | |
# Virtual Machine monitoring script for Zabbix | |
# | |
# $1: Virtual Machine dom-uuid | |
# | |
# script settings. | |
export LANG='en_US.UTF-8' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# proc_mem.sh: | |
# Process memory monitoring script for Zabbix | |
# | |
# $1: process name | |
# $2: effective user name | |
# $3: mode(sum/max/min/avg) | |
# $4: args pattern | |
# |
OlderNewer