Files
tokens-reef/deploy/monitoring/grafana/grafana-single.ini
Developer 349d783fd1 refactor: clean up project structure
- Remove old review reports (keep latest only)
- Move docs/ to deploy/docs-backup/
- Move performance-testing/ to deploy/
- Clean up test output files
- Organize root directory
2026-04-06 23:36:03 +08:00

103 lines
1.8 KiB
INI

# Sub2API 单机版 Grafana 配置
# 优化目标: 内存 < 128MB, SQLite 数据库, 禁用非必要功能
[paths]
data = /var/lib/grafana
temp_data_lifetime = 24h
[server]
http_port = 3000
domain = localhost
root_url = %(protocol)s://%(domain)s:%(http_port)s/
serve_from_sub_path = false
# 数据库配置 - 使用 SQLite 减少资源占用
[database]
type = sqlite3
path = grafana.db
cache_mode = shared
# 会话配置 - 使用内存存储
[session]
provider = memory
provider_config =
cookie_name = grafana_sess
cookie_secure = false
cookie_samesite = lax
# 禁用分析和更新检查
[analytics]
reporting_enabled = false
check_for_updates = false
feedback_links_enabled = false
# 日志配置 - 只输出到控制台,级别 warn
[log]
mode = console
level = warn
filters =
[log.console]
level = warn
format = text
# 禁用指标和追踪
[metrics]
enabled = false
basic_auth_username =
basic_auth_password =
[metrics.graphite]
address =
prefix = prod.grafana.%(instance_name)s.
[tracing.jaeger]
address =
always_included_tag =
sampler_type = const
sampler_param = 1
# 安全设置
[security]
admin_user = admin
# admin_password = 从环境变量读取
cookie_secure = false
cookie_samesite = lax
allow_embedding = false
strict_transport_security = false
content_security_policy = true
# 用户设置
[users]
allow_sign_up = false
allow_org_create = false
auto_assign_org = true
auto_assign_org_role = Viewer
# 匿名访问 - 生产环境建议关闭
[auth.anonymous]
enabled = false
# 渲染设置 - 单机禁用
[rendering]
server_url =
callback_url =
# 面板设置
[panels]
disable_sanitize_html = false
# 插件设置
[plugins]
enable_alpha = false
app_tls_skip_verify_insecure = false
# 实时设置
[live]
max_connections = 100
allowed_origins =
# 快照设置
[snapshots]
external_enabled = false