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
HTML 4 HTML (not XHTML), MIME type is text/html, ...
Installation environment: CAT /etc/os-release Vie...
<br />What is web2.0? Web2.0 includes those ...
Use the find command to find files larger than a ...
Restart all stopped Docker containers with one co...
Achieve results Implementation ideas The melting ...
content Use scaffolding to quickly build a node p...
I recently encountered a problem when doing IM, a...
Table of contents 1. Location Object 1. URL 2. Pr...
Preface: I recently encountered the problem of in...
[LeetCode] 183.Customers Who Never Order Suppose ...
Table of contents Preface The principle of browse...
Problem Description In the login page of the proj...
In the vue scaffolding, we can see that in the ne...
How to write judgment statements in mysql: Method...