首页 应用软件 运维知识:企业级监控 - Grafana安装和配置

运维知识:企业级监控 - Grafana安装和配置

运维知识:企业级监控 - Grafana安装和配置

使用yum安装grafana

[root@centos-172-16-1-10 ~]# vim /etc/yum.repos.d/grafana.repo
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt

[root@centos-172-16-1-10 ~]# yum install -y grafana

配置LDAP登入

# 开启ldap
[root@centos-172-16-1-10 ~]# vim /etc/grafana/grafana.ini
[auth.ldap]
enabled = true
config_file = /etc/grafana/ldap.toml
allow_sign_up = true

# 配置ldap
[root@centos-172-16-1-10 ~]# grep -Ev "^#|^$" /etc/grafana/ldap.toml
[[servers]]
host = "xx.xx.xx.xx"
port = 389
use_ssl = false
start_tls = false
ssl_skip_verify = false
bind_dn = "uid=si,ou=user,dc=xxx,dc=cn"
bind_password = '******'
search_filter = "(&(isDeleted=false)(isEnabled=true)(status=1)(userName=%s))"
search_base_dns = ["ou=People,dc=xxx,dc=cn"]
[servers.attributes]
name = "cn"
surname = "title"
username = "userName"
member_of = "memberOf"
email = "userName"

启动grafana

[root@centos-172-16-1-10 ~]# systemctl start grafana-server.service
[root@centos-172-16-1-10 ~]# systemctl enable grafana-server.service

 


配置Grafana接入Prometheus数据源

1686997-20211119144000360-205924108

导入Grafana Dashboards模板
GitHub主页:https://github.com/starsliao/Prometheus
中文版本:https://grafana.com/grafana/dashboards/8919

1686997-20211119144043836-904002903

填入8919选择“本地Prometheus” 源并保存

1686997-20211119144209249-286231313

文章作者:博客园 wubolive 《企业级监控 - Grafana安装和配置》

原文链接:https://www.cnblogs.com/wubolive/p/15577204.html

免责声明:文章内容不代表本站立场,本站不对其内容的真实性、完整性、准确性给予任何担保、暗示和承诺,仅供读者参考,文章版权归原作者所有。如本文内容影响到您的合法权益(内容、图片等),请及时联系本站,我们会及时删除处理。

作者: 庄宇光

为您推荐

电路分享:ESP8266连接USB

电路分享:ESP8266连接USB

电气知识:单火线电源解决方案

电气知识:单火线电源解决方案

反向代理知识:使用FRP转发 Unix 域套接字

反向代理知识:使用FRP转发 Unix 域套接字

反向代理知识:使用FRP转发 DNS 查询请求

反向代理知识:使用FRP转发 DNS 查询请求

反向代理知识:使用FRP通过自定义域名访问内网的 Web 服务

反向代理知识:使用FRP通过自定义域名访问内网的 Web 服务

返回顶部