mackerel-plugin-accesslog で 複数のアクセスログを扱う
2249 ワード
ポイントは3つ
-
[Key]
はユニークに - Key1つに
command
は1つだけ -
-metric-key-prex
はグラフのプレフィックスになるので分かりやすい名前でOK
[plugin.metrics.accesslog_default]
command = "mackerel-plugin-accesslog -metric-key-prefix default /var/log/nginx/default.access.log"
[plugin.metrics.accesslog_localhost]
command = "mackerel-plugin-accesslog -metric-key-prefix localhost /var/log/nginx/localhost.access.log"
[plugin.metrics.accesslog_exmaple_com]
command = "mackerel-plugin-accesslog -metric-key-prefix example.com /var/log/nginx/example.com.access.log"
[plugin.metrics.accesslog_api_exmaple_com]
command = "mackerel-plugin-accesslog -metric-key-prefix api.example.com /var/log/nginx/api.example.com.access.log"
[plugin.metrics.accesslog_img_exmaple_com]
command = "mackerel-plugin-accesslog -metric-key-prefix api.example.com /var/log/nginx/img.example.com.access.log"
お手軽ですね
Author And Source
この問題について(mackerel-plugin-accesslog で 複数のアクセスログを扱う), 我々は、より多くの情報をここで見つけました https://qiita.com/8800/items/5feaa7901ba7f20b2a5f著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .