File: //usr/local/lib/python3.9/site-packages/agent360/plugins/__pycache__/bind.cpython-39.pyc
a
q�dg� � @ s@ d dl Z d dlZd dlZG dd� dej�Zedkr<e� �� dS )� Nc @ s e Zd ZdZ dd� ZdS )�Plugin�bindc C s4 |� dd�}t�dt|� d ��� }t�|�}|S )a
Monitoring bind nameserver
You must have the bind statistics-channels configured
and you must have jq installed for json processing.
Usage for /etc/agent360.ini:
[bind]
enabled = yes
port = 8053
r �portzcurl -j http://localhost:z5/json 2>/dev/null | jq ".qtypes * .rcodes * .nsstats")�get�os�popen�str�read�json�loads)�self�configZbport�result�data� r �?/usr/local/lib/python3.9/site-packages/agent360/plugins/bind.py�run
s
z
Plugin.runN)�__name__�
__module__�__qualname__r r r r r r s r �__main__)r Zpluginsr
Z
BasePluginr r �executer r r r �<module> s