User Tools

Site Tools


zabbix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
zabbix [2024/06/15 04:48] protocolzabbix [2026/01/22 08:25] (current) – [Grafana] protocol
Line 1: Line 1:
 +===== Templates repo =====
 +
 +[[https://github.com/remontti/Zabbix-Templates]]
 +
 +===== HT authentication through zabbix users from DB =====
 +
 <code> <code>
  
Line 7: Line 13:
 systemctl restart apache2 systemctl restart apache2
 apt install libaprutil1-dbd-mysql -y apt install libaprutil1-dbd-mysql -y
 +
 +nano /etc/apache2/mods-enabled/authn_dbd.conf
  
 <IfModule mod_dbd.c> <IfModule mod_dbd.c>
Line 16: Line 24:
  DBDExptime 300  DBDExptime 300
 </IfModule> </IfModule>
 +
  
 <Directory "/zabbix/"> <Directory "/zabbix/">
Line 32: Line 41:
 </Location> </Location>
  
 +</code>
 +
 +
 +===== Grafana =====
 +
 +<code>
 +sudo apt-get install -y apt-transport-https software-properties-common wget
 +wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
 +echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
 +sudo apt-get update
 +sudo apt-get install grafana -y
 +sudo systemctl daemon-reload
 +sudo systemctl start grafana-server
 +sudo systemctl enable grafana-server.service
 +grafana-cli plugins install alexanderzobnin-zabbix-app
 +sudo systemctl restart grafana-server
 +
 +Set the URL to http://localhost/zabbix/api_jsonrpc.php (or your actual Zabbix server URL).
 +
 +
 +
 +nano /etc/apache2/conf-available/grafana.conf
 +
 +ProxyRequests On
 +#SSLProxyEngine on
 +ProxyPreserveHost On
 +ProxyPass /grafana http://localhost:3000/grafana
 +ProxyPassReverse /grafana http://localhost:3000/grafana
 +
 +
 +nano /etc/grafana/grafana.ini
  
-  <IfModule mod_dbd.c> +http_addr = 127.0.0.1 
-    DBDriver mysql +root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana 
-    DBDParams host=localhost,dbname=mkradius,user=root,pass=vertrigo +serve_from_sub_path true
-    DBDMin 1 +
-    DBDKeep 8 +
-    DBDMax 16 +
-    DBDExptime 300 +
-  </IfModule>+
  
-  <Directory "/admin/"> +a2enmod proxy proxy_http rewrite headers proxy_wstunnel 
-  AuthType Basic +a2enconf grafana 
-  AuthName "Authentication" +/etc/init.d/apache2 restart 
-  AuthBasicProvider socache dbd +/etc/init.d/grafana-server restart
-  AuthnCacheProvideFor dbd +
-  AuthnCacheContext Authentication +
-  Require valid-user +
-  AuthDBDUserPWQuery "SELECT sha FROM sis_acesso WHERE login = %s AND ativo" +
-  </Directory>+
  
  
 </code> </code>
zabbix.1718437693.txt.gz · Last modified: by protocol