Allow monitoring 3ware controllers.
File | Desc |
---|---|
scripts/3ware.sh | monitoring scripts (zabbix agent) |
include/3ware.conf | config file |
templates/3ware_template.xml | template |
The script uses tw_cli util.
The utility requires root access, so the script has sudo usage.
You can use next command alias in the sudoers file:
` Cmnd_Alias TWCTRL = /usr/local/bin/tw_cli info *, \
/usr/local/bin/tw_cli info, \
/usr/local/bin/tw_cli show `
There are several value mappings in the template.
Allows to monitor the mapping DNS names to IP addresses on the selected NS.
File | Desc |
---|---|
scripts/dig_status.sh | monitoring script; it uses zabbix trapper and discovery options |
include/dig_status.conf | config file for zabbix agent |
templates/dig_status_template.xml | template |
etc/google.ini | configuration option; it contains list of DNS, IP address and NS |
The monitoring script uses dig and zabbix_sender utilities, you need to install them.
Configuration files (etc/*.ini) contain next settings:
# Tested DNS names and expected IP addresses
[requests]
smtp.yandex.ru=87.250.250.38,213.180.193.38
smtp.mail.ru=94.100.180.160
# Used name servers
[dns]
dns1=8.8.8.8
dns2=8.8.8.4
Notice: You should replace values in the [requests] on appropriate and copy files to /etc/zabbix.
Monitoring utility can be used as follows:
# test DNS names in config
scripts/dig_status.sh -m test -c /etc/zabbix/google.ini
# discovery settings from config file for zabbix server
scripts/dig_status.sh -m discovery -c /etc/zabbix/google.ini
Notice: You need to add this script as a cron task to a monitoring server. For example, add the following lines to the /etc/crontab file
# dns monitoring
*/10 * * * * zabbix /var/lib/zabbix/local/scripts/dig_status.sh -m test -c /etc/zabbix/google.ini
Zabbix agent config contains the definition for the check, which is used in discovery rules of the zabbix template.
Notice: You should replace path of monitoring script dig_status.sh in it and copy this config file to zabbix_agent's include directory.
Zabbix template contains next discovery rules:
This tests use UserParameter dig_status, which defined in the zabbix agent config file.
The discovery rule:
Template uses value mapping for statuses.
0 -> NS: OK
1 -> NS: Found additional IP in a reply
3 -> NS: Not all test IP found in a reply
4 -> NS: Not found records
5 -> NS: Return totally different IPs
101 -> dig util: Usage error
108 -> dig util: Couldn't open batch file
109 -> dig util: No reply from server
110 -> dig util: Internal error