Coder Social home page Coder Social logo

zabbix-azure-pipeline's Introduction

Zabbix Azure Pipeline

This repository is a perfect example of how to send some data using Zabbix sender, using Azure Pipelines, and setting up a basic template to monitor the status of the Worldcup 2026 Countdown build, deployment and retrieve data from the JSON.

Azure Pipelines

The first thing to note, is that this pipeline is designed to be triggered after the first pipeline finishes.

As I already stated in the Worldcup 2026 Countdown, this pipeline uses an agent pool, where the agent is installed in the Zabbix server.

Inside the YAML you will see that it does, in a single line BASH command, get the status of the pipelines builds (top 10) and send them using the zabbix-sender.

Zabbix

Within this repository, there is a template (zabbix-template-pipeline.yaml) for Zabbix ready to import.

The template is designed to be linked to a host, that will serve and monitor the python web app, and the pipelines.

Python web app consists of simple items:

  • An item as an HTTP Agent (as a master item), to retrieve the entire JSON from the body of the web app.
  • And two dependent items (of the master item), to retrieve values using JSON path in the preprocessing rules.

It has 2 simple triggers:

  • If the python web app can not get any new data; could be that the script is not working, or it can not reach the host/port.
  • If the version for the web app has changed.

Azure Pipelines uses a master item, and a LLD rule (low level discovery):

  • As for the master item, this is a trapper item. Is the item that will get all JSON data that the Pipeline will send through the zabbix-sender.
  • The LLD will discover all pipelines in the project.
  • For each of the pipeline discovered, it will create a set of new items
    • 3 dependent items (from the trapper item), will get using JSON path in the preprocessing rules, a value for the last build result, when, and the number of the build.
    • 1 item, as an HTTP Agent, that will continously monitor if the configuration for the pipeline changes

And at last, it has a set of 2 triggers that will create for each pipeline discovered.

  • If the configuration has changed
  • If the build has failed

Take into account that there are 2 macros that you will need to modify.

  • {$ADO.PAT} for the Azure Personal Access token. Keep it as "secret", so no one with access to Zabbix frontend can see the key.
  • {$ADO.PROJECT.URL} you have to specify the URL for your organization and project. https://dev.azure.com/{organization}/{project} (without the ending slash "/")

zabbix-azure-pipeline's People

Contributors

zingaya avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.