Zabbixのアドホックグラフ、またはカスタムグラフで項目数が非常に多いグラフが表示されない場合があります。(アイテムの収集間隔にも因りますが、デフォルトのままでは1グラフ内に25~30項目ぐらいが限界)
スイッチのポート別トラフィック量のアイテムを1グラフで表示したい時とか困るのですが、そのような場合は以下の変更を行うことで表示できるようになります。(リソース負荷が増えるので環境に合わせて調整が必要です)
PHP
PHPメモリ上限の変更
/etc/httpd/conf.d/zabbix.conf
<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
php_value max_execution_time 300
php_value memory_limit 512M ←★(デフォルト:256M)
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value date.timezone Asia/Tokyo
</Directory>
- ★の部分を変更したらApache再起動
注意:/etc/php.ini よりも上記設定のほうが優先されます。
設定値確認
下記ファイルを作って、ブラウザでアクセス
/usr/share/zabbix/info.php
<?php phpinfo(); ?>
- memory_limitのLocal Value欄を確認
Apache
URL長制限の変更
/etc/httpd/conf/http.conf
最後の行に追記
LimitRequestLine 15000 (デフォルト:8190)
- 変更したらApache再起動
上記のように設定した場合、1グラフ内に100項目程度まで表示ができることを確認できました。