Run docker container from a docker image named dns_packetbeat
In dns-traffic-statistics-agent-arm64/packetbeat/ there is announcement_bam_deploy.py file
Open postDeploy.sh from the link /usr/local/bluecat/postDeploy.sh and add the following line at the bottom of this file: python2 <full path announcement_bam_deploy.py>
Run docker container:
docker run --cap-add=NET_ADMIN --network=host -d --name dns_packetbeat -v /replicated/jail/named/etc/named.conf:/replicated/jail/named/etc/named.conf dns_packetbeat:<tag>
Note:
To change config packetbeat, use the following option. Make sure to set permission for packetbeat.yml
To change statistics_config.json, use the following option:
-v <full path to statistics_config.json>:/usr/share/packetbeat/bin/statistics_config.json
2.2. Setup dns traffic statistic agent on BDDS 9.3 manually
2.2.1. Packetbeat installation and usage
Extract the dns-traffic-statistic-agent.tar.gz to a folder in BDDS, then follow the below steps:
Compile
Install golang dependency
go get ./...
Build
go build
Setup packetbeat service
Install packetbeat.deb in setup-package
dpkg -i packetbeat.deb
In dns-traffic-statistics-agent-arm64/packetbeat/ there is announcement_bam_deploy.py file
Open postDeploy.sh from the link /usr/local/bluecat/postDeploy.sh and add the following line at the bottom of this file: python2 <full path announcement_bam_deploy.py>
2.2.2. SNMP Subagent installation and usage
Running Packetbeat
Make sure the SNMP SubAgent started first
Running
/etc/init.d/packetbeat start
2.2.3. SNMP Subagent
Configure and install
Copy BCN-DNS-AGENT-MIB.mib into folder /usr/share/snmp/mibs and append "BCN-DNS-AGENT-MIB" end of /etc/snmp/snmp.conf.
Configure snmpd.conf. There are 2 options:
Enable and config snmp's information in BAM and deploy to BDDS.
Configure Master agent to plugin new sub-agent
Before running python dns_stat_agent, need to configuare AGENT_CONFIGURATION in config.py matched host and port in snmpd.conf.
HTTP_CONFIGURATION:
Key
Value
host
IP address for http server [String]
port
port of http server [integer]
AGENT_CONFIGURATION:
Key
Value
agent_name
The agent's name used for registration with net-snmp. [String]
master_socket
defines the address the master agent listens at, or the subagent should connect to. The default is the Unix Domain socket "/var/agentx/master". [String]
persistence_dir
The directory to use to store persistence information. Change this if you want to use a custom snmpd instance, eg. for automatic testing.[String]
BIND_CONFIGURATION:
Key
Value
host
Host of bind API. [String]
port
Port of bind API. [String]
stats_path
Path to get statistics in bind.[String]
Install wheel in setup-package
pip install wheel-0.33.4-py2.py3-none-any.whl
Install netsnmpagent and ipaddress in setup-package