Skip to content
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

feat: A new port is added for prometheus collection, and the indicator init… #1826

Closed
wants to merge 10 commits into from
4 changes: 2 additions & 2 deletions collector/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ meta_servers:
- 127.0.0.1:34603

# local server port
port : 34101
port : 8081
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8080, 8081 are widely used ports for web servers, it would be better to use 34101 to keep compatible (old version of collectors may have been used by communituy users, don't change the behavior).


metrics:
# use falcon as monitoring system.
Expand All @@ -34,7 +34,7 @@ metrics:

prometheus:
# the exposed port for prometheus exposer
exposer_port : 1111
exposer_port : 8080
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, and 34*01 ports are used by Pegasus by habit, how about use 34201 instead?


falcon_agent:
# the host IP of falcon agent
Expand Down
2 changes: 1 addition & 1 deletion collector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

module github.com/apache/incubator-pegasus/collector
module github.com/limowang/incubator-pegasus/collector
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
module github.com/limowang/incubator-pegasus/collector
module github.com/apache/incubator-pegasus/collector


go 1.18

Expand Down
658 changes: 658 additions & 0 deletions collector/go.sum

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions collector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"strings"
"syscall"

"github.com/apache/incubator-pegasus/collector/avail"
"github.com/apache/incubator-pegasus/collector/metrics"
"github.com/apache/incubator-pegasus/collector/webui"
"github.com/limowang/incubator-pegasus/collector/avail"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the comments and use the apache repository.

"github.com/limowang/incubator-pegasus/collector/metrics"
"github.com/limowang/incubator-pegasus/collector/webui"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
"gopkg.in/natefinch/lumberjack.v2"
Expand Down Expand Up @@ -81,7 +81,7 @@ func main() {
return
}

webui.StartWebServer()
metrics.InitMetrics()

tom := &tomb.Tomb{}
setupSignalHandler(func() {
Expand All @@ -97,5 +97,7 @@ func main() {
tom.Go(func() error {
return metrics.NewReplicaServerMetricCollector().Start(tom)
})

webui.StartWebServer()
<-tom.Dead() // gracefully wait until all goroutines dead
}
Loading
Loading