[PYTHON] How to install and configure blackbird

What is blackbird

A python program that retrieves various data and throws it to the backend server Currently, only Zabbix Server is supported for backend throwing destination, but we plan to support various middleware in the future.

install blackbird

You can use pip or rpm. Recommendation is rpm

install with pip

Without thinking about anything

pip install blackbird

Enter with Or use setup.py to install

git clone https://github.com/Vagrants/blackbird.git
cd blackbird
python setup.py install

install with rpm

Set the yum repository as below

cat <<'_EOF_'> /etc/yum.repos.d/blackbird.repo
[blackbird]
name=Blackbird
baseurl=https://vagrants.github.io/blackbird/repo/yum/6/x86_64/
enabled=0
gpgcheck=0
_EOF_

Then install with yum Make sure you have epel available as it uses the epel package as a dependency.

yum install blackbird --enablerepo=blackbird,epel

Set up blackbird

config will be /etc/blackbird/defaults.cfg

/etc/blackbird/defaults.cfg


[global]
user = bbd
group = bbd
include  = conf.d/*.cfg
log_file = /var/log/blackbird/blackbird.log
log_level = error

If you install with rpm, you should see the above If you need to change the execution user or group, change it accordingly.

Also, set zabbix server in /etc/blackbird/conf.d/zabbix_sender.cfg.

ini:/etc/blackbird/conf.d/zabbix_sender.cfg


[zabbix]
server = 127.0.0.1
module = zabbix_sender

Please change 127.0.0.1 appropriately

Insert the blackbird plugin

Let's take blackbird-httpd as an example.

There are several ways to install the plugin

Insert manually

Clone to a suitable place and place the file

git clone https://github.com/Vagrants/blackbird-httpd.git
cd blackbird-httpd
cp httpd.py /opt/blackbitd/plugins/.
cp httpd.cfg /etc/blackbird/conf.d/.

Enter with setup.py

git clone https://github.com/Vagrants/blackbird-httpd.git
cd blackbird-httpd
python setup.py install

Enter with rpm

yum install blackbird-httpd --enablerepo=blackbird

Set plugin

Basically I think that it is explained in the ini file, but you can set some additional settings Of particular importance are ʻintervalandlld_interval`

ini:/etc/blackbird/conf.d/httpd.cfg


[httpd]
module = 'httpd'

# stub_status URI
# - support only http status code '200'
# - you must set uri value start with '/'
#
status_uri = '/server-status'
info_uri = '/server-info'
# host = '127.0.0.1'
# port = '80'
# timeout = '3'

# use ssl connection?
#
# ssl = False

# for BASIC authentication. default: Nothing
#
# user = 'nobody'

# for BASIC authentication. default: Nothing
#
# password = 'nobody'

# for response time check
# if you do not want to check, please comment out
# - support only http status code '200'
# - you must set uri value start with '/'
#
response_check_uri = '/'
# response_check_host = '127.0.0.1'
# response_check_port = '80'
# response_check_timeout = '3'
# response_check_vhost = 'localhost'
# response_check_uagent = 'blackbird response check'
# response_check_ssl = False

# httpd path
path = '/usr/sbin/httpd'

ʻIntervalis the interval to send data to Zabbix (default 60 seconds) lld_interval` is the Low Level Discovery interval (default 600 seconds) (LLD is not used in this httpd plugin) You can set these intervals for each plugin For example, if you want to acquire every 30 seconds and discover every 600 seconds, it will be as follows.

interval = 30
lld_interval = 600

Also, the host name is automatically acquired when sending with Zabbix Sender, but if the host name is different from Zabbix Server side, it can be written in cfg.

hostname = other_host_name

Start blackbird

/etc/init.d/blackbird start

If you don't have a startup script, use https://github.com/Vagrants/blackbird/blob/master/scripts/blackbird.init

Apply Template on Zabbix Server side

We publish Zabbix Template made for each plugin Please import the xml under templates of git repository of each plugin to Zabbix Server (In the case of blackbird-httpd in this example, it is located at https://github.com/Vagrants/blackbird-httpd/tree/master/templates)

If no data is sent

First, check if the server setting is correct in /etc/blackbird/conf.d/zabbix_sender.cfg Also, make sure that Zabbix Server port 10051 is open from the target server. If you have changed Zabbix Server port from 10051, please add port = <your port num> in zabbix_sender.cfg

If the hostname of the server running blackbird and the host name on Zabbix Server side are different, no data will be entered. Please modify Zabbix Server side or define hostname in plugin settings to match.

Recommended Posts

How to install and configure blackbird
How to install and use Tesseract-OCR
How to install CUDA and nvidia-driver
How to install and use Graphviz
How to install and use pandas_datareader [Python]
How to install fabric and basic usage
How to install Python
How to install pip
How to install archlinux
How to install python
How to install BayesOpt
How to install Nbextensions
How to install Prover9
How to install Cascade detector and how to use it
[2020.8 latest] How to install Python
How to install Python [Windows]
Tabpy 1.0 (2020-01 version) How to install
How to install mkl numpy
How to install Pelican blog
How to install Git GUI and Gitk on CentOS
How to install python using anaconda
How to install python-pip with ubuntu20.04LTS
How to install VMware-Tools on Linux
How to install pycrypto on Windows
How to install OpenCV on Mac
How to install MBDyn (Linux Ubuntu)
How to install PyPy on CentOS
How to install TensorFlow on CentOS 7
How to use .bash_profile and .bashrc
How to install mysql-connector with pip3
Install and configure `pyenv` Ansible playbook
How to install Maven on CentOS
How to install Go on Ubuntu
How to install music 21 on windows
How to install Anaconda with pyenv
How to solve slide puzzles and 15 puzzles
How to install OpenCV on Cloud9 and run it in Python
[EC2] How to install chrome and the contents of each command
How to install pandas on EC2 (How to deal with MemoryError and PermissionError)
[Linux] How to subdivide files and folders
How to package and distribute Python scripts
How to split and save a DataFrame
How to install aws-session-manager-plugin on Manajro Linux
How to install drobertadams / toggl-cli on Mac
python3 How to install an external module
[Kivy] How to install Kivy on Windows [Python]
How to install CatBoost [as of January 2020]
How to install DLIB with 2020 / CUDA enabled
Install and Configure TigerVNC server on Linux
How to install packages on Alpine Linux
How to install Anisble on Amazon Linux 2
How to install richzhang / colorization on Windows 10
How to install your own (root) CA
python: How to use locals () and globals ()
How to install Windows Subsystem For Linux
How to install Apache (httpd) on CentOS7
How to install php7.4 on Linux (Ubuntu)
How to install Eclipse GlassFish 5.1.0 on CentOS 7
[Python] How to calculate MAE and RMSE
How to use Python zip and enumerate
How to install Apache (httpd) on CentOS8