Skip to content

renvertere/zabbix-jenkins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Zabbix Jenkins Monitoring Solution


YAML Python Github Actions

Release Pipeline


Logo
Logo

Zabbix Jenkins Monitoring Solution

This repository houses the required scripts and configuration to implement Zabbix monitoring for Jenkins jobs.
Explore the documentation »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

The Zabbix Jenkins Monitoring Solution enables the discovery and monitoring of Jenkins jobs using Zabbix. This solution integrates Low-Level Discovery (LLD) and a Python-based script to query the Jenkins API, allowing real-time monitoring of job statuses, durations, and results.

(back to top)

Built With

(back to top)

Disclaimer

This project is provided "as is" without any warranties or support. Compatibility has been tested with Zabbix 6.0 LTS and Jenkins latest, but functionality on other systems may vary. Use at your own risk.

(back to top)

Getting Started

To set up this monitoring solution, upload the Jenkins template to your Zabbix server, configure the Python script for querying the Jenkins API, and set up the required user parameters for Zabbix Agent.

Deployment Steps

  1. Clone the repository:

    git clone [email protected]:renaldo-maclons/zabbix-jenkins.git
    cd zabbix-jenkins
  2. Load the template:

  • Import the file resources/zabbix/template/template_app_jenkins.yaml into your Zabbix server through the Configuration > Templates interface.
  1. Set Up User Parameters:
  • Copy resources/zabbix/userparameter/userparameter_jenkins.conf to your Zabbix Agent configuration directory:

    sudo cp resources/zabbix/userparameter/userparameter_jenkins.conf /etc/zabbix/zabbix_agent2.d/plugins.d
  1. Restart Zabbix Agent:

    systemctl restart zabbix-agent2
  2. Update Python Script:

  • Edit the zabbix-jenkins.py script to configure the Jenkins API URL, user, and token:

    JENKINS_URL = "https://jenkins.example.com"
    API_USER = "[email protected]"
    API_TOKEN = "your_api_token"
    
  1. Test the Integration:
  • Verify that the Python script outputs LLD data by running:

    python3 zabbix-jenkins.py

(back to top)

Usage

Once the template is applied, the Zabbix Jenkins Monitoring Solution will begin collecting data from the Jenkins API, providing valuable insights into job performance and statuses.

Monitoring Metrics in Zabbix

  • Job Name: The name of each Jenkins job.
  • Job URL: Direct link to the Jenkins job in the Jenkins UI.
  • Job Duration: The actual time taken for the last build of the job (in seconds).
  • Estimated Duration: Average time the job is expected to take, based on historical builds (in seconds).
  • Job Result: The result of the last build (e.g., SUCCESS, FAILURE).

(back to top)

Roadmap

  • Implement Low-Level Discovery (LLD) for Jenkins jobs.
  • Add support for querying job durations and statuses.
  • Implement credential parsing via Zabbix Macros
  • Enhance metrics collection to include build trends and queue times.
  • Add alerting for failed or long-running jobs.
  • Integrate visualization tools for Jenkins job performance.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are welcome! Please fork this repository and submit pull requests to propose changes or improvements. For major changes, open an issue to discuss them first.

(back to top)

License

Distributed under the MIT License. See LICENSE.md for more information.

(back to top)

Contact

Renaldo Maclons - GitHub

Project Link: Zabbix Jenkins Monitoring

(back to top)

Acknowledgments

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages