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
a26436f5
Commit
a26436f5
authored
Mar 22, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Server metrics fix
parent
1e4c62a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
pkg/metrics/report_usage.go
+5
-2
No files found.
pkg/metrics/report_usage.go
View file @
a26436f5
...
@@ -4,6 +4,7 @@ import (
...
@@ -4,6 +4,7 @@ import (
"bytes"
"bytes"
"encoding/json"
"encoding/json"
"net/http"
"net/http"
"strings"
"time"
"time"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/log"
...
@@ -13,7 +14,7 @@ import (
...
@@ -13,7 +14,7 @@ import (
func
StartUsageReportLoop
()
chan
struct
{}
{
func
StartUsageReportLoop
()
chan
struct
{}
{
M_Instance_Start
.
Inc
(
1
)
M_Instance_Start
.
Inc
(
1
)
ticker
:=
time
.
NewTicker
(
24
*
time
.
Hour
)
ticker
:=
time
.
NewTicker
(
10
*
time
.
Minute
)
for
{
for
{
select
{
select
{
case
<-
ticker
.
C
:
case
<-
ticker
.
C
:
...
@@ -25,9 +26,11 @@ func StartUsageReportLoop() chan struct{} {
...
@@ -25,9 +26,11 @@ func StartUsageReportLoop() chan struct{} {
func
sendUsageStats
()
{
func
sendUsageStats
()
{
log
.
Trace
(
"Sending anonymous usage stats to stats.grafana.org"
)
log
.
Trace
(
"Sending anonymous usage stats to stats.grafana.org"
)
version
:=
strings
.
Replace
(
setting
.
BuildVersion
,
"."
,
"_"
,
-
1
)
metrics
:=
map
[
string
]
interface
{}{}
metrics
:=
map
[
string
]
interface
{}{}
report
:=
map
[
string
]
interface
{}{
report
:=
map
[
string
]
interface
{}{
"version"
:
setting
.
BuildV
ersion
,
"version"
:
v
ersion
,
"metrics"
:
metrics
,
"metrics"
:
metrics
,
}
}
...
...
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