The current Long Term Support (LTS) version series of Zabbix is 6.0, released in February 2022. The previous LTS version was 5.0, released in May 2020. Many of us are upgrading the Zabbix installation from 5.0 to 6.0 series these days, here is one catch to be aware of. In 5.0, when viewing graphs of […]
Tag Guidelines in Zabbix
This is a tag-specific summary from the official Zabbix guidelines documentation, based on the situation as of Zabbix 6.0 LTS. Note: “Please note that this model might become enforced in the future Zabbix releases. Templates that do not follow specified rules will need to be updated.“ Tag name and value format lowercase only allowed characters: […]
Handling Retries in Python Requests
In my previous post we handled timeouts with requests. This post deals with making it easier to react to the errors using the built-in retry features. In this context let’s limit the retry-requiring cases in two categories: Cases that timed out (no response from the server) Cases that returned a transient error from the server […]
Handling Timeouts with Python Requests
The most usual way of making HTTP/HTTPS requests in Python applications is using the requests library. By default it doesn’t define any timeouts for the operations. It means that in specific circumstances a simple requests.get() call might not return at all. Depending on the nature of the application this is not desirable. This post demonstrates […]
Saving Gzip Files in Python
I have various Python applications that run periodically and deal with data in lists and dictionaries, and they save the processed and/or discovered data as JSON in text files for logging purposes or other later use. Typically the files are quite large and take up substantial amount of disk space. Since the applications run on […]
Using Forks in GitHub
I use Git almost daily but I need my memos for the uncommon operations. Therefore the posts: Part 1: Git Configurations Part 2: Using Forks in GitHub (this post) This is a short memo about using a forked repository in GitHub to submit a pull request (PR) to the upstream repository. First of all, I […]
Selecting Pynetbox Version
If you have: And you need: Then you need to use: Because: NetBox 3.3.0 or newer Cable terminations pynetbox 7.0.0 or newer Cable terminations were changed in NetBox 3.3 NetBox older than 3.3.0 Cable terminations pynetbox 6.6.2 (or older) pynetbox 7.0.0 (or newer) only supports NetBox 3.3 or newer NetBox 3.2.0 or newer /api/ipam/vlan-groups/<id>/available_vlans pynetbox […]
Moving Zabbix Database
In the series “why wouldn’t I put this out public instead of just saving it to my own notes”: Moving the Zabbix database to a new database server. Old server: Debian Linux 9, running MariaDB 10.1.48 New server: Debian Linux 11, running MariaDB 10.5.12 (from Debian packaging) Zabbix (5.0.19 LTS) frontend is running on Apache […]
Reading XML with Python
In an earlier post I wrote about reading CSV files with Python. This time let’s read some XML using just Python standard library, the ElementTree XML API. For the demonstration I’ll use this short XML output from Nmap: Originally the Nmap output was not indented at all but I copied it to VSCode and reformatted […]
Sending DHCP Discover with Python and Scapy
Simple example how to send a UDP packet with Scapy in a Python application: When using sendp() it is necessary to construct the full packet, starting from L2 Ethernet frame. The “/” operator is cleverly used when combining the layers of the packet.