-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add UDP telemetry support #7
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,50 @@ | ||
module github.com/Juniper/jtimon | ||
|
||
go 1.13 | ||
go 1.17 | ||
|
||
require ( | ||
github.com/Juniper/jtimon/schema v0.0.0 | ||
github.com/Shopify/sarama v1.26.1 | ||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 // indirect | ||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect | ||
github.com/golang/protobuf v1.0.0 | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/gogo/protobuf v1.3.2 | ||
github.com/golang/protobuf v1.5.2 | ||
github.com/gorilla/mux v1.8.0 | ||
github.com/influxdata/influxdb v1.5.2 | ||
github.com/matttproud/golang_protobuf_extensions v1.0.0 // indirect | ||
github.com/jhump/protoreflect v1.15.1 | ||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect | ||
github.com/prometheus/client_golang v0.8.0 | ||
github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5 // indirect | ||
github.com/prometheus/client_model v0.2.0 // indirect | ||
github.com/spf13/pflag v1.0.1 | ||
golang.org/x/net v0.7.0 | ||
google.golang.org/grpc v1.53.0 | ||
google.golang.org/protobuf v1.28.2-0.20230222093303-bc1253ad3743 | ||
) | ||
|
||
require ( | ||
github.com/bufbuild/protocompile v0.4.0 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/eapache/go-resiliency v1.2.0 // indirect | ||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect | ||
github.com/eapache/queue v1.1.0 // indirect | ||
github.com/golang/snappy v0.0.3 // indirect | ||
github.com/hashicorp/go-uuid v1.0.2 // indirect | ||
github.com/jcmturner/gofork v1.0.0 // indirect | ||
github.com/klauspost/compress v1.9.8 // indirect | ||
github.com/pierrec/lz4 v2.4.1+incompatible // indirect | ||
github.com/prometheus/common v0.0.0-20180413074202-d0f7cd64bda4 // indirect | ||
github.com/prometheus/procfs v0.0.0-20180408092902-8b1c2da0d56d // indirect | ||
github.com/spf13/pflag v1.0.1 | ||
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf | ||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect | ||
google.golang.org/genproto v0.0.0-20180413175816-7fd901a49ba6 // indirect | ||
google.golang.org/grpc v1.11.3 | ||
github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563 // indirect | ||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa // indirect | ||
golang.org/x/sync v0.1.0 // indirect | ||
golang.org/x/sys v0.5.0 // indirect | ||
golang.org/x/text v0.7.0 // indirect | ||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect | ||
gopkg.in/jcmturner/aescts.v1 v1.0.1 // indirect | ||
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect | ||
gopkg.in/jcmturner/gokrb5.v7 v7.5.0 // indirect | ||
gopkg.in/jcmturner/rpc.v1 v1.1.0 // indirect | ||
) | ||
|
||
replace github.com/Juniper/jtimon/schema => ./schema | ||
|
||
replace github.com/Juniper/jtimon/schema/telemetry_top => ./schema/telemetry_top |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ var ( | |
prom = flag.Bool("prometheus", false, "Stats for prometheus monitoring system") | ||
promHost = flag.String("prometheus-host", "127.0.0.1", "IP to bind Prometheus service to") | ||
promPort = flag.Int32("prometheus-port", 8090, "Prometheus port") | ||
udp = flag.Bool("udp", false, "Stats for udp monitoring system") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why CLI option given that there is already udp in .json file ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks so much for advice. Please find the changes in commit remove udp CLI option. |
||
prefixCheck = flag.Bool("prefix-check", false, "Report missing __prefix__ in telemetry packet") | ||
pProf = flag.Bool("pprof", false, "Profile JTIMON") | ||
pProfPort = flag.Int32("pprof-port", 6060, "Profile port") | ||
|
@@ -73,9 +74,12 @@ func main() { | |
return | ||
} | ||
|
||
workers := NewJWorkers(*configFiles, *configFileList, *maxRun) | ||
workers.StartWorkers() | ||
workers.Wait() | ||
isUdp := udpWork(configFiles) | ||
if !isUdp { | ||
workers := NewJWorkers(*configFiles, *configFileList, *maxRun) | ||
workers.StartWorkers() | ||
workers.Wait() | ||
} | ||
|
||
log.Printf("all done ... exiting!") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makefile target to compile protos are missing ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that the user may not provide specific proto files in the JTIMON config, and it may be time consuming to compile all the protos, therefore I just uploaded all the .pb.go files along with the proto files under /schema.
I'd love to add
make proto
in the Makefile as needed.Just to clarify, the Makefile target is expected to compile all the protos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes,