Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
f701c610
Unverified
Commit
f701c610
authored
Jan 28, 2019
by
Marcus Efraimsson
Committed by
GitHub
Jan 28, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15054 from RangerRick/master
add global datasource proxy timeout setting
parents
8510f0cd
9108fd1b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
1 deletions
+9
-1
conf/defaults.ini
+3
-0
conf/sample.ini
+3
-0
pkg/api/pluginproxy/ds_proxy.go
+1
-1
pkg/setting/setting.go
+2
-0
No files found.
conf/defaults.ini
View file @
f701c610
...
...
@@ -159,6 +159,9 @@ conn_max_lifetime = 14400
# This enables data proxy logging, default is false
logging
=
false
# How long the data proxy should wait before timing out default is 30 (seconds)
timeout
=
30
#################################### Analytics ###########################
[analytics]
# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
...
...
conf/sample.ini
View file @
f701c610
...
...
@@ -146,6 +146,9 @@ log_queries =
# This enables data proxy logging, default is false
;logging = false
# How long the data proxy should wait before timing out default is 30 (seconds)
;timeout = 30
#################################### Analytics ####################################
[analytics]
# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
...
...
pkg/api/pluginproxy/ds_proxy.go
View file @
f701c610
...
...
@@ -54,7 +54,7 @@ func NewDataSourceProxy(ds *m.DataSource, plugin *plugins.DataSourcePlugin, ctx
func
newHTTPClient
()
httpClient
{
return
&
http
.
Client
{
Timeout
:
time
.
Second
*
30
,
Timeout
:
time
.
Duration
(
setting
.
DataProxyTimeout
)
*
time
.
Second
,
Transport
:
&
http
.
Transport
{
Proxy
:
http
.
ProxyFromEnvironment
},
}
}
...
...
pkg/setting/setting.go
View file @
f701c610
...
...
@@ -77,6 +77,7 @@ var (
SocketPath
string
RouterLogging
bool
DataProxyLogging
bool
DataProxyTimeout
int
StaticRootPath
string
EnableGzip
bool
EnforceDomain
bool
...
...
@@ -597,6 +598,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
// read data proxy settings
dataproxy
:=
iniFile
.
Section
(
"dataproxy"
)
DataProxyLogging
=
dataproxy
.
Key
(
"logging"
)
.
MustBool
(
false
)
DataProxyTimeout
=
dataproxy
.
Key
(
"timeout"
)
.
MustInt
(
30
)
// read security settings
security
:=
iniFile
.
Section
(
"security"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment