Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Vmware_exporter configuration under Prometheus system

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Vmware_exporter configuration under Prometheus system

​ started Prometheus to facilitate the management of equipment. Starting from vmware_exporter today, I started to monitor my vmware vsphere cluster.

Due to the unsuccessful compilation problem, vmware_exporter chose to use docker mode to execute. Vmware_exporter

Edit the configuration file config.yml. In order to configure the file discovery service of prometheus, delete the vsphere_hosthost in esx.

Mkdir-p / data/vmware/config.ymlvim / data/vmware/config.ymldefault: vsphere_host: "vcenter" vsphere_user: "user" vsphere_password: "password" ignore_ssl: False collect_only: vms: True vmguests: True datastores: True hosts: True snapshots: Trueesx: vsphere_user: 'root' vsphere_password:' password' ignore_ssl: True collect_only: Vms: True vmguests: True datastores: True hosts: True snapshots: True

Execute the vmware-exporter docker program.

Docker run-d-v / data/vmware:/data/-it-rm-p 9272 it 9272-- name vmware_exporter pryorda/vmware_exporter-c / data/config.yml

Compile the prometheus configuration file

Edit the esx.yml file for use by the sd_file configuration file in prometheus.

Vim / etc/prometheus/esx.yml---- targets:- 192.168.21.91-192.168.21.92-192.168.21.93-192.168.21.95-192.168.21.96labels: job: vmware_esx edits the prometheus file, where section: [ESX] corresponds to the ESX fragment in the config.yml file. Vim / etc/prometheus/prometheus.yml- job_name: 'vmware_vcenter' metrics_path:' / metrics' static_configs:-targets:-'vcenter.company.com' relabel_configs:-source_labels: [_ address__] target_label: _ _ param_target-source_labels: [_ _ param_target] target_label: instance-target_label: _ _ address_ _ replacement: localhost:9272- job_name: 'vmware_esx' metrics_path:' / metrics' file_sd_configs:-files:-/ etc/prometheus/esx.yml params: section: [esx] relabel_configs:-source_labels: [_ _ address__] target_label: _ _ param_target-source_labels: [_ param_target] target_label: Instance-target_label: _ _ address__ replacement: localhost:9272

Add Grafana monitoring and import the configuration file of granafa, which is located in the dashboard directory by default.

Import dashboard configuration Fil

Reference link:

Vmware_exporter

Finally completed a small step, but still completed, there are many problems need to be further solved, such as alarm, such as more detailed monitoring, and so on.

​ my prometheus series is gradually improving, to be continued, come on!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report