部署grafana+zabbix插件
  T99fNM5rvWRZ 2023年11月13日 40 0

安装grafana

下载地址:https://grafana.com/grafana/download 安装说明:https://grafana.com/docs/grafana/latest/setup-grafana/installation/redhat-rhel-fedora/

yum install -y grafana-enterprise-9.5.1-1.x86_64.rpm
systemctl daemon-reload
systemctl enable grafana-server --now

nginx代理grafana

nginx代理grafana官方文档:https://grafana.com/tutorials/run-grafana-behind-a-proxy/

  • 修改/etc/grafana/grafana.ini:
[server]
domain = example.com
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
serve_from_sub_path = true
  • 修改nginx配置:
# this is required to proxy Grafana Live WebSocket connections.
map $http_upgrade $connection_upgrade {
  default upgrade;
  '' close;
}

upstream grafana {
  server localhost:3000;
}

server {
  listen 80;
  root /usr/share/nginx/www;
  index index.html index.htm;

  location /grafana/ {
    rewrite  ^/grafana/(.*)  /$1 break;
    proxy_set_header Host $http_host;
    proxy_pass http://grafana;
  }

  # Proxy Grafana Live WebSocket connections.
  location /grafana/api/live/ {
    rewrite  ^/grafana/(.*)  /$1 break;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_set_header Host $http_host;
    proxy_pass http://grafana;
  }
}

  • 重新加载nginx配置文件

安装zabbix插件

官方文档:https://alexanderzobnin.github.io/grafana-zabbix/installation/ 下载地址:https://github.com/alexanderzobnin/grafana-zabbix/releases 离线安装: 先把alexanderzobnin-zabbix-app-4.3.1.zip上传到内网的文件服务器上。

grafana-cli --insecure --pluginUrl http://xxxx/alexanderzobnin-zabbix-app-4.3.1.zip plugins install alexanderzobnin-zabbix-app
systemctl restart grafana-server

下载zabbix面板

zabbix面板:https://grafana.com/grafana/dashboards/?dataSource=alexanderzobnin-zabbix-datasource

【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月13日 0

暂无评论

推荐阅读
  6YY0QMPUXEwu   2023年12月10日   26   0   0 linux网卡
  SzVG4h2uFmuP   2023年12月12日   27   0   0 zabbix
  nIt0XG0acU8j   2023年12月11日   28   0   0 linuxhtop
  nIt0XG0acU8j   2023年12月09日   28   0   0 linuxsort
  SzVG4h2uFmuP   2023年12月09日   38   0   0 zabbix