heximcz / kresd-stats-zabbix

Knot resolver - statistics for ZABBIX
Other
1 stars 0 forks source link

Knot resolver - statistics for ZABBIX

Prerequisites

PHP >= 7.1.3 with CURL

Recommended

How to install

$ cd /opt/
$ git clone https://github.com/heximcz/kresd-stats-zabbix
$ cd /opt/kresd-stats-zabbix/
$ composer install --no-dev --optimize-autoloader
$ cp ./config.default.yml ./config.yml

Print Usage

php ./kresd-stats.php

php ./kresd-stats.php stats:prepare -h

php ./kresd-stats.php stats:get -h

php ./kresd-stats.php stats:prepare -i <ip address> -p <port>

php ./kresd-stats.php stats:get <param> -i <ip address> -p <port>

Use crontab for prepare data

add this lines to your /etc/crontab:

*  *    * * *   root    /usr/local/sbin/php /opt/kresd-stats-zabbix/kresd-stats.php stats:prepare
*  *    * * *   root    sleep 30 && /usr/local/sbin/php /opt/kresd-stats-zabbix/kresd-stats.php stats:prepare

Setting for Zabbix agent and template

Zabbix template and UserParams

License

MIT