我已经安装了Graphite支持的Icinga 2监控工具 Graphite基本上提供了基于Icinga 2产生的指标的图表。
它适用于HTTP,但每当我为Apache VHOST启用HTTPS时,它都会停止工作。
以下链接是请求的示例。
https://monitoring.example.com/icingaweb2/graphite?graphite_url=的 HTTP%253A%252F%252Fgraphite.example.com %252Frender%252F%253F%2526target%253Dicinga2.hostname.services.ping6.ping6.perfdata.rta.value %2526source%253D0%2526width%253D600%2526height%253D400%2526colorList%253D049BAF%2526lineMode%253Dconnected
<VirtualHost *:80>
ServerName monitoring.example.com
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://monitoring.example.com/icingaweb2
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
<VirtualHost *:443>
ServerName monitoring.example.com
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/ssl/certs/monitoring.example.com.crt
SSLCertificateKeyFile /etc/ssl/certs/monitoring.example.com.key
SSLCACertificateFile /etc/ssl/certs/GeoTrust_CA_Bundle.crt
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
Alias "/icingaweb2" "/usr/share/icingaweb2/public"
<Directory "/usr/share/icingaweb2/public">
Options SymLinksIfOwnerMatch
AllowOverride None
Order allow,deny
Allow from all
SetEnv ICINGAWEB_CONFIGDIR "/etc/icingaweb2"
EnableSendfile Off
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /icingaweb2/
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
<IfModule !mod_rewrite.c>
DirectoryIndex error_norewrite.html
ErrorDocument 404 /error_norewrite.html
</IfModule>
</Directory>
</VirtualHost>
我已启用&#34; LogLevel debug&#34;对于vhost,但没有错误。 HTTP resp代码总是等于200。
URL由以下PHP代码编码:
$url = Url::fromPath('graphite', array(
'graphite_url' => urlencode($largeImgUrl)
));
请告诉我可能发生的事情。
答案 0 :(得分:1)
看起来无法混合使用HTTP和HTTPS。配置graphite.example.com以通过HTTPS解决问题。
谷歌Chrome控制台说:
混合内容:页面位于 'https://monitoring.example.com/icingaweb2/monitoring/service/show?host=c ... 600%2526height%253D400%2526colorList%253D049BAF%2526lineMode%253Dconnected' 通过HTTPS加载,但请求不安全的图像 'http://graphite.example.com/render/?&target=icinga2.camhpcvm02.services ... HT = 120安培; hideAxes =真安培;的lineWidth = 2及hideLegend =真安培; colorList = 049BAF&安培;从= -1H'。 此内容也应通过HTTPS提供。 show?host = camhpcvm02&amp; service = ssh:1