1. Monitoring architecture diagram 2. Implementation ideas
3. Specific configuration 1. Install the Jenkins Metrics plugin Plugin download address: http://updates.jenkins-ci.org/download/plugins/metrics/ Install the Metrics plug-in. In the system configuration, there will be an additional "Metrics" configuration, as shown below: The configuration items are not complicated. We need to click "Generate..." to generate an Access Key (remember to save it after generating it). This key is used for identity verification, which we will use later. After saving, we enter the URL in the browser: http://jenkins.local,me/metrics/<the newly generated Access Key> to verify whether Jenkins has exposed metrics. If you see the following picture, you can proceed to the next step: 1.1 Introduction to Metrics plugin The Metrics plugin is implemented based on dropwizard/metrics. It exposes metrics data through four interfaces: /metrics, /ping, /threads, /healthcheck. 1.2 Metrics plugin: /metrics interface introduction Click the metric link in the above image (http://jenkins.local.me/metrics/<Access Key>/metrics), which exposes the following metric data: { version: "4.0.0", gauges: {...}, counters: {...}, histograms: {...}, meters: {...}, timers: {...} }
1.3 Metrics plugin other interfaces /ping: The interface returns pong, which means Jenkins is alive, as shown below: /threads: Returns Jenkins thread information /healthcheck: Returns the following metrics: { "disk-space" : { "healthy" : true }, "plugins" : { "healthy" : true, "message" : "No failed plugins" }, "temporary-space" : { "healthy" : true }, "thread-deadlock" : { "healthy" : true } } Zabbix server collects data by communicating with Zabbix agent. The Zabbix agent is divided into two modes: passive and active. We are using passive mode, which means Zabbix server asks the agent for data. 2.1 Create a monitoring template and link it to a host group 2.2 Create monitoring items Here we need to explain why some of the options are filled in that way:
At this point, the Zabbix server has been configured. You can check whether there is the latest data in Monitoring->Latest Data, and then create a dashboard to present the data in a graphical way. Other monitoring items can also be configured in this way. Monitoring script code The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: MySQL kill command usage guide
>>: How to encapsulate query components based on element-ui step by step
I don't know when it started, but every time ...
Table of contents Problem description: Cause Anal...
I'll record my first attempt at vue3.0. When ...
Table of contents Stabilization Throttling Summar...
Deepin 2014 download and installation For downloa...
When using MySQL, we often sort and query a field...
State Hooks Examples: import { useState } from ...
In this blog, we will discuss ten performance set...
1. Cleaning before installation rpm -qa | grep jd...
Menu bar example 1: Copy code The code is as foll...
Preface For production VPS with public IP, only t...
There are two ways to delete data in MySQL, one i...
Docker Compose can realize the orchestration of D...
Table of contents Overview Environment Preparatio...
Table of contents background Provide / Inject Ext...