SlideShare a Scribd company logo
ZABBIX
www.zabbix.com
How to build zlm-cython module from the
sources
Practical approach to extending Zabbix Server and an Agent
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
AGENDA
Build preparation and dependencies
Building the extension
Installation
Verification
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Build preparation and dependencies
Install or upgrade Cython using python-pip
Verify, that your installed Cython is fairly
recent
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Build preparation and dependencies
Install or upgrade python-devel package
or install python interpreter from the scratch(1).
(1) http://www.python.org
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Build preparation and dependencies
Verify, that the python-config provides you
correct parameters, for building Python
extensions
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Build preparation and dependencies
Install and configure your Zabbix source tree.
Even if you are installing Zabbix from the
binary packages, you will need Zabbix source
tree to compile Zabbix Loadable Module.
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Building the extension
Clone zlm-cython source repository from
the github.com
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Building the extension
Change directory to zlm-cython/src and execute
./BUILD.sh
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Installation
Copy zlm_python.so, zlm_python.ini and
python.cfg to your modules “root”
Pick the directory, which you will use as the
“root” for your loadable modules
Create subdirectories:
- pymodules;
- pymodules/lib;
- pydaemons
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Installation
Make sure, that user zabbix do have an access to
this files and dierctories.
Copy modules located in pymodules/lib of your
source directory to your destination pymodules/lib
Copy modules located in pymodules of your
source directory to your destination pymodules
Copy modules located in pydaemons of your
source directory to your destination pydaemons
only if you want to install sample daemons
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Installation
Filename or Directory name Description
zlm_python.so Python Zabbix Loadable Module.
pymodules Directory for Python modules available to
Python ZLM. Only modules in that directory
will be available for the calls
py[<modulename>, {parameters}]
pymodules/lib Python ZLM-specific Python modules.
pydaemons If the module placed in this directory will
export class Daemon, subclass of the
ZLM_Metric_Collector, Python ZLM will
spawn an instance of this class as separate
thread.
python.cfg Configuration file for Python interpreter
zlm_python.ini Configuration file for Python ZLM
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Installation
Parameter in Config File Description
LoadModulePath Full path to location of agent modules.
The value fo this variable shall be path
name where you loadable modules are
installed.
LoadModule Module to load at agent startup. The
value of this variable will be
zlm_python.so
Adjust Server or Agent configuration files
 zabbix_server.conf
 zabbix_agentd.conf ⁂
⁂ If you are enabling Python ZLM on the Zabbix Agent, please be sure that you are
updating proper configuration file, which is zabbix_agentd.conf, not zabbix_agent.conf
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Installation
Check the Server or Agent log files for any errors
Restart your Zabbix Server or an Agent. Check if
Restart was successful
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Verification
Try to call any py[] item
Call python.ping item
If this call return “1” you Python ZLM on agent
loaded correctly.
ZABBIX
www.zabbix.comHow to build zlm-cython module from the sources
Verification
Author: Vladimir Ulogov
E-mail: vladimir.ulogov@zabbix.com
GitHub.com: https://github.com/vulogov/zlm-cython

More Related Content

PDF
ZLM-Cython Build you first module
KEY
Pinto+Stratopan+Love
PPTX
PDF
Securing Legacy CFML Code
PDF
How do I Write Testable Javascript so I can Test my CF API on Server and Client
PDF
Console Apps: php artisan forthe:win
KEY
Dependency Management With Pinto
PPTX
Performance tips for Symfony2 & PHP
ZLM-Cython Build you first module
Pinto+Stratopan+Love
Securing Legacy CFML Code
How do I Write Testable Javascript so I can Test my CF API on Server and Client
Console Apps: php artisan forthe:win
Dependency Management With Pinto
Performance tips for Symfony2 & PHP

What's hot (20)

PDF
eZ Publish Platform 5.4 public webinar
KEY
Speedy TDD with Rails
PDF
What's new on Laravel 5.5
PPT
Rapid scaling in_the_cloud_with_puppet
PDF
php[world] 2015 Laravel 5.1: From Homestead to the Cloud
PDF
2021laravelconftwslides6
PDF
Fighting Fear-Driven-Development With PHPUnit
PDF
Continuous Integration Testing in Django
PDF
Quick flask an intro to flask
PDF
Beyond AEM Curl Commands
PDF
Php Dependency Management with Composer ZendCon 2016
PDF
Web performances : Is It not the right time to (re)consider CMS ?
PPTX
Phalcon 2 - PHP Brazil Conference
PDF
DevOps with Serverless
PDF
Swagger AEM - An OpenAPI Specification for AEM
PDF
Laravel Forge: Hello World to Hello Production
PDF
Build website in_django
PPTX
10 Laravel packages everyone should know
PDF
Java fx smart code econ
PDF
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
eZ Publish Platform 5.4 public webinar
Speedy TDD with Rails
What's new on Laravel 5.5
Rapid scaling in_the_cloud_with_puppet
php[world] 2015 Laravel 5.1: From Homestead to the Cloud
2021laravelconftwslides6
Fighting Fear-Driven-Development With PHPUnit
Continuous Integration Testing in Django
Quick flask an intro to flask
Beyond AEM Curl Commands
Php Dependency Management with Composer ZendCon 2016
Web performances : Is It not the right time to (re)consider CMS ?
Phalcon 2 - PHP Brazil Conference
DevOps with Serverless
Swagger AEM - An OpenAPI Specification for AEM
Laravel Forge: Hello World to Hello Production
Build website in_django
10 Laravel packages everyone should know
Java fx smart code econ
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Ad

Similar to zlm-cython (20)

PDF
Vladimir Ulogov - Beyond the Loadable Module
PDF
Beyond the Loadable Module
PPTX
CICD With GitHub, Travis, SonarCloud and Docker Hub
PDF
Mastering Python Network Automation Tim Peters
PPTX
Introduction to robot framework
PDF
Mastering Python Network Automation Tim Peters
PPTX
How to configure PyCharm for Odoo development in Windows?
PDF
Arbeiten mit distribute, pip und virtualenv
PDF
zas-agent-0.1.1
PDF
Democamp - Munich - Java9
PPTX
Advanced Malware Analysis Training Session 5 - Reversing Automation
PDF
Dependency management with Composer
PDF
Mastering Python Network Automation Automating Container Orchestration Config...
PPTX
PHP Dependency Management with Composer
PPTX
Django Architecture Introduction
ODP
Pythonpresent
ODP
Running Symfony
PPT
Plugins And Making Your Own
PPTX
Custom Buildpacks and Data Services
PPTX
How to setup Pycharm environment for Odoo 17.pptx
Vladimir Ulogov - Beyond the Loadable Module
Beyond the Loadable Module
CICD With GitHub, Travis, SonarCloud and Docker Hub
Mastering Python Network Automation Tim Peters
Introduction to robot framework
Mastering Python Network Automation Tim Peters
How to configure PyCharm for Odoo development in Windows?
Arbeiten mit distribute, pip und virtualenv
zas-agent-0.1.1
Democamp - Munich - Java9
Advanced Malware Analysis Training Session 5 - Reversing Automation
Dependency management with Composer
Mastering Python Network Automation Automating Container Orchestration Config...
PHP Dependency Management with Composer
Django Architecture Introduction
Pythonpresent
Running Symfony
Plugins And Making Your Own
Custom Buildpacks and Data Services
How to setup Pycharm environment for Odoo 17.pptx
Ad

More from Vladimir Ulogov (7)

PPTX
Introduction to the core.ns application framework
PPTX
Generating test data for Statistical and ML models
PPTX
Short presentation of the Bitmasher private-key encryption
PPTX
Krabbe - messaging in loose groups
PPTX
"the Bund" language. A PEG grammar.
PPTX
The Bund language
PDF
Vladimir_Ulogov_Resume
Introduction to the core.ns application framework
Generating test data for Statistical and ML models
Short presentation of the Bitmasher private-key encryption
Krabbe - messaging in loose groups
"the Bund" language. A PEG grammar.
The Bund language
Vladimir_Ulogov_Resume

zlm-cython

  • 1. ZABBIX www.zabbix.com How to build zlm-cython module from the sources Practical approach to extending Zabbix Server and an Agent
  • 2. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources AGENDA Build preparation and dependencies Building the extension Installation Verification
  • 3. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Build preparation and dependencies Install or upgrade Cython using python-pip Verify, that your installed Cython is fairly recent
  • 4. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Build preparation and dependencies Install or upgrade python-devel package or install python interpreter from the scratch(1). (1) http://www.python.org
  • 5. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Build preparation and dependencies Verify, that the python-config provides you correct parameters, for building Python extensions
  • 6. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Build preparation and dependencies Install and configure your Zabbix source tree. Even if you are installing Zabbix from the binary packages, you will need Zabbix source tree to compile Zabbix Loadable Module.
  • 7. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Building the extension Clone zlm-cython source repository from the github.com
  • 8. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Building the extension Change directory to zlm-cython/src and execute ./BUILD.sh
  • 9. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Installation Copy zlm_python.so, zlm_python.ini and python.cfg to your modules “root” Pick the directory, which you will use as the “root” for your loadable modules Create subdirectories: - pymodules; - pymodules/lib; - pydaemons
  • 10. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Installation Make sure, that user zabbix do have an access to this files and dierctories. Copy modules located in pymodules/lib of your source directory to your destination pymodules/lib Copy modules located in pymodules of your source directory to your destination pymodules Copy modules located in pydaemons of your source directory to your destination pydaemons only if you want to install sample daemons
  • 11. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Installation Filename or Directory name Description zlm_python.so Python Zabbix Loadable Module. pymodules Directory for Python modules available to Python ZLM. Only modules in that directory will be available for the calls py[<modulename>, {parameters}] pymodules/lib Python ZLM-specific Python modules. pydaemons If the module placed in this directory will export class Daemon, subclass of the ZLM_Metric_Collector, Python ZLM will spawn an instance of this class as separate thread. python.cfg Configuration file for Python interpreter zlm_python.ini Configuration file for Python ZLM
  • 12. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Installation Parameter in Config File Description LoadModulePath Full path to location of agent modules. The value fo this variable shall be path name where you loadable modules are installed. LoadModule Module to load at agent startup. The value of this variable will be zlm_python.so Adjust Server or Agent configuration files  zabbix_server.conf  zabbix_agentd.conf ⁂ ⁂ If you are enabling Python ZLM on the Zabbix Agent, please be sure that you are updating proper configuration file, which is zabbix_agentd.conf, not zabbix_agent.conf
  • 13. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Installation Check the Server or Agent log files for any errors Restart your Zabbix Server or an Agent. Check if Restart was successful
  • 14. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Verification Try to call any py[] item Call python.ping item If this call return “1” you Python ZLM on agent loaded correctly.
  • 15. ZABBIX www.zabbix.comHow to build zlm-cython module from the sources Verification Author: Vladimir Ulogov E-mail: vladimir.ulogov@zabbix.com GitHub.com: https://github.com/vulogov/zlm-cython