-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [wip] add cpu metrics * [sqlite] add metrics * Fix after rebase * [sqlite] small fixes * add groups * [metadata] migration from blob to text * add groups * small fixes * add prefix check * Fix after rebase * fix: user request error * [wip] add collector * [wip] add collector * add psi metrics * [wip] add builtin modified metrics * fix system metrics builtin * add dc to system metrics * add disk usage * small fixes * small fixes * system metrics: sync send time * system metrics: add duration scrape metric --------- Co-authored-by: e.martyn <[email protected]>
- Loading branch information
Showing
15 changed files
with
1,623 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package main | ||
|
||
import ( | ||
"log" | ||
"os" | ||
"time" | ||
|
||
"github.com/vkcom/statshouse/internal/stats" | ||
) | ||
|
||
func main() { | ||
host, err := os.Hostname() | ||
if err != nil { | ||
panic(err) | ||
} | ||
collector, err := stats.NewCollectorManager(stats.CollectorManagerOptions{ScrapeInterval: time.Second, HostName: host}, nil, log.New(os.Stderr, "[collector]", 0)) | ||
if err != nil { | ||
log.Panic(err) | ||
} | ||
defer collector.StopCollector() | ||
err = collector.RunCollector() | ||
if err != nil { | ||
panic(err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.