【问题标题】:Grafana: How to assign environment variable to http_portGrafana:如何将环境变量分配给 http_port
【发布时间】:2016-03-17 13:31:44
【问题描述】:

我正在尝试运行 grafana,但我需要使用环境变量指定端口。目前,在custom.ini 我有

# The http port  to use
http_port = 9082

如何将环境变量分配给 http_port ?如果我可以从命令行执行,那将是最好的,但唯一可用的命令行选项是

Usage of bin\grafana-server.exe:
  -config string
        path to config file
  -homepath string
        path to grafana install/home path, defaults to working directory
  -pidfile string
        path to pid file
  -v    prints current version and exits

有没有办法给 http_port 分配一个环境变量?

【问题讨论】:

    标签: grafana


    【解决方案1】:

    我不是 Windows 用户,但我想你可以编写一个脚本(bat?)首先生成 custom.ini 文件,用环境变量填充 http_port,然后运行 ​​grafana-server.exe 指向生成的配置文件.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-02-26
      • 2021-09-24
      • 2021-02-26
      • 1970-01-01
      • 2022-06-16
      • 1970-01-01
      • 1970-01-01
      • 2018-08-05
      相关资源
      最近更新 更多