You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Prithvi Shahi d42a06d1e6
chore: unify dashboard location (#2110)
2 years ago
..
README.md chore: unify dashboard location (#2110) 2 years ago
resource-manager.json chore: unify dashboard location (#2110) 2 years ago

README.md

Ready to go Grafana Dashboard

Here are some prebuilt dashboards that you can add to your Grafana instance. To import follow the Grafana docs here

Setup

To make sure you're emitting the correct metrics you'll have to register the metrics with a Prometheus Registerer. For example:

import (
    // ...
	rcmgr "github.com/libp2p/go-libp2p/p2p/host/resource-manager"
	rcmgrObs "github.com/libp2p/go-libp2p/p2p/host/resource-manager/obs"

	"github.com/prometheus/client_golang/prometheus"
)

    func SetupResourceManager() (network.ResourceManager, error) {
        rcmgrObs.MustRegisterWith(prometheus.DefaultRegisterer)

        str, err := rcmgrObs.NewStatsTraceReporter()
        if err != nil {
            return nil, err
        }

        return rcmgr.NewResourceManager(limiter, rcmgr.WithTraceReporter(str))
    }

Updating Dashboard json

Use the share functionality on an existing dashboard, and make sure to toggle "Export for sharing externally". See the Grafana Docs for more details.