Saturday, August 22, 2026

Visualize Network Performance in Jenkins with the MTR Plugin

As a system administrator or DevOps engineer, troubleshooting network latency and packet loss between servers is a critical but often tedious task. The jwms-mtr-plugin for Jenkins offers an elegant solution by integrating the powerful network diagnostic tool mtr (My TraceRoute) directly into your Jenkins environment, presenting the results as interactive visual graphs.

This plugin transforms raw command-line output into a clear, visual network map. Based on the project's GitHub page, here is a guide on how to set it up and use it in your Jenkins instance.

What is the jwms-mtr-plugin?

This Jenkins plugin allows server administrators to visualize network traceroute tool output directly within the Jenkins web interface. Instead of sifting through text logs, you get a dynamic graph that shows the network path between two hosts, making it easy to spot where latency or packet loss is occurring.

The project was created to provide a "repetitive success in network diagnostic collection, monitoring and report display," making it a valuable tool for automating network health checks as part of your CI/CD pipeline.

Key Features

  • Interactive Visualizations: Uses the vis.js library to display network paths as an interactive graph.

  • Geolocation Data: Can show the geographical location (country, region, city) of each hop when you point your mouse at a node.

  • Flexible Node Configuration: Allows you to define multiple node pairs (e.g., host1->host2) to monitor network paths between various servers.

  • Jenkins Integration: Seamlessly adds a "MTR Report" link to your Jenkins project's build page.

Step-by-Step Setup Guide

Here's how to get the plugin up and running in your Jenkins environment, based on the project's documentation.

1. Prerequisites

  • Jenkins: A running Jenkins instance.

  • Java: Java 8 or later.

  • Python: Python 2 or later (for the helper scripts).

  • MTR: The mtr command-line tool must be installed on all hosts you want to monitor.

  • Jenkins Plugin: Download the .hpi file from the project's releases page.

2. Install the Plugin in Jenkins

  1. In your Jenkins dashboard, go to Manage Jenkins > Manage Plugins.

  2. Go to the Advanced tab.

  3. Under the "Upload Plugin" section, choose the downloaded .hpi file and click Upload. Restart Jenkins if required.

3. Configure a Jenkins Freestyle Project

  1. Create a new Freestyle project in Jenkins.

  2. In the Build section of your project configuration, click Add build step and select 'Node Pair' from the dropdown list.

4. Configure SSH Credentials

In the build step configuration:

  • Provide the SSH username, SSH password, and SSH port. The plugin will use these credentials to connect between the nodes you specify.

  • The documentation recommends having a "common monitoring ssh user" for simplicity. Make sure this user has the necessary permissions to run mtr on the target machines.

5. Define Your Node Pairs

In the "Node pair" text area, define the pairs of hosts you want to trace. The format is simple: one pair per line, separated by ->.

host1.mydomain.com->host2.mydomain.com,

host2.mydomain.com->host1.mydomain.com,

host3.mydomain.com->host1.mydomain.com,

host1.mydomain.com->host3.mydomain.com,

6. Add Supporting Python Files

This step is crucial for the visualization and geolocation features.

  1. Create a Directory: Create a directory on your Jenkins server that Jenkins can read (e.g., /var/lib/jenkins/mtr-data).

  2. Copy Files: Copy the following files from the plugin's source repository (src/main/resources) into the directory you just created:

    • IP2Location.py

    • IPV6-COUNTRY-REGION-CITY-ISP.BIN (or an updated version)

    • sample.py

Note on Database Updates: You can download updated IP2Location LITE databases from their official site to get more accurate geolocation data. Just replace the .BIN file in your directory with the new one.

7. Run the Build and View the Report

  1. Click Build Now on your project's main page. You can monitor the console output to check for any errors.

  2. Once the build finishes, you will see a new 'MTR Report' link on the build's status page.

  3. Click the link to view the interactive network graph.

8. Interact with the MTR Report

  • The main visualization will show the network path between your defined nodes.

  • Hover your mouse over a node (represented by PC icons or circles) to see detailed information, including the IP address, hostname, and its geographical country based on the IP2Location database.

Important Considerations

  • Security: Be mindful of the SSH credentials you store in Jenkins. It is best practice to use a dedicated, limited-privilege user for monitoring tasks.

  • File Permissions: Ensure the Jenkins process has read permissions for the directory where you placed the Python files and the IP2Location database.

  • Maintenance: Remember to occasionally update the IP2Location database to keep geolocation data current.

Conclusion

The jwms-mtr-plugin is a fantastic example of a specialized Jenkins plugin that solves a specific operational problem with a beautiful user interface. By automating mtr runs and visualizing the results, it saves time and makes network diagnostic data accessible to the whole team. If you manage a distributed system, this plugin is definitely worth adding to your Jenkins toolkit.

Saturday, August 8, 2026

Streamlining Your Python Projects with common-util-py: A Handy Toolkit

As Python developers, we often find ourselves reinventing the wheel, writing the same helper functions for file handling, data processing, or logging across different projects. This is where a utility package like **common-util-py** comes to the rescue. Designed as a "library including all the common functionalities used in Python projects" , it aims to provide a standardized set of tools to speed up development and keep your codebase clean.


In this blog post, we'll explore what this project offers and how you can use it to make your Python development more efficient.


## What is common-util-py?


At its core, `common-util-py` is a Python package that serves as a collection of frequently used utilities. While the official PyPI page  is quite minimal, other sources describe it as a "🐳 Library including all the common functionalities used in Python projects" . This suggests it's designed to be a go-to resource for common programming tasks.


The package is licensed under the Apache 2.0 License  and supports modern Python versions (3.11 through 3.14) , making it suitable for a wide range of projects. Its latest version, 1.0.4, was released in July 2022  and has no known security vulnerabilities according to safety analyses .


## Getting Started


### Installation


Installing `common-util-py` is straightforward using pip, Python's package installer. Open your terminal or command prompt and run:


```bash

pip install common-util-py

```


This command will download and install the latest version of the package from the Python Package Index (PyPI) .


### Basic Usage


After installation, you can start using the utilities by importing the package into your Python scripts. Based on similar utility packages (like `py-common-util`), you might use it like this:


```python

import common_util_py


# Or, to use specific modules (assuming a structure similar to other common util packages):

# from common_util_py.common import date_utils, file_utils, etc.

```


**Note:** The specific module structure isn't detailed in the available resources, but the goal is to provide a cohesive set of tools. For more complex examples, such as those involving database operations or workflow management, you might look at similar packages like `at-common-util` .


## Potential Use Cases


While the exact functions of `common-util-py` are not exhaustively listed, we can infer its typical use cases from similar utility libraries:


1.  **Simplifying Common Tasks:** It likely provides helper functions for tasks like:

    - **File I/O:** Reading and writing files in various formats.

    - **Data Manipulation:** Working with lists, dictionaries, and strings.

    - **Date and Time:** Formatting and calculating dates and times.

    - **Logging:** Setting up and managing log files for debugging and monitoring.


2.  **Reducing Code Duplication:** Instead of writing the same functions repeatedly, you can rely on a well-tested library to handle these for you. This makes your code cleaner and easier to maintain.


3.  **Providing a Consistent Foundation:** By using a standard utility library across your projects, you ensure a consistent approach to common operations, making it easier for new team members to understand the codebase.


## Important Considerations


- **Check the Documentation:** Since the official PyPI page is sparse, you'll need to dig deeper to find comprehensive documentation. A good starting point is to explore the package after installation using Python's `help()` function or `dir()` to see what modules and functions are available.

- **Explore the Source:** If the package is hosted on a platform like GitHub, checking the source code can give you a clear picture of its capabilities.

- **Evaluate Alternatives:** The Python ecosystem has many excellent utility libraries, such as `ubelt` . It's always a good idea to evaluate different options to find the one that best fits your needs.


## Conclusion


`common-util-py` aims to be a valuable asset for Python developers by providing a central repository of useful functions. While its documentation could be more detailed, its core promise—to offer common functionalities and reduce repetitive coding—is compelling. If you're looking to standardize your helper functions and speed up development, give `common-util-py` a try. It might just become a staple in your Python toolkit.


Have you used `common-util-py` or a similar utility library? Share your experiences in the comments below