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.
You can use pip or rpm. Recommendation is rpm
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
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
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
Let's take blackbird-httpd
as an example.
There are several ways to install the plugin
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/.
git clone https://github.com/Vagrants/blackbird-httpd.git
cd blackbird-httpd
python setup.py install
yum install blackbird-httpd --enablerepo=blackbird
Basically I think that it is explained in the ini file, but you can set some additional settings
Of particular importance are ʻintervaland
lld_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
/etc/init.d/blackbird start
If you don't have a startup script, use https://github.com/Vagrants/blackbird/blob/master/scripts/blackbird.init
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)
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