Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/grafana-agent
Path: blob/main/cmd/grafana-agent-flow/main.go
4095 views
1
// Command grafana-agent-flow is an Flow mode-only binary. It acts as an
2
// alternative to grafana-agent in environments where users want to run Flow
3
// mode alongside static mode and control versions separately.
4
//
5
// Use grafana-agent instead for a binary which can switch between static mode
6
// and Flow mode at runtime.
7
package main
8
9
import (
10
"github.com/grafana/agent/cmd/internal/flowmode"
11
"github.com/grafana/agent/pkg/build"
12
"github.com/prometheus/client_golang/prometheus"
13
14
// Register Prometheus SD components
15
_ "github.com/grafana/loki/clients/pkg/promtail/discovery/consulagent"
16
_ "github.com/prometheus/prometheus/discovery/install"
17
18
// Register integrations
19
_ "github.com/grafana/agent/pkg/integrations/install"
20
)
21
22
func init() {
23
prometheus.MustRegister(build.NewCollector("agent"))
24
}
25
26
func main() {
27
flowmode.Run()
28
}
29
30